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

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 :

$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.

There is still an issue with u-boot 2017.09. I’m building for cm3io from kirkstone branch and script cannot execute just ends with:

Found U-Boot script /boot.scr
reading /boot.scr
435 bytes read in 1 ms (424.8 KiB/s)
## Executing script at 00c00000
Unknown command '����' - try 'help'
SCRIPT FAILED: continuing...

Any ideas? Thanks.