boot scripts: print boot attempts only when bootcount mechanism active
Improve boot attempts message showing not only the current boot attempt
but also the limit:
(boot attempt 1/3)
Print the message only when the bootcount mechanism is active, i.e. when
the bootlimit is defined (not zero), and when bootcount is > 0.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://onedigi.atlassian.net/browse/DUB-1056
(cherry picked from commit 918a9caf1d)
This commit is contained in:
parent
7bf452e85a
commit
b75e88bbe0
|
|
@ -7,17 +7,22 @@
|
||||||
# and save them, while the rest of the script changes variables only temporarily
|
# and save them, while the rest of the script changes variables only temporarily
|
||||||
# without saving them.
|
# without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot update verification
|
# Dual boot update verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${upgrade_available}" = "1"; then
|
if test "${upgrade_available}" = "1"; then
|
||||||
echo "Update detected; Booting new system in ${active_system} (try ${bootcount})"
|
echo "Update detected; Booting new system in ${active_system} ${bootattempt}"
|
||||||
else
|
else
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A"
|
||||||
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B"
|
||||||
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
||||||
fi
|
fi
|
||||||
|
|
@ -50,6 +55,9 @@ else
|
||||||
# We are booting from the SD card.
|
# We are booting from the SD card.
|
||||||
setenv mmcroot /dev/mmcblk${mmcbootdev}p2
|
setenv mmcroot /dev/mmcblk${mmcbootdev}p2
|
||||||
fi
|
fi
|
||||||
|
if test "${upgrade_available}" = "1"; then
|
||||||
|
echo "Update detected; Booting new system ${bootattempt}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,22 @@
|
||||||
# and save them, while the rest of the script changes variables only temporarily
|
# and save them, while the rest of the script changes variables only temporarily
|
||||||
# without saving them.
|
# without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot update verification
|
# Dual boot update verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${upgrade_available}" = "1"; then
|
if test "${upgrade_available}" = "1"; then
|
||||||
echo "Update detected; Booting new system in ${active_system} (try ${bootcount})"
|
echo "Update detected; Booting new system in ${active_system} ${bootattempt}"
|
||||||
else
|
else
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A"
|
||||||
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B"
|
||||||
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
||||||
fi
|
fi
|
||||||
|
|
@ -50,6 +55,9 @@ else
|
||||||
# We are booting from the SD card.
|
# We are booting from the SD card.
|
||||||
setenv mmcroot /dev/mmcblk${mmcbootdev}p2
|
setenv mmcroot /dev/mmcblk${mmcbootdev}p2
|
||||||
fi
|
fi
|
||||||
|
if test "${upgrade_available}" = "1"; then
|
||||||
|
echo "Update detected; Booting new system ${bootattempt}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,19 @@
|
||||||
# requires the script to change some variables and save them, while the rest
|
# requires the script to change some variables and save them, while the rest
|
||||||
# of the script changes variables only temporarily without saving them.
|
# of the script changes variables only temporarily without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot verification
|
# Dual boot verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A ${bootattempt}"
|
||||||
setenv tmp_mtdrootfspart ${rootfsvol_a}
|
setenv tmp_mtdrootfspart ${rootfsvol_a}
|
||||||
setenv tmp_rootfsvol ${rootfsvol_a}
|
setenv tmp_rootfsvol ${rootfsvol_a}
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B ${bootattempt}"
|
||||||
setenv tmp_mtdrootfspart ${rootfsvol_b}
|
setenv tmp_mtdrootfspart ${rootfsvol_b}
|
||||||
setenv tmp_rootfsvol ${rootfsvol_b}
|
setenv tmp_rootfsvol ${rootfsvol_b}
|
||||||
fi
|
fi
|
||||||
|
|
@ -34,7 +39,7 @@ if test "${dualboot}" = "yes"; then
|
||||||
env save
|
env save
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Booting system (try ${bootcount})"
|
echo "Booting system ${bootattempt}"
|
||||||
if test "${mtdbootpart}" = "recovery"; then
|
if test "${mtdbootpart}" = "recovery"; then
|
||||||
setenv boot_initrd true
|
setenv boot_initrd true
|
||||||
setenv initrd_file uramdisk-recovery.img
|
setenv initrd_file uramdisk-recovery.img
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,19 @@
|
||||||
# requires the script to change some variables and save them, while the rest
|
# requires the script to change some variables and save them, while the rest
|
||||||
# of the script changes variables only temporarily without saving them.
|
# of the script changes variables only temporarily without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot verification
|
# Dual boot verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A ${bootattempt}"
|
||||||
setenv tmp_mtdrootfspart ${rootfsvol_a}
|
setenv tmp_mtdrootfspart ${rootfsvol_a}
|
||||||
setenv tmp_rootfsvol ${rootfsvol_a}
|
setenv tmp_rootfsvol ${rootfsvol_a}
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B ${bootattempt}"
|
||||||
setenv tmp_mtdrootfspart ${rootfsvol_b}
|
setenv tmp_mtdrootfspart ${rootfsvol_b}
|
||||||
setenv tmp_rootfsvol ${rootfsvol_b}
|
setenv tmp_rootfsvol ${rootfsvol_b}
|
||||||
fi
|
fi
|
||||||
|
|
@ -34,7 +39,7 @@ if test "${dualboot}" = "yes"; then
|
||||||
env save
|
env save
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Booting system (try ${bootcount})"
|
echo "Booting system ${bootattempt}"
|
||||||
if test "${mtdbootpart}" = "recovery"; then
|
if test "${mtdbootpart}" = "recovery"; then
|
||||||
setenv boot_initrd true
|
setenv boot_initrd true
|
||||||
setenv initrd_file uramdisk-recovery.img
|
setenv initrd_file uramdisk-recovery.img
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,19 @@
|
||||||
# requires the script to change some variables and save them, while the rest
|
# requires the script to change some variables and save them, while the rest
|
||||||
# of the script changes variables only temporarily without saving them.
|
# of the script changes variables only temporarily without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot verification
|
# Dual boot verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
||||||
fi
|
fi
|
||||||
|
|
@ -31,7 +36,7 @@ if test "${dualboot}" = "yes"; then
|
||||||
env save
|
env save
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Booting system (try ${bootcount})"
|
echo "Booting system ${bootattempt}"
|
||||||
# Get the UUID of the configured boot partition.
|
# Get the UUID of the configured boot partition.
|
||||||
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
||||||
# Check the boot source.
|
# Check the boot source.
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,19 @@
|
||||||
# requires the script to change some variables and save them, while the rest
|
# requires the script to change some variables and save them, while the rest
|
||||||
# of the script changes variables only temporarily without saving them.
|
# of the script changes variables only temporarily without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot verification
|
# Dual boot verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
||||||
fi
|
fi
|
||||||
|
|
@ -31,7 +36,7 @@ if test "${dualboot}" = "yes"; then
|
||||||
env save
|
env save
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Booting system (try ${bootcount})"
|
echo "Booting system ${bootattempt}"
|
||||||
# Get the UUID of the configured boot partition.
|
# Get the UUID of the configured boot partition.
|
||||||
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
||||||
# Check the boot source.
|
# Check the boot source.
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,19 @@
|
||||||
# requires the script to change some variables and save them, while the rest
|
# requires the script to change some variables and save them, while the rest
|
||||||
# of the script changes variables only temporarily without saving them.
|
# of the script changes variables only temporarily without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot verification
|
# Dual boot verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
||||||
fi
|
fi
|
||||||
|
|
@ -31,7 +36,7 @@ if test "${dualboot}" = "yes"; then
|
||||||
env save
|
env save
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Booting system (try ${bootcount})"
|
echo "Booting system ${bootattempt}"
|
||||||
# Get the UUID of the configured boot partition.
|
# Get the UUID of the configured boot partition.
|
||||||
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
||||||
# Check the boot source.
|
# Check the boot source.
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,19 @@
|
||||||
# requires the script to change some variables and save them, while the rest
|
# requires the script to change some variables and save them, while the rest
|
||||||
# of the script changes variables only temporarily without saving them.
|
# of the script changes variables only temporarily without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot verification
|
# Dual boot verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
||||||
fi
|
fi
|
||||||
|
|
@ -31,7 +36,7 @@ if test "${dualboot}" = "yes"; then
|
||||||
env save
|
env save
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Booting system (try ${bootcount})"
|
echo "Booting system ${bootattempt}"
|
||||||
# Get the UUID of the configured boot partition.
|
# Get the UUID of the configured boot partition.
|
||||||
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
||||||
# Check the boot source.
|
# Check the boot source.
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,22 @@
|
||||||
# requires the script to change some variables and save them, while the rest
|
# requires the script to change some variables and save them, while the rest
|
||||||
# of the script changes variables only temporarily without saving them.
|
# of the script changes variables only temporarily without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Pre step: check if we boot from uSD.
|
# Pre step: check if we boot from uSD.
|
||||||
if test "${mmcbootdev}" = "1"; then
|
if test "${mmcbootdev}" = "1"; then
|
||||||
# We are booting from the SD card.
|
# We are booting from the SD card.
|
||||||
setenv mmcroot /dev/mmcblk${mmcbootdev}p2
|
setenv mmcroot /dev/mmcblk${mmcbootdev}p2
|
||||||
elif test "${dualboot}" = "yes"; then
|
elif test "${dualboot}" = "yes"; then
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_a tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_a tmp_rootfs_index
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B ${bootattempt}"
|
||||||
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
part number mmc ${mmcbootdev} linux_b tmp_mmcpart
|
||||||
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
part number mmc ${mmcbootdev} rootfs_b tmp_rootfs_index
|
||||||
fi
|
fi
|
||||||
|
|
@ -34,7 +39,7 @@ elif test "${dualboot}" = "yes"; then
|
||||||
env save
|
env save
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Booting system (try ${bootcount})"
|
echo "Booting system ${bootattempt}"
|
||||||
# Get the UUID of the configured boot partition.
|
# Get the UUID of the configured boot partition.
|
||||||
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
part uuid mmc ${mmcbootdev}:${mmcpart} bootpart
|
||||||
# Check the boot source.
|
# Check the boot source.
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,18 @@
|
||||||
# requires the script to change some variables and save them, while the rest
|
# requires the script to change some variables and save them, while the rest
|
||||||
# of the script changes variables only temporarily without saving them.
|
# of the script changes variables only temporarily without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot verification
|
# Dual boot verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A ${bootattempt}"
|
||||||
setenv tmp_rootfsvol ${rootfsvol_a}
|
setenv tmp_rootfsvol ${rootfsvol_a}
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B ${bootattempt}"
|
||||||
setenv tmp_rootfsvol ${rootfsvol_b}
|
setenv tmp_rootfsvol ${rootfsvol_b}
|
||||||
fi
|
fi
|
||||||
if test "${mtdbootpart}" != "${active_system}"; then
|
if test "${mtdbootpart}" != "${active_system}"; then
|
||||||
|
|
@ -28,7 +33,7 @@ if test "${dualboot}" = "yes"; then
|
||||||
env save
|
env save
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Booting system (try ${bootcount})"
|
echo "Booting system ${bootattempt}"
|
||||||
# Check the boot source.
|
# Check the boot source.
|
||||||
if test "${mtdbootpart}" = "linux"; then
|
if test "${mtdbootpart}" = "linux"; then
|
||||||
# We are booting from the NAND using 'linux'.
|
# We are booting from the NAND using 'linux'.
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,18 @@
|
||||||
# requires the script to change some variables and save them, while the rest
|
# requires the script to change some variables and save them, while the rest
|
||||||
# of the script changes variables only temporarily without saving them.
|
# of the script changes variables only temporarily without saving them.
|
||||||
|
|
||||||
|
# Build boot attempt message string
|
||||||
|
if test "${bootlimit}" -gt 0 && test "${bootcount}" -gt 0; then
|
||||||
|
bootattempt="(boot attempt ${bootcount}/${bootlimit})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dual boot verification
|
# Dual boot verification
|
||||||
if test "${dualboot}" = "yes"; then
|
if test "${dualboot}" = "yes"; then
|
||||||
if test "${active_system}" = "linux_a"; then
|
if test "${active_system}" = "linux_a"; then
|
||||||
echo "Booting from system A (try ${bootcount})"
|
echo "Booting from system A ${bootattempt}"
|
||||||
setenv tmp_rootfsvol ${rootfsvol_a}
|
setenv tmp_rootfsvol ${rootfsvol_a}
|
||||||
else
|
else
|
||||||
echo "Booting from system B (try ${bootcount})"
|
echo "Booting from system B ${bootattempt}"
|
||||||
setenv tmp_rootfsvol ${rootfsvol_b}
|
setenv tmp_rootfsvol ${rootfsvol_b}
|
||||||
fi
|
fi
|
||||||
if test "${mtdbootpart}" != "${active_system}"; then
|
if test "${mtdbootpart}" != "${active_system}"; then
|
||||||
|
|
@ -28,7 +33,7 @@ if test "${dualboot}" = "yes"; then
|
||||||
env save
|
env save
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Booting system (try ${bootcount})"
|
echo "Booting system ${bootattempt}"
|
||||||
# Check the boot source.
|
# Check the boot source.
|
||||||
if test "${mtdbootpart}" = "linux"; then
|
if test "${mtdbootpart}" = "linux"; then
|
||||||
# We are booting from the NAND using 'linux'.
|
# We are booting from the NAND using 'linux'.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue