diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_sd.txt index aaefeff57..503e9ceaf 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_sd.txt @@ -144,6 +144,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -219,6 +220,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt index b752e0aac..d4f491057 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt @@ -144,6 +144,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -222,6 +223,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_uuu.sh index 5cf3788bb..f4bed37e0 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_uuu.sh @@ -32,7 +32,9 @@ show_usage() echo "Usage: $0 [options]" echo "" echo " Options:" + echo " -b Activate bootcount mechanism (3 boot attempts)." echo " -d Install firmware on dualboot partitions (system A and system B)." + echo " (Implies -b)." echo " -h Show this help." echo " -i Image name that prefixes the image filenames, such as 'dey-image-qt', " echo " 'dey-image-webkit', 'core-image-base'..." @@ -70,10 +72,11 @@ echo "############################################################" # Command line admits the following parameters: # -u # -i -while getopts 'dhi:nu:' c +while getopts 'bdhi:nu:' c do case $c in - d) INSTALL_DUALBOOT=true ;; + b) BOOTCOUNT=true ;; + d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;; h) show_usage ;; i) IMAGE_NAME=${OPTARG} ;; n) NOWAIT=true ;; @@ -184,6 +187,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +# Enable bootcount mechanism by setting a bootlimit +if [ "${BOOTCOUNT}" = true ]; then + bootlimit_cmd="setenv bootlimit 3" +fi + [ "${ABORT}" = true ] && exit 1 # 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 # - Reset environment to defaults # - Reset the bootcount +# - Set bootlimit (if required) # - Save the environment # - Partition the eMMC user data area for Linux # - Update the 'linux' partition @@ -250,6 +259,7 @@ uuu fb: ucmd setenv bootcmd " env default -a; setenv dualboot \${dualboot}; setenv bootcount 0 + ${bootlimit_cmd}; saveenv; echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_sd.txt index b4c819221..0f038724b 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_sd.txt @@ -155,6 +155,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -230,6 +231,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt index 689669278..b7e65f7ad 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt @@ -155,6 +155,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -233,6 +234,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_uuu.sh index 655604812..d09fd528a 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_uuu.sh @@ -32,7 +32,9 @@ show_usage() echo "Usage: $0 [options]" echo "" echo " Options:" + echo " -b Activate bootcount mechanism (3 boot attempts)." echo " -d Install firmware on dualboot partitions (system A and system B)." + echo " (Implies -b)." echo " -h Show this help." echo " -i Image name that prefixes the image filenames, such as 'dey-image-qt', " echo " 'dey-image-webkit', 'core-image-base'..." @@ -70,10 +72,11 @@ echo "############################################################" # Command line admits the following parameters: # -u # -i -while getopts 'dhi:nu:' c +while getopts 'bdhi:nu:' c do case $c in - d) INSTALL_DUALBOOT=true ;; + b) BOOTCOUNT=true ;; + d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;; h) show_usage ;; i) IMAGE_NAME=${OPTARG} ;; n) NOWAIT=true ;; @@ -202,6 +205,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +# Enable bootcount mechanism by setting a bootlimit +if [ "${BOOTCOUNT}" = true ]; then + bootlimit_cmd="setenv bootlimit 3" +fi + [ "${ABORT}" = true ] && exit 1 # 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 # - Reset environment to defaults # - Reset the bootcount +# - Set bootlimit (if required) # - Save the environment # - Partition the eMMC user data area for Linux # - Update the 'linux' partition @@ -268,6 +277,7 @@ uuu fb: ucmd setenv bootcmd " env default -a; setenv dualboot \${dualboot}; setenv bootcount 0 + ${bootlimit_cmd}; saveenv; echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_sd.txt index 35bceb6df..c01c01e2d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_sd.txt @@ -151,6 +151,7 @@ fi # - Save the environment # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -222,6 +223,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_usb.txt index 36fdd73b4..45517feba 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_usb.txt @@ -153,6 +153,7 @@ fi # - Save the environment # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -225,6 +226,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh index 6ae7ed748..c6bab372e 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh @@ -32,7 +32,9 @@ show_usage() echo "Usage: $0 [options]" echo "" echo " Options:" + echo " -b Activate bootcount mechanism (3 boot attempts)." echo " -d Install firmware on dualboot partitions (system A and system B)." + echo " (Implies -b)." echo " -h Show this help." echo " -i Image name that prefixes the image filenames, such as 'dey-image-qt', " echo " 'dey-image-webkit', 'core-image-base'..." @@ -79,10 +81,11 @@ echo "############################################################" # Command line admits the following parameters: # -u # -i -while getopts 'dhi:nu:' c +while getopts 'bdhi:nu:' c do case $c in - d) INSTALL_DUALBOOT=true ;; + b) BOOTCOUNT=true ;; + d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;; h) show_usage ;; i) IMAGE_NAME=${OPTARG} ;; n) NOWAIT=true ;; @@ -193,6 +196,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +# Enable bootcount mechanism by setting a bootlimit +if [ "${BOOTCOUNT}" = true ]; then + bootlimit_cmd="setenv bootlimit 3" +fi + [ "${ABORT}" = true ] && exit 1 # parts names @@ -250,6 +258,7 @@ part_update "uboot" "${INSTALL_UBOOT_FILENAME}" 5000 # Set 'bootcmd' for the second part of the script that will # - Reset environment to defaults # - Reset the bootcount +# - Set bootlimit (if required) # - Save the environment # - Update the 'linux' partition # - Update the 'recovery' partition @@ -260,6 +269,7 @@ uuu fb: ucmd setenv bootcmd " setenv dualboot \${dualboot}; bootcount reset; setenv singlemtdsys \${singlemtdsys}; + ${bootlimit_cmd}; saveenv; echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_sd.txt index 418d833c2..0d2d263bd 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_sd.txt @@ -120,6 +120,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -196,6 +197,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_usb.txt index c870409fa..5b67a563e 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_usb.txt @@ -120,6 +120,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -197,6 +198,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_uuu.sh index a20af2bf3..1ee6c2f79 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_uuu.sh @@ -32,7 +32,9 @@ show_usage() echo "Usage: $0 [options]" echo "" echo " Options:" + echo " -b Activate bootcount mechanism (3 boot attempts)." echo " -d Install firmware on dualboot partitions (system A and system B)." + echo " (Implies -b)." echo " -h Show this help." echo " -i Image name that prefixes the image filenames, such as 'dey-image-qt', " echo " 'dey-image-webkit', 'core-image-base'..." @@ -70,10 +72,11 @@ echo "############################################################" # Command line admits the following parameters: # -u # -i -while getopts 'dhi:nu:' c +while getopts 'bdhi:nu:' c do case $c in - d) INSTALL_DUALBOOT=true ;; + b) BOOTCOUNT=true ;; + d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;; h) show_usage ;; i) IMAGE_NAME=${OPTARG} ;; n) NOWAIT=true ;; @@ -150,6 +153,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +# Enable bootcount mechanism by setting a bootlimit +if [ "${BOOTCOUNT}" = true ]; then + bootlimit_cmd="setenv bootlimit 3" +fi + [ "${ABORT}" = true ] && exit 1 # 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 # - Reset environment to defaults # - Reset the bootcount +# - Set bootlimit (if required) # - Save the environment # - Partition the eMMC user data area for Linux # - Update the 'linux' partition @@ -219,6 +228,7 @@ uuu fb: ucmd setenv bootcmd " env default -a; setenv dualboot \${dualboot}; bootcount reset; + ${bootlimit_cmd}; saveenv; echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_sd.txt index 9c75c13cf..852de0445 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_sd.txt @@ -132,6 +132,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -208,6 +209,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_usb.txt index f8b12076a..963b0c50e 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_usb.txt @@ -132,6 +132,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -211,6 +212,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh index 6d7ad5a4d..068e09ac0 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh @@ -32,7 +32,9 @@ show_usage() echo "Usage: $0 [options]" echo "" echo " Options:" + echo " -b Activate bootcount mechanism (3 boot attempts)." echo " -d Install firmware on dualboot partitions (system A and system B)." + echo " (Implies -b)." echo " -h Show this help." echo " -i Image name that prefixes the image filenames, such as 'dey-image-qt', " echo " 'dey-image-webkit', 'core-image-base'..." @@ -70,10 +72,11 @@ echo "############################################################" # Command line admits the following parameters: # -u # -i -while getopts 'dhi:nu:' c +while getopts 'bdhi:nu:' c do case $c in - d) INSTALL_DUALBOOT=true ;; + b) BOOTCOUNT=true ;; + d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;; h) show_usage ;; i) IMAGE_NAME=${OPTARG} ;; n) NOWAIT=true ;; @@ -157,6 +160,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +# Enable bootcount mechanism by setting a bootlimit +if [ "${BOOTCOUNT}" = true ]; then + bootlimit_cmd="setenv bootlimit 3" +fi + [ "${ABORT}" = true ] && exit 1 # 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 # - Reset environment to defaults # - Reset the bootcount +# - Set bootlimit (if required) # - Save the environment # - Partition the eMMC user data area for Linux # - Update the 'linux' partition @@ -223,6 +232,7 @@ uuu fb: ucmd setenv bootcmd " env default -a; setenv dualboot \${dualboot}; bootcount reset; + ${bootlimit_cmd}; saveenv; echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_sd.txt index f43d6a2e5..eaba3add2 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_sd.txt @@ -118,6 +118,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -194,6 +195,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_usb.txt index 256accf40..a31bd122e 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_usb.txt @@ -118,6 +118,7 @@ fi # - Partition the eMMC user data area for Linux # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Erase the 'update' partition @@ -195,6 +196,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_uuu.sh index a20af2bf3..1ee6c2f79 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_uuu.sh @@ -32,7 +32,9 @@ show_usage() echo "Usage: $0 [options]" echo "" echo " Options:" + echo " -b Activate bootcount mechanism (3 boot attempts)." echo " -d Install firmware on dualboot partitions (system A and system B)." + echo " (Implies -b)." echo " -h Show this help." echo " -i Image name that prefixes the image filenames, such as 'dey-image-qt', " echo " 'dey-image-webkit', 'core-image-base'..." @@ -70,10 +72,11 @@ echo "############################################################" # Command line admits the following parameters: # -u # -i -while getopts 'dhi:nu:' c +while getopts 'bdhi:nu:' c do case $c in - d) INSTALL_DUALBOOT=true ;; + b) BOOTCOUNT=true ;; + d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;; h) show_usage ;; i) IMAGE_NAME=${OPTARG} ;; n) NOWAIT=true ;; @@ -150,6 +153,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +# Enable bootcount mechanism by setting a bootlimit +if [ "${BOOTCOUNT}" = true ]; then + bootlimit_cmd="setenv bootlimit 3" +fi + [ "${ABORT}" = true ] && exit 1 # 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 # - Reset environment to defaults # - Reset the bootcount +# - Set bootlimit (if required) # - Save the environment # - Partition the eMMC user data area for Linux # - Update the 'linux' partition @@ -219,6 +228,7 @@ uuu fb: ucmd setenv bootcmd " env default -a; setenv dualboot \${dualboot}; bootcount reset; + ${bootlimit_cmd}; saveenv; echo \"\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt index b2990ab35..cb0238c34 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt @@ -152,6 +152,7 @@ fi # environment # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Configure recovery to wipe 'update' partition @@ -215,6 +216,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; @@ -255,8 +257,8 @@ setenv bootcmd " echo \"\"; setenv boot_recovery yes; setenv recovery_command wipe_update; - saveenv; fi; + saveenv; echo \"\"; echo \"\"; echo \">> Firmware installation complete.\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt index de7c1d6ae..304dc9f1a 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt @@ -154,6 +154,7 @@ fi # environment # - If Dual Boot # - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b + - Set bootlimit to 3 # - If Normal Boot: # - Update the system partitions: linux, recovery, rootfs # - Configure recovery to wipe 'update' partition @@ -218,6 +219,7 @@ setenv bootcmd " exit; fi; fi; + setenv bootlimit 3; else echo \"\"; echo \"\"; @@ -258,8 +260,8 @@ setenv bootcmd " echo \"\"; setenv boot_recovery yes; setenv recovery_command wipe_update; - saveenv; fi; + saveenv; echo \"\"; echo \"\"; echo \">> Firmware installation complete.\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh index 2538fe4c8..f08aaf979 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh @@ -40,7 +40,9 @@ show_usage() echo " Options:" echo " -a Arm-trusted-firmware filename." 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 " (Implies -b)." echo " -f FIP filename." echo " Auto-determined by variant if not provided." echo " -h Show this help." @@ -80,11 +82,12 @@ echo "############################################################" # -a # -f # -i -while getopts 'a:df:hi:n' c +while getopts 'a:bdf:hi:n' c do case $c in a) INSTALL_ATF_FILENAME=${OPTARG} ;; - d) INSTALL_DUALBOOT=true ;; + b) BOOTCOUNT=true ;; + d) INSTALL_DUALBOOT=true && BOOTCOUNT=true ;; f) INSTALL_FIP_FILENAME=${OPTARG} ;; h) show_usage ;; i) IMAGE_NAME=${OPTARG} ;; @@ -163,6 +166,11 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +# Enable bootcount mechanism by setting a bootlimit +if [ "${BOOTCOUNT}" = true ]; then + bootlimit_cmd="setenv bootlimit 3" +fi + [ "${ABORT}" = true ] && exit 1 # parts names @@ -235,6 +243,7 @@ fi # - Reset environment to defaults # - Keep the 'dualboot' status # - Reset the bootcount +# - Set bootlimit (if required) # - Save the environment # - Update the 'linux' partition(s) # - Update the 'rootfs' partition(s) @@ -242,6 +251,7 @@ uuu fb: ucmd setenv bootcmd " env default -a; setenv dualboot \${dualboot}; bootcount reset; + ${bootlimit_cmd}; saveenv; saveenv; echo \"\";