sun50i-h6: fix secondary CPU bring-up failure and clean up dangling series.armbian reference#9
sun50i-h6: fix secondary CPU bring-up failure and clean up dangling series.armbian reference#9
Conversation
Linux prior to v6.11 did not contain a native Orange Pi 3B device tree, hence "rk3566-orangepi-3b.dtb" was added via patch. Since there is an incompatibility between board revisions v1.1 and v2.1, mainline Linux however added two device trees for those two revisions. Since mainline U-Boot did already select those new device trees by default, we needed to define the old one via boot environmetn, which does not exist in new kernel. Older U-Boot versions however won't load the new device trees. To not break boot after kernel package upgrade, a symlink is hence added to the package to keep it compatible with old U-Boot and boot environment. A migration to new U-Boot, removing the then obsolete fdtfile declaration from boot env, can be done via distro upgrade scripts or manually, to fully support board revision v2.1. Signed-off-by: MichaIng <micha@dietpi.com>
In case of rk35xx-vendor, the mt7921e PCIe WiFi drivers were enabled already, but the one for USB was missing. It was enabled for most other boards already, hence this commit is an alignment. Signed-off-by: MichaIng <micha@dietpi.com>
to fix onboard Ethernet on NanoPi M1 Plus: MichaIng/DietPi#6974 Signed-off-by: MichaIng <micha@dietpi.com>
********************************************************** ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** ** ** ** trace_printk() being used. Allocating extra memory. ** ** ** ** This means that this is a DEBUG kernel and it is ** ** unsafe for production use. ** ** ** ** If you see this message and you are not debugging ** ** the kernel, report this immediately to your vendor! ** ** ** ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** ********************************************************** Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
The image path "must be the absolute filename of the kernel image". Else, when using image_dest or link_in_boot in /etc/kernel-img.conf, it links to the non-existing boot/ sub directory. Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Upstream kernel defines the exact same LEDs already. having both defined leads to unusable LED sysfs nodes: MichaIng/DietPi#5401 Signed-off-by: MichaIng <micha@dietpi.com>
and replace dialog with whiptail. Signed-off-by: MichaIng <micha@dietpi.com>
- Enable all RTW88 mainline drivers - Disable all related 3rd party drivers - Merge and sort all related config keys - Align for all mainline Rockchip/Allwinner/Amlogic configs As an exception, keep using the out-of-tree driver for RTL8723DS, which performs much better on Linux 6.12. On Linux 6.16, the mainline driver runs as smooth, but throws a warning invalid efuse MAC, assigning a random one instead. On ROCK Pi S, the out-of-tree driver does not assign a static MAC etiher, but only the last 3 blocks are random, the first 3 remain static. On the Gateway GZ80X, as heard from someone else, it seems to apply a completely static MAC. In any case, it can obviously better obtain MAC address info hardware, respectively do so in more cases. Signed-off-by: MichaIng <micha@dietpi.com>
This breaks the ATF build that was likely unintentionally enabled with armbian#8449. However, when already creating an upstream diff, we go forward and use ATF with latest U-Boot version. This also removes the unnecessary SPI images from U-Boot builds. This SBC does not have an SPI storage. Signed-off-by: MichaIng <micha@dietpi.com>
* cpufrequtils is not installed anymore by Armbian, hence removing it from Trixie is not needed anymore. * On Debian, software-properties-common is not needed, but spamming the logs with a warning about that is unnecessary => degraded to debug * Removed duplicate software-properties-common argument * Do not spam logs with a warning if the optional userspace extensions dir does not exist Signed-off-by: MichaIng <micha@dietpi.com>
including the btrsubvol for manging Btrfs subvolumes. Signed-off-by: MichaIng <micha@dietpi.com>
All other H3/H5 boards we support, have no RTC battery socket. But the RTC node is enabled by default in mainline Linux, reserving /dev/rtc0. The kernel config uses that via CONFIG_RTC_HCTOSYS_DEVICE="rtc0". This is unnecessary and becomes a problem when aiming to use an external I2C RTC, which currently requires a manual `hwclock --hctosys --rtc /dev/rtc1` call to be used. With the SoC-internal RTC disabled, the kernel restores from the external RTC automatically. Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
by assigning it to the ethernet1 alias. U-Boot assigns an autogenerated MAC based on hardware parameters automatically. Signed-off-by: MichaIng <micha@dietpi.com>
U-Boot generates and assigns two MAC addresses for Rockchip SBCs with ethernet0 and ethernet1 aliases pointing to repsective device nodes. The PCIe child node for the PCIe Ethernet adapter with the needed "local-mac-address" property is added with this patch, as well as the respective alias. This commit additionally applies default Ethernet LED triggers. Signed-off-by: MichaIng <micha@dietpi.com>
U-Boot generates and assigns two MAC addresses for Rockchip SBCs with ethernet0 and ethernet1 aliases pointing to repsective device nodes. The PCIe child nodes for both 2.5 Gbit Ethernet adapters with the needed "local-mac-address" properties are added with this patch, as well as the respective aliases. This commit applies as well default Ethernet LED triggers. Signed-off-by: MichaIng <micha@dietpi.com>
U-Boot assigns the variables eth(0)addr, eth1addr, eth2addr etc as MAC addresses to device tree aliases ethernet0, ethernet1, ethernet2 etc. For Rockchip SBCs, it generates only ethaddr and eth1addr so far. To support 3 static MAC addresses for the NanoPi R5S, it needs to generate eth2addr. This is archived with a U-Boot patch, to derive eth2addr the same way like eth1addr, but inverting the 2nd last bit instead. With a kernel patch, PCIe child nodes with the needed "local-mac-address" attributes are added to respective PCIe bridge nodes, and added as ethernet1 and ethernet2 aliases respectively. In sum: U-Boot additionally generates a valid eth2addr, and additionally assigns eth1addr and eth2addr to the now existing ethernet1 and ethernet2 aliases, pointing to the 2.5 Gbit Ethernet device nodes. This commit applies as well default Ethernet LED triggers. Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
U-Boot assigns the variables eth(0)addr, eth1addr, eth2addr etc as MAC addresses to device tree aliases ethernet0, ethernet1, ethernet2 etc. For Rockchip SBCs, it generates only ethaddr and eth1addr so far. To support 3 static MAC addresses for the NanoPi R6S, it needs to generate eth2addr. This is archived with a U-Boot patch, to derive eth2addr the same way like eth1addr, but inverting the 2nd last bit instead. With a kernel patch, PCIe child nodes with the needed "local-mac-address" attributes are added to respective PCIe bridge nodes, and added as ethernet1 and ethernet2 aliases respectively. In sum: U-Boot additionally generates a valid eth2addr, and additionally assigns eth1addr and eth2addr to the now existing ethernet1 and ethernet2 aliases, pointing to the 2.5 Gbit Ethernet device nodes. Due to shared includes, this applies static MAC addresses for both NanoPi R6C adapters as well. This commit additionally fixes the default Ethernet LED triggers for NanoPi R6C and applies them for later Linux versions. Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
It is in peripheral mode by default. Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Seriously, while the chip might live long enough at 85 °C - 100 °C, it is also about the temperature sourrounding components, peripherals and in case passive cooling cases get. I do not want to fry eggs on my NanoPi R4S case, which is directly connected to the SoC as passive cooler. Revert to upstream Linux values, which can always be overridden via board device tree or overlay. Signed-off-by: MichaIng <micha@dietpi.com>
On mainline Linux for RK3588 `&usb_host0_xhci` is usually the USB-C port, if there is one, sometimes used as debug serial port, like on NanoPi R6C. Depending on SBC, it is pre-configured differently. Add overlays to swap it freely. Signed-off-by: MichaIng <micha@dietpi.com>
The additional HDMI timings have been added upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?h=linux-6.12.y&id=d1ea423 Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
It is in peripheral mode by default. Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Seriously, while the chip might live long enough at 85 °C - 100 °C, it is also about the temperature sourrounding components, peripherals and in case passive cooling cases get. I do not want to fry eggs on my NanoPi R4S case, which is directly connected to the SoC as passive cooler. Revert to upstream Linux values, which can always be overridden via board device tree or overlay. Signed-off-by: MichaIng <micha@dietpi.com>
On mainline Linux for RK3588 `&usb_host0_xhci` is usually the USB-C port, if there is one, sometimes used as debug serial port, like on NanoPi R6C. Depending on SBC, it is pre-configured differently. Add overlays to swap it freely. Signed-off-by: MichaIng <micha@dietpi.com>
The additional HDMI timings have been added upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?h=linux-6.12.y&id=d1ea423 Signed-off-by: MichaIng <micha@dietpi.com>
Linux removed it from base dtsi to be added to individual dts for boards which actually have onboard Ethernet: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=5d90cb1 Signed-off-by: MichaIng <micha@dietpi.com>
All credits go to @gitmeister: MichaIng/DietPi#5414 (comment) Signed-off-by: MichaIng <micha@dietpi.com>
Flashing via dd as before causes a U-Boot loop due to failing BL33 CHK. This was caused almost certainly by the recent bump of U-Boot from v2022.10 to v2026.01. Flashing via flashcp as done in many other cases results in successful boot from SPI NOR flash. This commit also removes the obsolete ToDo comment: The meson-g12b-odroid-n2-spi.dtbo exists since a long time and works perfectly fine. No need to switch the entire base device tree. Signed-off-by: MichaIng <micha@dietpi.com>
It breaks the respective USB port on all RK3328 boards we support, and the internally attached Ethernet on NanoPi R2S. Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
armbian/linux-rockchip@7628960 Everything is wired the same way, and mainline defines the same pinctl, only on vendor it is missing: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588-base-pinctrl.dtsi#n368 Signed-off-by: MichaIng <micha@dietpi.com>
That way, it can be autoloaded. Otherwise, e.g. LEDs on ROCK64 do not work unless manually loading that driver. Signed-off-by: MichaIng <micha@dietpi.com>
This saves ~150 MiB disk space. Culprit commit: armbian/firmware@36ec437 Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Not needed anymore for any device or kernel version we support. Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
for Orange Pi 5 Max and Ultra WiFi support Signed-off-by: MichaIng <micha@dietpi.com>
In case of Orange Pi 3B v1.1: All other differences between the (functional) vendor kernel device tree and mainline kernel have been tested, as well as defining a more precise "compatible" entry for the PHY. Also raising the reset delays to match the vendor kernel values did not work. Only reverting to old way of defining reset delays in MAC instead of PHY solved the RTL8211F Ethernet of this board. Same change helped for ROCK 3B and Orange Pi 3 LTS, which use the same RTL8211F chip, or the pin-compatible YT8531. `https://dietpi.com/forum/t/22129` `https://github.com/MichaIng/DietPi/issues/7327` `https://github.com/MichaIng/DietPi/issues/7490` `https://github.com/MichaIng/DietPi/issues/7905` Signed-off-by: MichaIng <micha@dietpi.com>
The existing patch works on rockchip only since uwe5622-fix-setting-mac-address-for-netdev.patch is applied on sunxi. The new patch has been adjusted for sunxi to replace both lines and make use of its target_mac_addr. Signed-off-by: MichaIng <micha@dietpi.com>
It removes cooling device entries for CPUs 1-3, adding them for CPU 0 only, potentially causing an issue where H6 boards boot with a single usable CPU core only. Signed-off-by: MichaIng <micha@dietpi.com>
|
@copilot here is the kernel log until the relevant CPU init failures: Let me know if any logs after that would help to clarify something relevant. We did now test it with the defconf from pyavitz: https://github.com/pyavitz/debian-image-builder/blob/feature/defconfig/sunxi64_defconfig Hence the debugging could need to focus on the patches, in combination with above kernel log. |
Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
... The boot log is very revealing — Two key observations from the log:
The sunxi-6.15 version of the same DTS ( Commit 442d571 removes Security note: the removed seed was a fixed constant ( |
Changes
Removed the dangling
add-initial-support-for-orangepi3-lts.patchreference fromseries.armbianfor consistency with the actual state ofpatches.armbian/. Note:series.armbianis not applied by the build system — onlyseries.confand patches placed directly in the root of thesunxi-6.12/directory are applied.Removed
kaslr-seed = <0xfeedbeef 0xc0def00d>fromdt/sun50i-h6-orangepi-3-lts.dtsto fix secondary CPU bring-up failure.Root Cause Analysis
The boot log showed all three secondary CPUs (CPU1–CPU3) failing with
failed in unknown state : 0x0, meaning they never write tosecondary_data.status— i.e., they never execute any kernel code despite PSCI CPU_ON returning success (each times out after exactly 5 seconds).The
kaslr-seedproperty in the DTS was enabling KASLR, which in Linux 6.12 ARM64 forces KPTI (Kernel Page Table Isolation) on, as confirmed by the boot log:KPTI adds a trampoline page-table transition to the ARM64 secondary CPU startup path (
secondary_startup_64). A failure in this trampoline produces exactly the observed0x0state symptom.The sunxi-6.15 version of the same DTS (
add-initial-support-for-orangepi3-lts.patch) does not includekaslr-seed, which aligns with this fix. The removed seed was also a fixed constant (0xfeedbeef 0xc0def00d) rather than a truly random value, so it provided deterministic rather than meaningful KASLR randomisation.Note
Hardware testing is needed to confirm that secondary CPUs come online after this change.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.