Fix boot script issues (#1024) (#1026)

The change "Avoid trying to boot non-existing kernel image in failover
case" introduced a broken boot script on Raspberry Pi (when booting from
partition B) and ODROID-XU4.
This commit is contained in:
Stefan Agner 2020-11-27 13:47:46 +01:00 committed by GitHub
parent bf1eaf44d5
commit beaad9ac9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ fi
printenv bootargs printenv bootargs
echo "Starting kernel" echo "Starting kernel"
booti ${kernel_addr_r} - ${fdt_addr_r} bootz ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..." echo "Boot failed, resetting..."
reset reset

View File

@ -46,7 +46,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_B_LEFT} -gt 0; then if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1 setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..." echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load ${devtype} ${devnum}:4 ${kernel_addr_r} zImage"; then if ext4load ${devtype} ${devnum}:4 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B" setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B"
fi fi
fi fi

View File

@ -46,7 +46,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_B_LEFT} -gt 0; then if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1 setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..." echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load ${devtype} ${devnum}:4 ${kernel_addr_r} Image"; then if ext4load ${devtype} ${devnum}:4 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B" setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B"
fi fi
fi fi