install_linux_fw: enable bootcount by setting bootlimit if dualboot enabled
Use the intention of installing dual boot firmware as a condition to set bootlimit=3 so that the bootcount mechanism is enabled. Signed-off-by: Hector Palacios <hector.palacios@digi.com> https://onedigi.atlassian.net/browse/DUB-1058
This commit is contained in:
parent
961acf48de
commit
bb36b04777
|
|
@ -144,6 +144,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -219,6 +220,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -222,6 +223,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ show_usage()
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Options:"
|
echo " Options:"
|
||||||
|
echo " -b Activate bootcount mechanism (3 boot attempts)."
|
||||||
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
||||||
|
echo " (Implies -b)."
|
||||||
echo " -h Show this help."
|
echo " -h Show this help."
|
||||||
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
||||||
echo " 'dey-image-webkit', 'core-image-base'..."
|
echo " 'dey-image-webkit', 'core-image-base'..."
|
||||||
|
|
@ -70,10 +72,11 @@ echo "############################################################"
|
||||||
# Command line admits the following parameters:
|
# Command line admits the following parameters:
|
||||||
# -u <u-boot-filename>
|
# -u <u-boot-filename>
|
||||||
# -i <image-name>
|
# -i <image-name>
|
||||||
while getopts 'dhi:nu:' c
|
while getopts 'bdhi:nu:' c
|
||||||
do
|
do
|
||||||
case $c in
|
case $c in
|
||||||
d) INSTALL_DUALBOOT=true ;;
|
b) BOOTCOUNT=true ;;
|
||||||
|
d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;;
|
||||||
h) show_usage ;;
|
h) show_usage ;;
|
||||||
i) IMAGE_NAME=${OPTARG} ;;
|
i) IMAGE_NAME=${OPTARG} ;;
|
||||||
n) NOWAIT=true ;;
|
n) NOWAIT=true ;;
|
||||||
|
|
@ -184,6 +187,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable bootcount mechanism by setting a bootlimit
|
||||||
|
if [ "${BOOTCOUNT}" = true ]; then
|
||||||
|
bootlimit_cmd="setenv bootlimit 3"
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
@ -241,6 +249,7 @@ uuu fb: ucmd mmc partconf 0 1 1 1
|
||||||
# Set 'bootcmd' for the second part of the script that will
|
# Set 'bootcmd' for the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
# - Reset the bootcount
|
# - Reset the bootcount
|
||||||
|
# - Set bootlimit (if required)
|
||||||
# - 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
|
# - Update the 'linux' partition
|
||||||
|
|
@ -250,6 +259,7 @@ uuu fb: ucmd setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv dualboot \${dualboot};
|
setenv dualboot \${dualboot};
|
||||||
setenv bootcount 0
|
setenv bootcount 0
|
||||||
|
${bootlimit_cmd};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -230,6 +231,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -233,6 +234,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ show_usage()
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Options:"
|
echo " Options:"
|
||||||
|
echo " -b Activate bootcount mechanism (3 boot attempts)."
|
||||||
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
||||||
|
echo " (Implies -b)."
|
||||||
echo " -h Show this help."
|
echo " -h Show this help."
|
||||||
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
||||||
echo " 'dey-image-webkit', 'core-image-base'..."
|
echo " 'dey-image-webkit', 'core-image-base'..."
|
||||||
|
|
@ -70,10 +72,11 @@ echo "############################################################"
|
||||||
# Command line admits the following parameters:
|
# Command line admits the following parameters:
|
||||||
# -u <u-boot-filename>
|
# -u <u-boot-filename>
|
||||||
# -i <image-name>
|
# -i <image-name>
|
||||||
while getopts 'dhi:nu:' c
|
while getopts 'bdhi:nu:' c
|
||||||
do
|
do
|
||||||
case $c in
|
case $c in
|
||||||
d) INSTALL_DUALBOOT=true ;;
|
b) BOOTCOUNT=true ;;
|
||||||
|
d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;;
|
||||||
h) show_usage ;;
|
h) show_usage ;;
|
||||||
i) IMAGE_NAME=${OPTARG} ;;
|
i) IMAGE_NAME=${OPTARG} ;;
|
||||||
n) NOWAIT=true ;;
|
n) NOWAIT=true ;;
|
||||||
|
|
@ -202,6 +205,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable bootcount mechanism by setting a bootlimit
|
||||||
|
if [ "${BOOTCOUNT}" = true ]; then
|
||||||
|
bootlimit_cmd="setenv bootlimit 3"
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
@ -259,6 +267,7 @@ uuu fb: ucmd mmc partconf 0 1 1 1
|
||||||
# Set 'bootcmd' for the second part of the script that will
|
# Set 'bootcmd' for the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
# - Reset the bootcount
|
# - Reset the bootcount
|
||||||
|
# - Set bootlimit (if required)
|
||||||
# - 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
|
# - Update the 'linux' partition
|
||||||
|
|
@ -268,6 +277,7 @@ uuu fb: ucmd setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv dualboot \${dualboot};
|
setenv dualboot \${dualboot};
|
||||||
setenv bootcount 0
|
setenv bootcount 0
|
||||||
|
${bootlimit_cmd};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,7 @@ fi
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -222,6 +223,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,7 @@ fi
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -225,6 +226,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ show_usage()
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Options:"
|
echo " Options:"
|
||||||
|
echo " -b Activate bootcount mechanism (3 boot attempts)."
|
||||||
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
||||||
|
echo " (Implies -b)."
|
||||||
echo " -h Show this help."
|
echo " -h Show this help."
|
||||||
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
||||||
echo " 'dey-image-webkit', 'core-image-base'..."
|
echo " 'dey-image-webkit', 'core-image-base'..."
|
||||||
|
|
@ -79,10 +81,11 @@ echo "############################################################"
|
||||||
# Command line admits the following parameters:
|
# Command line admits the following parameters:
|
||||||
# -u <u-boot-filename>
|
# -u <u-boot-filename>
|
||||||
# -i <image-name>
|
# -i <image-name>
|
||||||
while getopts 'dhi:nu:' c
|
while getopts 'bdhi:nu:' c
|
||||||
do
|
do
|
||||||
case $c in
|
case $c in
|
||||||
d) INSTALL_DUALBOOT=true ;;
|
b) BOOTCOUNT=true ;;
|
||||||
|
d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;;
|
||||||
h) show_usage ;;
|
h) show_usage ;;
|
||||||
i) IMAGE_NAME=${OPTARG} ;;
|
i) IMAGE_NAME=${OPTARG} ;;
|
||||||
n) NOWAIT=true ;;
|
n) NOWAIT=true ;;
|
||||||
|
|
@ -193,6 +196,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable bootcount mechanism by setting a bootlimit
|
||||||
|
if [ "${BOOTCOUNT}" = true ]; then
|
||||||
|
bootlimit_cmd="setenv bootlimit 3"
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
@ -250,6 +258,7 @@ part_update "uboot" "${INSTALL_UBOOT_FILENAME}" 5000
|
||||||
# Set 'bootcmd' for the second part of the script that will
|
# Set 'bootcmd' for the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
# - Reset the bootcount
|
# - Reset the bootcount
|
||||||
|
# - Set bootlimit (if required)
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Update the 'linux' partition
|
# - Update the 'linux' partition
|
||||||
# - Update the 'recovery' partition
|
# - Update the 'recovery' partition
|
||||||
|
|
@ -260,6 +269,7 @@ uuu fb: ucmd setenv bootcmd "
|
||||||
setenv dualboot \${dualboot};
|
setenv dualboot \${dualboot};
|
||||||
bootcount reset;
|
bootcount reset;
|
||||||
setenv singlemtdsys \${singlemtdsys};
|
setenv singlemtdsys \${singlemtdsys};
|
||||||
|
${bootlimit_cmd};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -196,6 +197,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -197,6 +198,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ show_usage()
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Options:"
|
echo " Options:"
|
||||||
|
echo " -b Activate bootcount mechanism (3 boot attempts)."
|
||||||
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
||||||
|
echo " (Implies -b)."
|
||||||
echo " -h Show this help."
|
echo " -h Show this help."
|
||||||
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
||||||
echo " 'dey-image-webkit', 'core-image-base'..."
|
echo " 'dey-image-webkit', 'core-image-base'..."
|
||||||
|
|
@ -70,10 +72,11 @@ echo "############################################################"
|
||||||
# Command line admits the following parameters:
|
# Command line admits the following parameters:
|
||||||
# -u <u-boot-filename>
|
# -u <u-boot-filename>
|
||||||
# -i <image-name>
|
# -i <image-name>
|
||||||
while getopts 'dhi:nu:' c
|
while getopts 'bdhi:nu:' c
|
||||||
do
|
do
|
||||||
case $c in
|
case $c in
|
||||||
d) INSTALL_DUALBOOT=true ;;
|
b) BOOTCOUNT=true ;;
|
||||||
|
d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;;
|
||||||
h) show_usage ;;
|
h) show_usage ;;
|
||||||
i) IMAGE_NAME=${OPTARG} ;;
|
i) IMAGE_NAME=${OPTARG} ;;
|
||||||
n) NOWAIT=true ;;
|
n) NOWAIT=true ;;
|
||||||
|
|
@ -150,6 +153,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable bootcount mechanism by setting a bootlimit
|
||||||
|
if [ "${BOOTCOUNT}" = true ]; then
|
||||||
|
bootlimit_cmd="setenv bootlimit 3"
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
@ -210,6 +218,7 @@ uuu fb: ucmd mmc partconf 0 1 1 1
|
||||||
# Set 'bootcmd' for the second part of the script that will
|
# Set 'bootcmd' for the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
# - Reset the bootcount
|
# - Reset the bootcount
|
||||||
|
# - Set bootlimit (if required)
|
||||||
# - 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
|
# - Update the 'linux' partition
|
||||||
|
|
@ -219,6 +228,7 @@ uuu fb: ucmd setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv dualboot \${dualboot};
|
setenv dualboot \${dualboot};
|
||||||
bootcount reset;
|
bootcount reset;
|
||||||
|
${bootlimit_cmd};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -208,6 +209,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -211,6 +212,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ show_usage()
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Options:"
|
echo " Options:"
|
||||||
|
echo " -b Activate bootcount mechanism (3 boot attempts)."
|
||||||
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
||||||
|
echo " (Implies -b)."
|
||||||
echo " -h Show this help."
|
echo " -h Show this help."
|
||||||
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
||||||
echo " 'dey-image-webkit', 'core-image-base'..."
|
echo " 'dey-image-webkit', 'core-image-base'..."
|
||||||
|
|
@ -70,10 +72,11 @@ echo "############################################################"
|
||||||
# Command line admits the following parameters:
|
# Command line admits the following parameters:
|
||||||
# -u <u-boot-filename>
|
# -u <u-boot-filename>
|
||||||
# -i <image-name>
|
# -i <image-name>
|
||||||
while getopts 'dhi:nu:' c
|
while getopts 'bdhi:nu:' c
|
||||||
do
|
do
|
||||||
case $c in
|
case $c in
|
||||||
d) INSTALL_DUALBOOT=true ;;
|
b) BOOTCOUNT=true ;;
|
||||||
|
d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;;
|
||||||
h) show_usage ;;
|
h) show_usage ;;
|
||||||
i) IMAGE_NAME=${OPTARG} ;;
|
i) IMAGE_NAME=${OPTARG} ;;
|
||||||
n) NOWAIT=true ;;
|
n) NOWAIT=true ;;
|
||||||
|
|
@ -157,6 +160,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable bootcount mechanism by setting a bootlimit
|
||||||
|
if [ "${BOOTCOUNT}" = true ]; then
|
||||||
|
bootlimit_cmd="setenv bootlimit 3"
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
@ -214,6 +222,7 @@ uuu fb: ucmd mmc partconf 0 1 1 1
|
||||||
# Set 'bootcmd' for the second part of the script that will
|
# Set 'bootcmd' for the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
# - Reset the bootcount
|
# - Reset the bootcount
|
||||||
|
# - Set bootlimit (if required)
|
||||||
# - 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
|
# - Update the 'linux' partition
|
||||||
|
|
@ -223,6 +232,7 @@ uuu fb: ucmd setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv dualboot \${dualboot};
|
setenv dualboot \${dualboot};
|
||||||
bootcount reset;
|
bootcount reset;
|
||||||
|
${bootlimit_cmd};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -194,6 +195,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ fi
|
||||||
# - Partition the eMMC user data area for Linux
|
# - Partition the eMMC user data area for Linux
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Erase the 'update' partition
|
# - Erase the 'update' partition
|
||||||
|
|
@ -195,6 +196,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ show_usage()
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Options:"
|
echo " Options:"
|
||||||
|
echo " -b Activate bootcount mechanism (3 boot attempts)."
|
||||||
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
||||||
|
echo " (Implies -b)."
|
||||||
echo " -h Show this help."
|
echo " -h Show this help."
|
||||||
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
|
||||||
echo " 'dey-image-webkit', 'core-image-base'..."
|
echo " 'dey-image-webkit', 'core-image-base'..."
|
||||||
|
|
@ -70,10 +72,11 @@ echo "############################################################"
|
||||||
# Command line admits the following parameters:
|
# Command line admits the following parameters:
|
||||||
# -u <u-boot-filename>
|
# -u <u-boot-filename>
|
||||||
# -i <image-name>
|
# -i <image-name>
|
||||||
while getopts 'dhi:nu:' c
|
while getopts 'bdhi:nu:' c
|
||||||
do
|
do
|
||||||
case $c in
|
case $c in
|
||||||
d) INSTALL_DUALBOOT=true ;;
|
b) BOOTCOUNT=true ;;
|
||||||
|
d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;;
|
||||||
h) show_usage ;;
|
h) show_usage ;;
|
||||||
i) IMAGE_NAME=${OPTARG} ;;
|
i) IMAGE_NAME=${OPTARG} ;;
|
||||||
n) NOWAIT=true ;;
|
n) NOWAIT=true ;;
|
||||||
|
|
@ -150,6 +153,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable bootcount mechanism by setting a bootlimit
|
||||||
|
if [ "${BOOTCOUNT}" = true ]; then
|
||||||
|
bootlimit_cmd="setenv bootlimit 3"
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
@ -210,6 +218,7 @@ uuu fb: ucmd mmc partconf 0 1 1 1
|
||||||
# Set 'bootcmd' for the second part of the script that will
|
# Set 'bootcmd' for the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
# - Reset the bootcount
|
# - Reset the bootcount
|
||||||
|
# - Set bootlimit (if required)
|
||||||
# - 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
|
# - Update the 'linux' partition
|
||||||
|
|
@ -219,6 +228,7 @@ uuu fb: ucmd setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv dualboot \${dualboot};
|
setenv dualboot \${dualboot};
|
||||||
bootcount reset;
|
bootcount reset;
|
||||||
|
${bootlimit_cmd};
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,7 @@ fi
|
||||||
# environment
|
# environment
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
|
|
@ -215,6 +216,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -255,8 +257,8 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
saveenv;
|
|
||||||
fi;
|
fi;
|
||||||
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Firmware installation complete.\";
|
echo \">> Firmware installation complete.\";
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,7 @@ fi
|
||||||
# environment
|
# environment
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
|
||||||
|
- Set bootlimit to 3
|
||||||
# - If Normal Boot:
|
# - If Normal Boot:
|
||||||
# - Update the system partitions: linux, recovery, rootfs
|
# - Update the system partitions: linux, recovery, rootfs
|
||||||
# - Configure recovery to wipe 'update' partition
|
# - Configure recovery to wipe 'update' partition
|
||||||
|
|
@ -218,6 +219,7 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
setenv bootlimit 3;
|
||||||
else
|
else
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -258,8 +260,8 @@ setenv bootcmd "
|
||||||
echo \"\";
|
echo \"\";
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
saveenv;
|
|
||||||
fi;
|
fi;
|
||||||
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \">> Firmware installation complete.\";
|
echo \">> Firmware installation complete.\";
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,9 @@ show_usage()
|
||||||
echo " Options:"
|
echo " Options:"
|
||||||
echo " -a <atf-filename> Arm-trusted-firmware filename."
|
echo " -a <atf-filename> Arm-trusted-firmware filename."
|
||||||
echo " Auto-determined by variant if not provided."
|
echo " Auto-determined by variant if not provided."
|
||||||
|
echo " -b Activate bootcount mechanism (3 boot attempts)."
|
||||||
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
echo " -d Install firmware on dualboot partitions (system A and system B)."
|
||||||
|
echo " (Implies -b)."
|
||||||
echo " -f <fip-filename> FIP filename."
|
echo " -f <fip-filename> FIP filename."
|
||||||
echo " Auto-determined by variant if not provided."
|
echo " Auto-determined by variant if not provided."
|
||||||
echo " -h Show this help."
|
echo " -h Show this help."
|
||||||
|
|
@ -80,11 +82,12 @@ echo "############################################################"
|
||||||
# -a <atf-filename>
|
# -a <atf-filename>
|
||||||
# -f <fip-filename>
|
# -f <fip-filename>
|
||||||
# -i <image-name>
|
# -i <image-name>
|
||||||
while getopts 'a:df:hi:n' c
|
while getopts 'a:bdf:hi:n' c
|
||||||
do
|
do
|
||||||
case $c in
|
case $c in
|
||||||
a) INSTALL_ATF_FILENAME=${OPTARG} ;;
|
a) INSTALL_ATF_FILENAME=${OPTARG} ;;
|
||||||
d) INSTALL_DUALBOOT=true ;;
|
b) BOOTCOUNT=true ;;
|
||||||
|
d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;;
|
||||||
f) INSTALL_FIP_FILENAME=${OPTARG} ;;
|
f) INSTALL_FIP_FILENAME=${OPTARG} ;;
|
||||||
h) show_usage ;;
|
h) show_usage ;;
|
||||||
i) IMAGE_NAME=${OPTARG} ;;
|
i) IMAGE_NAME=${OPTARG} ;;
|
||||||
|
|
@ -163,6 +166,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable bootcount mechanism by setting a bootlimit
|
||||||
|
if [ "${BOOTCOUNT}" = true ]; then
|
||||||
|
bootlimit_cmd="setenv bootlimit 3"
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
@ -235,6 +243,7 @@ fi
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
# - Keep the 'dualboot' status
|
# - Keep the 'dualboot' status
|
||||||
# - Reset the bootcount
|
# - Reset the bootcount
|
||||||
|
# - Set bootlimit (if required)
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - Update the 'linux' partition(s)
|
# - Update the 'linux' partition(s)
|
||||||
# - Update the 'rootfs' partition(s)
|
# - Update the 'rootfs' partition(s)
|
||||||
|
|
@ -242,6 +251,7 @@ uuu fb: ucmd setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv dualboot \${dualboot};
|
setenv dualboot \${dualboot};
|
||||||
bootcount reset;
|
bootcount reset;
|
||||||
|
${bootlimit_cmd};
|
||||||
saveenv;
|
saveenv;
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue