uboot: add dualboot support to fw install script from SD/USB

Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://onedigi.atlassian.net/browse/DEL-7649
This commit is contained in:
Hector Palacios 2021-09-17 11:45:32 +02:00
parent dae2b5000a
commit f647e6d442
10 changed files with 1149 additions and 477 deletions

View File

@ -77,9 +77,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -116,15 +123,19 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Partition the eMMC user data area for Linux
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
echo \"\";
echo \"\";
@ -138,24 +149,74 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux mmc ${INSTALL_MMCDEV} fat ${INSTALL_LINUX_FILENAME};
update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update recovery mmc ${INSTALL_MMCDEV} fat ${INSTALL_RECOVERY_FILENAME};
update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update recovery partition!\";
echo \"\";
@ -164,10 +225,10 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME};
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs partition!\";
echo \"\";
@ -177,10 +238,14 @@ setenv bootcmd "
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;

View File

@ -77,9 +77,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -116,15 +123,20 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Partition the eMMC user data area for Linux
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after
# NOTE: insert some 'usb reset' commands to avoid EHCI timeouts
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
echo \"\";
echo \"\";
@ -139,24 +151,75 @@ setenv bootcmd "
exit;
fi;
usb start;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME};
update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME};
update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
usb reset;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update recovery partition!\";
echo \"\";
@ -165,10 +228,10 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME};
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs partition!\";
echo \"\";
@ -178,10 +241,14 @@ setenv bootcmd "
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;

View File

@ -88,9 +88,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -127,15 +134,19 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Partition the eMMC user data area for Linux
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
echo \"\";
echo \"\";
@ -149,24 +160,74 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux mmc ${INSTALL_MMCDEV} fat ${INSTALL_LINUX_FILENAME};
update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update recovery mmc ${INSTALL_MMCDEV} fat ${INSTALL_RECOVERY_FILENAME};
update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update recovery partition!\";
echo \"\";
@ -175,10 +236,10 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME};
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs partition!\";
echo \"\";
@ -188,10 +249,14 @@ setenv bootcmd "
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;

View File

@ -88,9 +88,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -127,15 +134,20 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Partition the eMMC user data area for Linux
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after
# NOTE: insert some 'usb reset' commands to avoid EHCI timeouts
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
echo \"\";
echo \"\";
@ -150,24 +162,75 @@ setenv bootcmd "
exit;
fi;
usb start;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME};
update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME};
update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
usb reset;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update recovery partition!\";
echo \"\";
@ -176,10 +239,10 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME};
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs partition!\";
echo \"\";
@ -189,10 +252,14 @@ setenv bootcmd "
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;

View File

@ -81,9 +81,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -121,44 +128,108 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'ubisysvols' if previously set
# - Restore 'ubisysvols' and 'dualboot' if previously set
# - Run 'partition_nand_linux' script to re-partition the NAND if needed
# - Save the environment
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after
setenv bootcmd "
env default -a;
setenv ubisysvols ${ubisysvols};
setenv dualboot ${dualboot};
run partition_nand_linux;
saveenv;
if test -n \$\{ubisysvols\} && test \$\{ubisysvols\} = yes; then
if test \"\$\{ubisysvols\}\" = yes; then
run ubivolscript;
fi;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
nand erase.part linux;
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part linux_a;
fi;
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part linux_b;
fi;
update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part rootfs_a;
fi;
update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part rootfs_b;
fi;
update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part linux;
fi;
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part recovery;
fi;
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
@ -170,10 +241,10 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part rootfs;
fi;
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
@ -184,15 +255,19 @@ setenv bootcmd "
exit;
fi;
echo \"\";
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part update;
fi;
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;

View File

@ -81,9 +81,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -110,7 +117,7 @@ echo ""
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
# Use old-style update with source file system argument
update uboot mmc ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME}
update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
echo "[ERROR] Failed to update U-Boot boot loader!";
echo "";
@ -121,45 +128,109 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'ubisysvols' if previously set
# - Restore 'ubisysvols' and 'dualboot' if previously set
# - Run 'partition_nand_linux' script to re-partition the NAND if needed
# - Save the environment
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after
setenv bootcmd "
env default -a;
setenv ubisysvols ${ubisysvols};
setenv dualboot ${dualboot};
run partition_nand_linux;
saveenv;
if test -n \$\{ubisysvols\} && test \$\{ubisysvols\} = yes; then
if test \"\$\{ubisysvols\}\" = yes; then
run ubivolscript;
fi;
usb start;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
nand erase.part linux;
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part linux_a;
fi;
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part linux_b;
fi;
update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part rootfs_a;
fi;
update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part rootfs_b;
fi;
update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part linux;
fi;
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part recovery;
fi;
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
@ -171,10 +242,10 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part rootfs;
fi;
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
@ -185,15 +256,19 @@ setenv bootcmd "
exit;
fi;
echo \"\";
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
nand erase.part update;
fi;
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;

View File

@ -48,9 +48,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -91,17 +98,20 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Force on-the-fly updates to avoid possible verification errors
# - Partition the eMMC user data area for Linux
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Disable on-the-fly updates
# - Run 'recovery' and let the system boot after
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -116,21 +126,71 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
@ -142,7 +202,7 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
@ -155,11 +215,15 @@ setenv bootcmd "
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
setenv otf-update;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;

View File

@ -48,9 +48,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -80,7 +87,7 @@ echo ""
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
# Use old-style update with source file system argument
update uboot mmc ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME}
update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
echo "[ERROR] Failed to update U-Boot boot loader!";
echo "";
@ -91,17 +98,20 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Force on-the-fly updates to avoid possible verification errors
# - Partition the eMMC user data area for Linux
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Disable on-the-fly updates
# - Run 'recovery' and let the system boot after
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -117,21 +127,71 @@ setenv bootcmd "
exit;
fi;
usb start;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
@ -143,7 +203,7 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
@ -156,11 +216,15 @@ setenv bootcmd "
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
setenv otf-update;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;

View File

@ -119,9 +119,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -162,17 +169,20 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Force on-the-fly updates to avoid possible verification errors
# - Partition the eMMC user data area for Linux
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Disable on-the-fly updates
# - Run 'recovery' and let the system boot after
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -187,21 +197,71 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
@ -213,7 +273,7 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
@ -226,11 +286,15 @@ setenv bootcmd "
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
setenv otf-update;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;

View File

@ -119,9 +119,16 @@ echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
if test \"\$\{dualboot\}\" = yes; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
@ -151,7 +158,7 @@ echo ""
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
# Use old-style update with source file system argument
update uboot mmc ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME}
update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
echo "[ERROR] Failed to update U-Boot boot loader!";
echo "";
@ -162,17 +169,21 @@ fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Force on-the-fly updates to avoid possible verification errors
# - Partition the eMMC user data area for Linux
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Disable on-the-fly updates
# - Run 'recovery' and let the system boot after
# NOTE: insert some 'usb reset' commands to avoid EHCI timeouts
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -188,21 +199,72 @@ setenv bootcmd "
exit;
fi;
usb start;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\";
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
usb reset;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
@ -214,7 +276,7 @@ setenv bootcmd "
fi;
echo \"\";
echo \"\";
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
@ -227,11 +289,15 @@ setenv bootcmd "
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
setenv otf-update;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\";
echo \">> Firmware installation complete.\";
if test ! -n \$\{dualboot\} || test \$\{dualboot\} = no; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;