@@ -14,25 +14,31 @@ setenv docker_optimizations "on"
1414setenv earlycon " off"
1515
1616# Set load address for temporary file loading (armbianEnv.txt, overlays, etc)
17- # Using address that doesn't conflict with kernel (0x45000000), ramdisk (0x49000000), or fdt (0x44000000)
17+ # Using address that doesn't conflict with kernel (0x45000000) Note: on Arm64 it has to be 2mb aligned
18+ # Ramdisk (0x49000000),
19+ # or fdt (0x44000000)
1820setenv load_addr " 0x43000000"
1921
22+ # Move ramdisk further away to avoid kernel overwrite (176MB space for kernel)
23+ setenv ramdisk_addr_r " 0x50000000"
24+
2025test -n " ${distro_bootpart}" || distro_bootpart=1
2126
2227echo " Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}"
2328
2429# get PARTUUID of first partition on SD/eMMC/UFS the boot script was loaded from
2530echo " Detecting PARTUUID for ${devtype} device ${devnum}:${distro_bootpart}..."
26- if test " ${devtype}" = " mmc" ; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi
27- if test " ${devtype}" = " scsi" ; then part uuid scsi ${devnum}:${distro_bootpart} partuuid; fi
31+
32+ # Explicitly clear partuuid as U-Boot variables set by functions or used in loops may not behave as expected
33+ setenv partuuid
34+
35+ if test " ${devtype}" = " mmc" || test " ${devtype}" = " scsi" || test " ${devtype}" = " usb" ; then
36+ part uuid ${devtype} ${devnum}:${distro_bootpart} partuuid
37+ fi
2838
2939# Use PARTUUID if available (more reliable), otherwise fall back to rootdev label
3040if test -n " ${partuuid}" ; then
31- echo " PARTUUID detected: ${partuuid}"
32- setenv rootdev " PARTUUID=${partuuid}"
33- echo " Set default rootdev=${rootdev}"
34- else
35- echo " PARTUUID not available, keeping fallback rootdev=${rootdev}"
41+ setenv rootdev " PARTUUID=${partuuid}"
3642fi
3743
3844# Load armbianEnv.txt if it exists - using direct load instead of test -e for better compatibility
5157
5258echo " Final rootdev: ${rootdev}"
5359
54- if test " ${logo}" = " disabled" ; then setenv logo " logo.nologo" ; fi
60+ if test " ${bootlogo}" = " true" ; then
61+ setenv consoleargs " splash plymouth.ignore-serial-consoles ${consoleargs}"
62+ else
63+ setenv consoleargs " splash=verbose ${consoleargs}"
64+ fi
5565
5666if test " ${console}" = " display" || test " ${console}" = " both" ; then setenv consoleargs " console=tty1" ; fi
5767if test " ${console}" = " serial" || test " ${console}" = " both" ; then setenv consoleargs " console=ttyS0,921600 ${consoleargs}" ; fi
107117 fi
108118fi
109119
110- echo " Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards. "
111- kaslrseed # @ TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled
120+ # Resize the fdt to the actual size of the final dtb
121+ fdt resize
112122
113123echo " Booting kernel from ${kernel_addr_r} with initramfs at ${ramdisk_addr_r} and DTB at ${fdt_addr_r}..."
114124booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
0 commit comments