selu@rock-3a:~$ dd if=/dev/mmcblk0 seek=64 skip=64 count=32704 of=uboot.bin
32704+0 records in
32704+0 records out
16744448 bytes (17 MB, 16 MiB) copied, 0.564798 s, 29.6 MB/s
selu@rock-3a:~$ strings uboot.bin | grep "U-Boot"
U-Boot SPL board init
command in your U-Boot project: ./scripts/stacktrace.sh dump.txt %s
U-Boot SPL 2017.09-armbian (Sep 19 2022 - 14:20:01)
U-Boot
FIT Image with ATF/OP-TEE/U-Boot
U-Boot(64-bit)
*U-Boot
U-Boot dtb
** Invalid partition type "%.32s" (expect "U-Boot")
Enter U-Boot charging mode
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
U-Boot.armv8
command in your U-Boot project: ./scripts/stacktrace.sh dump.txt %s
MU-Boot EFI: Relocation at %p is out of range (%lx)
U-Boot 2017.09-armbian
## U-Boot bootargs: %s
No valid device tree binary found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>
U-Boot
Sysmem Error: Failed to reserve sysmem for U-Boot framework
U-Boot 2017.09-armbian (Sep 19 2022 - 14:20:01 +0200)
And this is different from the bundled U-Boot:
selu@rock-3a:~$ strings /usr/lib/linux-u-boot-current-rock-3a/u-boot.itb | grep "U-Boot"
FIT Image with ATF/OP-TEE/U-Boot
U-Boot(64-bit)
*U-Boot
U-Boot dtb
** Invalid partition type "%.32s" (expect "U-Boot")
Enter U-Boot charging mode
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
U-Boot.armv8
command in your U-Boot project: ./scripts/stacktrace.sh dump.txt %s
MU-Boot EFI: Relocation at %p is out of range (%lx)
U-Boot 2017.09-armbian
## U-Boot bootargs: %s
No valid device tree binary found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>
U-Boot
Sysmem Error: Failed to reserve sysmem for U-Boot framework
U-Boot 2017.09-armbian (May 20 2024 - 00:41:52 +0000)
I could not update U-Boot via armbian-install, somehow my rootfs on NVMe breaks install in the script ( I boot from SD with /boot in it ).
Not detecting the device ( using set -x )
++ sed -e 's/^.*root=//' -e 's/ .*$//'
+ root_uuid=UUID=a0d95135-003b-44d5-8efe-ef62615e7dea
++ blkid
++ tr -d '":'
++ grep UUID=a0d95135-003b-44d5-8efe-ef62615e7dea
++ awk '{print $1}'
+ root_partition=/dev/nvme0n1
++ echo /dev/nvme0n1
++ sed 's/\/dev\///g'
+ root_partition_name=nvme0n1
++ lsblk -ndo pkname /dev/nvme0n1
+ root_partition_device_name=
+ root_partition_device=/dev/
+ exit 1
I crafted a quick n'dirty script:
#!/bin/bash
source /usr/lib/u-boot/platform_install.sh
DIR=/usr/lib/linux-u-boot-current-rock-3a
root_partition_device=/dev/mmcblk0
write_uboot_platform "$DIR" "${root_partition_device}"
And I can confirm that u-boot was updated in SD and now works fine! YEEHAA!