u-boot-dey: ccmp1: add dualboot support to boot script
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
3e0d713837
commit
af034aa971
|
|
@ -1,7 +1,42 @@
|
||||||
#
|
#
|
||||||
# U-Boot bootscript for NAND images created by Yocto.
|
# U-Boot bootscript for NAND/SD images created by Yocto.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# As the first step in the boot script, check if we are using DualBoot and
|
||||||
|
# if an upgrade is available. This requires the script to change some variables
|
||||||
|
# and save them, while the rest of the script changes variables only temporarily
|
||||||
|
# without saving them.
|
||||||
|
|
||||||
|
# Dual boot update verification
|
||||||
|
if test "${dualboot}" = "yes"; then
|
||||||
|
if test "${upgrade_available}" = "1"; then
|
||||||
|
echo "Update detected; Booting new system in ${active_system} (try ${bootcount})"
|
||||||
|
else
|
||||||
|
if test "${active_system}" = "linux_a"; then
|
||||||
|
echo "Booting from system A"
|
||||||
|
setenv mtdbootpart ${active_system}
|
||||||
|
setenv rootfsvol ${rootfsvol_a}
|
||||||
|
else
|
||||||
|
echo "Booting from system B"
|
||||||
|
setenv mtdbootpart ${active_system}
|
||||||
|
setenv rootfsvol ${rootfsvol_b}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Check the boot source.
|
||||||
|
if test "${mtdbootpart}" = "linux"; then
|
||||||
|
# We are booting from the NAND using 'linux'.
|
||||||
|
true
|
||||||
|
elif test "${mtdbootpart}" = "recovery"; then
|
||||||
|
# We are booting from the NAND using 'recovery'.
|
||||||
|
setenv boot_initrd true
|
||||||
|
setenv initrd_file uramdisk-recovery.img
|
||||||
|
else
|
||||||
|
# We are booting from the SD card.
|
||||||
|
setenv mmcroot /dev/mmcblk${mmcbootdev}p2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Back up environment variables
|
# Back up environment variables
|
||||||
setenv ORIG_overlays ${overlays}
|
setenv ORIG_overlays ${overlays}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,42 @@
|
||||||
#
|
#
|
||||||
# U-Boot bootscript for NAND images created by Yocto.
|
# U-Boot bootscript for NAND/SD images created by Yocto.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# As the first step in the boot script, check if we are using DualBoot and
|
||||||
|
# if an upgrade is available. This requires the script to change some variables
|
||||||
|
# and save them, while the rest of the script changes variables only temporarily
|
||||||
|
# without saving them.
|
||||||
|
|
||||||
|
# Dual boot update verification
|
||||||
|
if test "${dualboot}" = "yes"; then
|
||||||
|
if test "${upgrade_available}" = "1"; then
|
||||||
|
echo "Update detected; Booting new system in ${active_system} (try ${bootcount})"
|
||||||
|
else
|
||||||
|
if test "${active_system}" = "linux_a"; then
|
||||||
|
echo "Booting from system A"
|
||||||
|
setenv mtdbootpart ${active_system}
|
||||||
|
setenv rootfsvol ${rootfsvol_a}
|
||||||
|
else
|
||||||
|
echo "Booting from system B"
|
||||||
|
setenv mtdbootpart ${active_system}
|
||||||
|
setenv rootfsvol ${rootfsvol_b}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Check the boot source.
|
||||||
|
if test "${mtdbootpart}" = "linux"; then
|
||||||
|
# We are booting from the NAND using 'linux'.
|
||||||
|
true
|
||||||
|
elif test "${mtdbootpart}" = "recovery"; then
|
||||||
|
# We are booting from the NAND using 'recovery'.
|
||||||
|
setenv boot_initrd true
|
||||||
|
setenv initrd_file uramdisk-recovery.img
|
||||||
|
else
|
||||||
|
# We are booting from the SD card.
|
||||||
|
setenv mmcroot /dev/mmcblk${mmcbootdev}p2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Back up environment variables
|
# Back up environment variables
|
||||||
setenv ORIG_overlays ${overlays}
|
setenv ORIG_overlays ${overlays}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue