Autorun a uboot script

Hi there,

I’m building the radxa uboot system. I can’t seem to get my script to run from uboot. This is the output :
mmc1 is current device
Scanning mmc 1:1…
Found U-Boot script /boot.scr
reading /boot.scr
1112 bytes read in 4 ms (271.5 KiB/s)
## Executing script at 00c00000
SCRIPT FAILED: continuing…

The script is compiled like so :
uboot/tools/mkimage -C none -A arm -T script -d boot.cmd boot.scr

This is still a problem. Any ideas on how to fix the boot.scr loading and running from uboot ?

Would you please show your boot.cmd and the generated boot.scr?

And the result of command ‘fatls mmc 1:1’ in u-boot shell?

Hey Stephen,

=> fatls mmc 1:1
78 vars.txt
1142 boot.scr
20944904 Image
rockchip/

3 file(s), 1 dir(s)

This is the command used to generate the boot.scr :

$ubootName/tools/mkimage -C none -A arm -T script -d $BR2_EXTERNAL_RK3308_PATH/board/RK3566.cm3/boot.cmd $BINARIES_DIR/boot.scr

Good news, I have found a workaround for this. I can use the host tools mkimage to generate the boot.scr : https://github.com/flatmax/buildroot.rockchip/blob/master/board/RK3566.cm3/post-image.sh#L32

$HOST_DIR/bin/mkimage -C none -A arm -T script -a 0x00c00000 -e 0x00c00000 -n ‘flatmax load script’ -d $BR2_EXTERNAL_RK3308_PATH/board/RK3566.cm3/boot.cmd $BINARIES_DIR/boot.scr

Booting now works.

It appears that there is a bug in the radxa uboot repo w.r.t. the mkimage script.