From a791bb446396ef3c4868a1cf01b30a6c2bd2bc40 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Wed, 30 Aug 2023 13:38:44 +0200 Subject: [PATCH] install_linux_fw: reset bootcount before resetting target During firmware install, the target may be reset several times. We don't want the bootcount to count these as boot attempts. Signed-off-by: Hector Palacios --- .../u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt | 2 ++ .../u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt | 2 ++ .../u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh | 3 +++ 3 files changed, 7 insertions(+) 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 cdfa0d917..cda66dfa9 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 @@ -251,8 +251,10 @@ setenv bootcmd " echo \"\"; echo \"\"; sleep 1; + bootcount reset; reset; " +bootcount reset saveenv reset 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 6a0fa9968..0785430b1 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 @@ -252,8 +252,10 @@ setenv bootcmd " echo \"\"; echo \"\"; sleep 1; + bootcount reset; reset; " +bootcount reset saveenv reset 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 def428e67..aaa5555b3 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 @@ -221,12 +221,14 @@ fi # Set 'bootcmd' for the second part of the script that will # - Reset environment to defaults # - Keep the 'dualboot' status +# - Reset the bootcount # - Save the environment # - Update the 'linux' partition(s) # - Update the 'rootfs' partition(s) uuu fb: ucmd setenv bootcmd " env default -a; setenv dualboot \${dualboot}; + bootcount reset; saveenv; saveenv; echo \"\"; @@ -277,6 +279,7 @@ else fi # Reset the target +uuu fb: ucmd bootcount reset uuu fb: acmd reset echo "\033[32m"