u-boot-dey: add install uboot on redundant partition
This commit adds instructions to update the redundant u-boot partition. https://onedigi.atlassian.net/browse/DEL-8848 Signed-off-by: Mike Engel <Mike.Engel@digi.com>
This commit is contained in:
parent
2c4e1f85fd
commit
4b4d4b5a6b
|
|
@ -76,7 +76,10 @@ echo " on the partitions of the eMMC."
|
|||
echo ""
|
||||
echo " PARTITION FILENAME"
|
||||
echo " --------- --------"
|
||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||
echo " bootloader1 ${INSTALL_UBOOT_FILENAME}"
|
||||
if test "${install_redundant_bootloader}" = "yes"; then
|
||||
echo " bootloader2 ${INSTALL_UBOOT_FILENAME}"
|
||||
fi
|
||||
if test "${dualboot}" = "yes"; then
|
||||
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||
if test "${install_dualboot}" = "yes"; then
|
||||
|
|
@ -129,6 +132,21 @@ if test $? -eq 1; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "${install_redundant_bootloader}" = yes; then
|
||||
echo "";
|
||||
echo "";
|
||||
echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} on redundant partition";
|
||||
echo "";
|
||||
echo "";
|
||||
update uboot-redundant mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME};
|
||||
if test $? -eq 1; then
|
||||
echo "[ERROR] Failed to update redundant U-Boot boot loader!";
|
||||
echo "";
|
||||
echo "Aborted.";
|
||||
exit;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# Set 'bootcmd' to the second part of the script that will
|
||||
# - Reset environment to defaults
|
||||
# - Restore 'dualboot' if previously set
|
||||
|
|
|
|||
|
|
@ -76,7 +76,10 @@ echo " on the partitions of the eMMC."
|
|||
echo ""
|
||||
echo " PARTITION FILENAME"
|
||||
echo " --------- --------"
|
||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||
echo " bootloader1 ${INSTALL_UBOOT_FILENAME}"
|
||||
if test "${install_redundant_bootloader}" = "yes"; then
|
||||
echo " bootloader2 ${INSTALL_UBOOT_FILENAME}"
|
||||
fi
|
||||
if test "${dualboot}" = "yes"; then
|
||||
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||
if test "${install_dualboot}" = "yes"; then
|
||||
|
|
@ -129,6 +132,21 @@ if test $? -eq 1; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "${install_redundant_bootloader}" = yes; then
|
||||
echo "";
|
||||
echo "";
|
||||
echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} on redundant partition";
|
||||
echo "";
|
||||
echo "";
|
||||
update uboot-redundant usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME};
|
||||
if test $? -eq 1; then
|
||||
echo "[ERROR] Failed to update redundant U-Boot boot loader!";
|
||||
echo "";
|
||||
echo "Aborted.";
|
||||
exit;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# Set 'bootcmd' to the second part of the script that will
|
||||
# - Reset environment to defaults
|
||||
# - Restore 'dualboot' if previously set
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ show_usage()
|
|||
echo " -n No wait. Skips 10 seconds delay to stop script."
|
||||
echo " -u <u-boot-filename> U-Boot filename."
|
||||
echo " Auto-determined by variant if not provided."
|
||||
echo " -U Update redundant bootloader partition."
|
||||
|
||||
exit 2
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +59,7 @@ part_update()
|
|||
echo "====================================================================================="
|
||||
echo "\033[0m"
|
||||
|
||||
if [ "${1}" = "bootloader" ]; then
|
||||
if [ "${1}" = "bootloader" ] || [ "${1}" = "bootloader_redundant" ]; then
|
||||
uuu fb: flash "${1}" "${2}"
|
||||
else
|
||||
uuu fb: flash -raw2sparse "${1}" "${2}"
|
||||
|
|
@ -73,7 +75,7 @@ echo "############################################################"
|
|||
# -b, -d, -n (booleans)
|
||||
# -i <image-name>
|
||||
# -u <u-boot-filename>
|
||||
while getopts 'bdhi:nu:' c
|
||||
while getopts 'bdhi:nu:U' c
|
||||
do
|
||||
case $c in
|
||||
b) BOOTCOUNT=true ;;
|
||||
|
|
@ -82,6 +84,7 @@ do
|
|||
i) IMAGE_NAME=${OPTARG} ;;
|
||||
n) NOWAIT=true ;;
|
||||
u) INSTALL_UBOOT_FILENAME=${OPTARG} ;;
|
||||
U) INSTALL_REDUNDANT_UBOOT=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
|
@ -191,6 +194,9 @@ if [ "${NOWAIT}" != true ]; then
|
|||
printf " PARTITION\tFILENAME\n"
|
||||
printf " ---------\t--------\n"
|
||||
printf " bootloader\t${INSTALL_UBOOT_FILENAME}\n"
|
||||
if [ "${INSTALL_REDUNDANT_UBOOT}" = true ]; then
|
||||
printf " bootloader_redundant\t${INSTALL_UBOOT_FILENAME}\n"
|
||||
fi
|
||||
if [ "${DUALBOOT}" = true ]; then
|
||||
printf " ${LINUX_NAME}_a\t${INSTALL_LINUX_FILENAME}\n"
|
||||
if [ "${INSTALL_DUALBOOT}" = true ]; then
|
||||
|
|
@ -225,6 +231,9 @@ uuu fb: ucmd setenv forced_update 1
|
|||
|
||||
# Update U-Boot
|
||||
part_update "bootloader" "${INSTALL_UBOOT_FILENAME}"
|
||||
if [ "${INSTALL_REDUNDANT_UBOOT}" = true ]; then
|
||||
part_update bootloader_redundant "${INSTALL_UBOOT_FILENAME}"
|
||||
fi
|
||||
|
||||
# Set MMC to boot from BOOT1 partition
|
||||
uuu fb: ucmd mmc partconf 0 1 1 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue