I am having trouble getting my boot.scr to load and run in uboot.
uboot reports the following :
Found U-Boot script /boot.scr
reading /boot.scr
1112 bytes read in 2 ms (543 KiB/s)
## Executing script at 00c00000
SCRIPT FAILED: continuing...
The actual boot.cmd is compiled like so :
$ubootName/tools/mkimage -C none -A arm -T script -d $BR2_EXTERNAL_RK3308_PATH/board/RK3568/boot.cmd $BINARIES_DIR/boot.scr
The contents are here :
echo "loading boot vars"
setenv load_addr $ramdisk_addr_r
setenv devnum 1
load mmc ${devnum} ${load_addr} vars.txt
env import -t ${load_addr} ${filesize}
echo "setting boot args"
setenv bootargs "root=/dev/mmcblk1p2 earlyprintk console=ttyS2,115200n8 rw rootwait"
fatload mmc ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile}
fatload mmc ${devnum}:${distro_bootpart} ${kernel_addr_r} Image
# append overlays as required
setenv overlay_error "false"
fdt addr ${fdt_addr_r}
fdt resize 65536
for overlay_file in ${overlays}; do
echo "loading overlay ${overlay_file}"
if fatload mmc ${devnum}:${distro_bootpart} ${load_addr} rockchip/overlays/${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
fdt apply ${load_addr} || setenv overlay_error "true"
This file has been truncated. show original
Any ideas why the boot.scr is not running ?
dominik
December 9, 2021, 10:46am
2
double check all variables, this can be tricky when some of them may be empty
have You tried with just first line?
Thanks for the suggestion.
Yes, they work. What happens now is that you build, write to sdcard and boot from the sdcard. The boot process stops in uboot with that error message above. You have to manually copy and paste the boot.cmd in to uboot which then boots Linux.
So in short, I am 100% sure that it works because copy and paste works.
I just did a test by switching mkimage (for generating the boot.scr from boot.cmd) to use the rkbin version rather then the uboot version. The same problem persists. This suggests that the problem is a uboot issue.
dominik
December 10, 2021, 7:48am
5
Check out armbian build - as far as I remember it was working there so You can compare it and find difference.
flatmax
December 13, 2021, 12:05am
6
You got links to the armbian boot script ? CAn you copy/paste the output of uboot on console ?
dominik
December 13, 2021, 7:42am
7
Please take a look at Rock 3A sub-forum, there is topic about booting armbian with detailed logs
(and kernel panic from next phase on some builds).
Bootscripts are probably here: https://github.com/armbian/build/tree/master/config/bootscripts
For rk35xx probably boot-rockchip64.cmd is used.