mirror of
https://github.com/armbian/build.git
synced 2026-11-29 03:26:14 +00:00
After the device-number fix, zImage/uInitrd load fine but the dtb load failed
with "Failed to load '/boot/dtb/'" -> bootz aborts ("Did not find a cmdline
Flattened Device Tree"). Modern u-boot's findfdt sets ${fdtfile}
(imx6q-udoo.dtb / imx6dl-udoo.dtb by SoC), but the old script read ${fdt_file},
which is unset on v2026.07.
Use ${fdtfile}; fall back to ${fdt_file} then imx6q-udoo.dtb if unset. Matches
the modern imx6 pattern already used by boot-cubox.cmd, loading the dtb flat
from /boot/dtb/ as Armbian lays it out.
Signed-off-by: Igor Pecovnik <igor@armbian.com>
55 lines
2.5 KiB
Batchfile
55 lines
2.5 KiB
Batchfile
# DO NOT EDIT THIS FILE
|
|
#
|
|
# Please edit /boot/armbianEnv.txt to set supported parameters
|
|
#
|
|
|
|
# default values
|
|
|
|
setenv load_addr "0x12000000"
|
|
setenv ramdisk_addr "0x14800000"
|
|
setenv rootdev "/dev/mmcblk0p1"
|
|
setenv verbosity "1"
|
|
setenv console "both"
|
|
setenv bootlogo "false"
|
|
setenv disp_mode "1920x1080M60"
|
|
setenv rootfstype "ext4"
|
|
setenv earlycon "off"
|
|
|
|
# MMC device that u-boot loaded this script from. Modern u-boot (v2026.07)
|
|
# enumerates the SD as mmc 2 via FSL_SDHC; old u-boot used mmc 0. Use the
|
|
# device u-boot already selected, defaulting to 0 if it didn't set one.
|
|
if test -z "${devnum}"; then setenv devnum "0"; fi
|
|
|
|
# Print boot source
|
|
echo "Booting from SD (mmc ${devnum})"
|
|
|
|
if ext4load mmc ${devnum} ${load_addr} /boot/armbianEnv.txt || fatload mmc ${devnum} ${load_addr} armbianEnv.txt; then
|
|
env import -t ${load_addr} ${filesize}
|
|
fi
|
|
|
|
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=ttymxc1,115200 console=tty1"; fi
|
|
if test "${console}" = "serial"; then setenv consoleargs "console=ttymxc1,115200"; fi
|
|
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi
|
|
if test "${bootlogo}" = "true"; then
|
|
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}"
|
|
else
|
|
setenv consoleargs "splash=verbose ${consoleargs}"
|
|
fi
|
|
|
|
setenv bootargs "root=${rootdev} rootfstype=${rootfstype} rootwait ${consoleargs} video=mxcfb0:dev=hdmi,${disp_mode},if=RGB24,bpp=32 rd.dm=0 rd.luks=0 rd.lvm=0 raid=noautodetect pci=nomsi ahci_imx.hotplug=1 vt.global_cursor_default=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs}"
|
|
# Resolve the dtb name. Modern u-boot's findfdt sets ${fdtfile} (e.g.
|
|
# imx6q-udoo.dtb / imx6dl-udoo.dtb by SoC); the old script used ${fdt_file},
|
|
# which is unset on v2026.07 -> "Failed to load '/boot/dtb/'". Use fdtfile, and
|
|
# fall back to the Quad dtb if neither findfdt nor armbianEnv provided one.
|
|
run findfdt
|
|
if test -z "${fdtfile}"; then setenv fdtfile "${fdt_file}"; fi
|
|
if test -z "${fdtfile}"; then setenv fdtfile "imx6q-udoo.dtb"; fi
|
|
|
|
ext4load mmc ${devnum} ${ramdisk_addr} /boot/uInitrd || fatload mmc ${devnum} ${ramdisk_addr} uInitrd || ext4load mmc ${devnum} ${ramdisk_addr} uInitrd
|
|
ext4load mmc ${devnum} ${loadaddr} /boot/zImage || fatload mmc ${devnum} ${loadaddr} zImage
|
|
ext4load mmc ${devnum} ${fdt_addr} /boot/dtb/${fdtfile} || fatload mmc ${devnum} ${fdt_addr} dtb/${fdtfile}
|
|
bootz ${loadaddr} ${ramdisk_addr} ${fdt_addr}
|
|
|
|
# Recompile with:
|
|
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
|
|
|