summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@toradex.com>2020-06-03 11:03:33 +0300
committerIgor Opaniuk <igor.opaniuk@toradex.com>2020-06-03 11:08:57 +0300
commite40c8a3daa5820b984752197636a13b7599c053b (patch)
treea18559894245074e47378db6e05107b920670360
parentf6b6437462eca3f2d615a3fbb2a3c1b723d8175b (diff)
toradex: imx8: enable BOOTCOUNT feature
This introduces automatic boot counter that increases after every reset. After a power-on reset, it will be initialized with 1, and each reboot will increment the value by 1. By default it's disabled if bootlimit isn't set. To enable this feature you have set bootcount limit ("bootlimit"), alternate boot action ("altbootcmd") that will be performed if the new value of bootcount exceeds the value of bootlimit, and "upgrade_available" to let U-Boot automatically increase and save the counter value after every reset: > setenv bootlimit 5 > setenv upgrade_available 1 > setenv altbootcmd "bootm ..." In case the bootlimit exceeds, the message will be shown and albootcmd executed: Warning: Bootlimit (5) exceeded. Using altbootcmd. To reset bootcount run: > bootcount reset Print current value: > bootcount print Relates-to: ELB-2703 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
-rw-r--r--configs/apalis-imx8_defconfig2
-rw-r--r--configs/apalis-imx8x_defconfig2
-rw-r--r--configs/colibri-imx8qxp_defconfig2
-rw-r--r--configs/verdin-imx8mm_defconfig2
4 files changed, 8 insertions, 0 deletions
diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index 4b4c948ede..4334afee64 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -33,6 +33,8 @@ CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_IS_IN_MMC=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_CPU=y
CONFIG_DM_GPIO=y
CONFIG_MXC_GPIO=y
diff --git a/configs/apalis-imx8x_defconfig b/configs/apalis-imx8x_defconfig
index 9dce9863d0..d260098d95 100644
--- a/configs/apalis-imx8x_defconfig
+++ b/configs/apalis-imx8x_defconfig
@@ -34,6 +34,8 @@ CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_IS_IN_MMC=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_CPU=y
CONFIG_DM_GPIO=y
CONFIG_MXC_GPIO=y
diff --git a/configs/colibri-imx8qxp_defconfig b/configs/colibri-imx8qxp_defconfig
index c0861a97b3..1928e11f03 100644
--- a/configs/colibri-imx8qxp_defconfig
+++ b/configs/colibri-imx8qxp_defconfig
@@ -35,6 +35,8 @@ CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_IS_IN_MMC=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_CPU=y
CONFIG_DM_GPIO=y
CONFIG_MXC_GPIO=y
diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig
index ea7b379c37..030398fef3 100644
--- a/configs/verdin-imx8mm_defconfig
+++ b/configs/verdin-imx8mm_defconfig
@@ -40,6 +40,8 @@ CONFIG_CMD_REGULATOR=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_MMC=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_CPU=y
CONFIG_DM_GPIO=y
CONFIG_MXC_GPIO=y