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:
parent
dae2b5000a
commit
f647e6d442
|
|
@ -77,9 +77,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -116,15 +123,19 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
|
# - Restore 'dualboot' if previously set
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -138,24 +149,74 @@ setenv bootcmd "
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update recovery partition!\";
|
echo \"[ERROR] Failed to update recovery partition!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -164,10 +225,10 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME};
|
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update rootfs partition!\";
|
echo \"[ERROR] Failed to update rootfs partition!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -177,10 +238,14 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
|
|
@ -77,9 +77,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -116,15 +123,20 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
|
# - Restore 'dualboot' if previously set
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
|
# NOTE: insert some 'usb reset' commands to avoid EHCI timeouts
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -139,24 +151,75 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
usb start;
|
usb start;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update recovery partition!\";
|
echo \"[ERROR] Failed to update recovery partition!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -165,10 +228,10 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME};
|
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update rootfs partition!\";
|
echo \"[ERROR] Failed to update rootfs partition!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -178,10 +241,14 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -127,15 +134,19 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
|
# - Restore 'dualboot' if previously set
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -149,24 +160,74 @@ setenv bootcmd "
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update recovery partition!\";
|
echo \"[ERROR] Failed to update recovery partition!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -175,10 +236,10 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME};
|
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update rootfs partition!\";
|
echo \"[ERROR] Failed to update rootfs partition!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -188,10 +249,14 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -127,15 +134,20 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
|
# - Restore 'dualboot' if previously set
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
|
# NOTE: insert some 'usb reset' commands to avoid EHCI timeouts
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -150,24 +162,75 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
usb start;
|
usb start;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update recovery partition!\";
|
echo \"[ERROR] Failed to update recovery partition!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -176,10 +239,10 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME};
|
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update rootfs partition!\";
|
echo \"[ERROR] Failed to update rootfs partition!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -189,10 +252,14 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -121,44 +128,108 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - 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
|
# - Run 'partition_nand_linux' script to re-partition the NAND if needed
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv ubisysvols ${ubisysvols};
|
setenv ubisysvols ${ubisysvols};
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
run partition_nand_linux;
|
run partition_nand_linux;
|
||||||
saveenv;
|
saveenv;
|
||||||
if test -n \$\{ubisysvols\} && test \$\{ubisysvols\} = yes; then
|
if test \"\$\{ubisysvols\}\" = yes; then
|
||||||
run ubivolscript;
|
run ubivolscript;
|
||||||
fi;
|
fi;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
|
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
|
||||||
nand erase.part linux;
|
nand erase.part linux_a;
|
||||||
fi;
|
fi;
|
||||||
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
|
update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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;
|
nand erase.part recovery;
|
||||||
fi;
|
fi;
|
||||||
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
|
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
|
||||||
|
|
@ -170,10 +241,10 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
|
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
|
||||||
nand erase.part rootfs;
|
nand erase.part rootfs;
|
||||||
fi;
|
fi;
|
||||||
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
|
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
|
|
@ -184,15 +255,19 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
|
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
|
||||||
nand erase.part update;
|
nand erase.part update;
|
||||||
fi;
|
fi;
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -110,7 +117,7 @@ echo ""
|
||||||
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
|
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
|
||||||
if test $? -eq 1; then
|
if test $? -eq 1; then
|
||||||
# Use old-style update with source file system argument
|
# 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
|
if test $? -eq 1; then
|
||||||
echo "[ERROR] Failed to update U-Boot boot loader!";
|
echo "[ERROR] Failed to update U-Boot boot loader!";
|
||||||
echo "";
|
echo "";
|
||||||
|
|
@ -121,45 +128,109 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - 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
|
# - Run 'partition_nand_linux' script to re-partition the NAND if needed
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv ubisysvols ${ubisysvols};
|
setenv ubisysvols ${ubisysvols};
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
run partition_nand_linux;
|
run partition_nand_linux;
|
||||||
saveenv;
|
saveenv;
|
||||||
if test -n \$\{ubisysvols\} && test \$\{ubisysvols\} = yes; then
|
if test \"\$\{ubisysvols\}\" = yes; then
|
||||||
run ubivolscript;
|
run ubivolscript;
|
||||||
fi;
|
fi;
|
||||||
usb start;
|
usb start;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
|
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
|
||||||
nand erase.part linux;
|
nand erase.part linux_a;
|
||||||
fi;
|
fi;
|
||||||
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
|
update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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;
|
nand erase.part recovery;
|
||||||
fi;
|
fi;
|
||||||
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
|
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
|
||||||
|
|
@ -171,10 +242,10 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
|
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
|
||||||
nand erase.part rootfs;
|
nand erase.part rootfs;
|
||||||
fi;
|
fi;
|
||||||
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
|
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
|
|
@ -185,15 +256,19 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
if test ! -n \$\{ubisysvols\} || test \$\{ubisysvols\} = no; then
|
if test ! -n \$\{ubisysvols\} || test \"\$\{ubisysvols\}\" = no; then
|
||||||
nand erase.part update;
|
nand erase.part update;
|
||||||
fi;
|
fi;
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -91,17 +98,20 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
|
# - Restore 'dualboot' if previously set
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Force on-the-fly updates to avoid possible verification errors
|
# - Force on-the-fly updates to avoid possible verification errors
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Disable on-the-fly updates
|
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
saveenv;
|
saveenv;
|
||||||
setenv otf-update yes;
|
setenv otf-update yes;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -116,21 +126,71 @@ setenv bootcmd "
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
|
update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
|
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
|
||||||
|
|
@ -142,7 +202,7 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
|
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
|
|
@ -155,11 +215,15 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
setenv otf-update;
|
setenv otf-update;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -80,7 +87,7 @@ echo ""
|
||||||
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
|
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
|
||||||
if test $? -eq 1; then
|
if test $? -eq 1; then
|
||||||
# Use old-style update with source file system argument
|
# 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
|
if test $? -eq 1; then
|
||||||
echo "[ERROR] Failed to update U-Boot boot loader!";
|
echo "[ERROR] Failed to update U-Boot boot loader!";
|
||||||
echo "";
|
echo "";
|
||||||
|
|
@ -91,17 +98,20 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
|
# - Restore 'dualboot' if previously set
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Force on-the-fly updates to avoid possible verification errors
|
# - Force on-the-fly updates to avoid possible verification errors
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Disable on-the-fly updates
|
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
saveenv;
|
saveenv;
|
||||||
setenv otf-update yes;
|
setenv otf-update yes;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -117,21 +127,71 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
usb start;
|
usb start;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
|
update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
|
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
|
||||||
|
|
@ -143,7 +203,7 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
|
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
|
|
@ -156,11 +216,15 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
setenv otf-update;
|
setenv otf-update;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
|
|
@ -119,9 +119,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -162,17 +169,20 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
|
# - Restore 'dualboot' if previously set
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Force on-the-fly updates to avoid possible verification errors
|
# - Force on-the-fly updates to avoid possible verification errors
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Disable on-the-fly updates
|
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
saveenv;
|
saveenv;
|
||||||
setenv otf-update yes;
|
setenv otf-update yes;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -187,21 +197,71 @@ setenv bootcmd "
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
|
update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
|
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
|
||||||
|
|
@ -213,7 +273,7 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
|
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
|
|
@ -226,11 +286,15 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
setenv otf-update;
|
setenv otf-update;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
|
|
@ -119,9 +119,16 @@ echo ""
|
||||||
echo " PARTITION FILENAME"
|
echo " PARTITION FILENAME"
|
||||||
echo " --------- --------"
|
echo " --------- --------"
|
||||||
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
|
||||||
echo " linux ${INSTALL_LINUX_FILENAME}"
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
|
echo " linux_a ${INSTALL_LINUX_FILENAME}"
|
||||||
echo " rootfs ${INSTALL_ROOTFS_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 ""
|
||||||
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
|
||||||
echo " to continue."
|
echo " to continue."
|
||||||
|
|
@ -151,7 +158,7 @@ echo ""
|
||||||
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
|
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
|
||||||
if test $? -eq 1; then
|
if test $? -eq 1; then
|
||||||
# Use old-style update with source file system argument
|
# 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
|
if test $? -eq 1; then
|
||||||
echo "[ERROR] Failed to update U-Boot boot loader!";
|
echo "[ERROR] Failed to update U-Boot boot loader!";
|
||||||
echo "";
|
echo "";
|
||||||
|
|
@ -162,17 +169,21 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
|
# - Restore 'dualboot' if previously set
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Force on-the-fly updates to avoid possible verification errors
|
# - Force on-the-fly updates to avoid possible verification errors
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - Update the 'linux' partition
|
# - If Dual Boot
|
||||||
# - Update the 'recovery' partition
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
# - Update the 'rootfs' partition
|
# - If Normal Boot:
|
||||||
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
|
# - Erase the 'update' partition
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
# - Disable on-the-fly updates
|
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
|
# NOTE: insert some 'usb reset' commands to avoid EHCI timeouts
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
|
setenv dualboot ${dualboot};
|
||||||
saveenv;
|
saveenv;
|
||||||
setenv otf-update yes;
|
setenv otf-update yes;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -188,21 +199,72 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
usb start;
|
usb start;
|
||||||
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
|
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
|
update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
|
||||||
if test \$? -eq 1; then
|
if test \$? -eq 1; then
|
||||||
echo \"[ERROR] Failed to update linux partition!\";
|
echo \"[ERROR] Failed to update linux_a!\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"Aborted.\";
|
echo \"Aborted.\";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
|
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
|
||||||
|
|
@ -214,7 +276,7 @@ setenv bootcmd "
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
|
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
|
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
|
||||||
|
|
@ -227,11 +289,15 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
|
fi;
|
||||||
setenv otf-update;
|
setenv otf-update;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
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 \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue