This looks quite similar to what i have in my boot.scr:
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
run mender_setup
mmc dev ${mender_uboot_dev}
if load ${mender_uboot_root} ${kernel_addr_r} /boot/zImage; then
bootz ${kernel_addr_r} - ${fdt_addr}
elif load ${mender_uboot_root} ${kernel_addr_r} /boot/uImage; then
bootm ${kernel_addr_r} - ${fdt_addr}
else
echo "No bootable Kernel found."
fi
run mender_try_to_recover
# Recompile with:
# mkimage -C none -A arm -T script -d boot.cmd boot.scr
What i’m really looking for is the boot command for the kernel, not the boot script for u-boot. In case that can be relevant, here’s the last log i get before kernel handoff and no more serial input:
U-Boot 2021.07-rc2-00175-g7a1638c263-dirty (May 20 2021 - 00:43:37 +0200)
DRAM: 7.9 GiB
RPI 4 Model B (0xd03114)
MMC: mmcnr@7e300000: 1, emmc2@7e340000: 0
Loading Environment from FAT... In: serial
Out: serial
Err: serial
Net: eth0: ethernet@7d580000
PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
starting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot: 0
Saving Environment to FAT... OK
49090 bytes read in 1 ms (46.8 MiB/s)
6694592 bytes read in 25 ms (255.4 MiB/s)
## Booting kernel from Legacy Image at 00080000 ...
Image Name: Linux kernel
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 6694528 Bytes = 6.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02600000
Booting using the fdt blob at 0x2600000
Loading Kernel Image
Using Device Tree in place at 02600000, end 0260efc1
Starting kernel ...