Skip to contentSkip to conversation

Add bootlimit to Kconfig

PATCH New Alex Kiernan 2 participants 5 messages Jul 21, 2018 – Aug 17, 2018

lore
Share & tools
lore
#0 lore raw

v3 cover Add bootlimit to Kconfig

This patch series adds the bootlimit environment variable to Kconfig and migrates users to it.

Changes in v3:
- Rebase
- Add Lukasz' Reviewed-by

Changes in v2:
- include display5 in the migration to Kconfig

Alex Kiernan (2):
Add BOOTCOUNT_BOOTLIMIT to set reboot limit
Migrate bootlimit to Kconfig

 configs/calimain_defconfig             | 1 +
 configs/display5_defconfig             | 1 +
 configs/draco_defconfig                | 1 +
 configs/etamin_defconfig               | 1 +
 configs/ge_bx50v3_defconfig            | 1 +
 configs/km_kirkwood_128m16_defconfig   | 1 +
 configs/km_kirkwood_defconfig          | 1 +
 configs/km_kirkwood_pci_defconfig      | 1 +
 configs/kmcoge4_defconfig              | 1 +
 configs/kmcoge5ne_defconfig            | 1 +
 configs/kmcoge5un_defconfig            | 1 +
 configs/kmeter1_defconfig              | 1 +
 configs/kmlion1_defconfig              | 1 +
 configs/kmnusa_defconfig               | 1 +
 configs/kmopti2_defconfig              | 1 +
 configs/kmsugp1_defconfig              | 1 +
 configs/kmsupx5_defconfig              | 1 +
 configs/kmsuv31_defconfig              | 1 +
 configs/kmtegr1_defconfig              | 1 +
 configs/kmtepr2_defconfig              | 1 +
 configs/kmvect1_defconfig              | 1 +
 configs/mgcoge3un_defconfig            | 1 +
 configs/mx53ppd_defconfig              | 1 +
 configs/portl2_defconfig               | 1 +
 configs/pxm2_defconfig                 | 1 +
 configs/rastaban_defconfig             | 1 +
 configs/rut_defconfig                  | 1 +
 configs/suvd3_defconfig                | 1 +
 configs/thuban_defconfig               | 1 +
 configs/tuge1_defconfig                | 1 +
 configs/tuxx1_defconfig                | 1 +
 drivers/bootcount/Kconfig              | 8 ++++++++
 include/configs/calimain.h             | 1 -
 include/configs/display5.h             | 1 -
 include/configs/ge_bx50v3.h            | 1 -
 include/configs/km/keymile-common.h    | 1 -
 include/configs/mx53ppd.h              | 1 -
 include/configs/siemens-am33x-common.h | 1 -
 include/env_default.h                  | 3 +++
 39 files changed, 42 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 1/2 Add BOOTCOUNT_BOOTLIMIT to set reboot limit

Add ability to set environment bootlimit from Kconfig

---

Changes in v3: None
Changes in v2: None

 drivers/bootcount/Kconfig | 8 ++++++++
 include/env_default.h     | 3 +++
 2 files changed, 11 insertions(+)
drivers/bootcount/Kconfig +8 -0
index d335ed14b9..9a0bd516d9 100644
@@ -72,6 +72,14 @@ config BOOTCOUNT_AT91
 
 endchoice
 
+config BOOTCOUNT_BOOTLIMIT
+	int "Maximum number of reboot cycles allowed"
+	default 0
+	help
+	  Set the Maximum number of reboot cycles allowed without the boot
+	  counter being cleared.
+	  If set to 0 do not set a boot limit in the environment.
+
 config BOOTCOUNT_ALEN
 	int "I2C address length"
 	default 1
include/env_default.h +3 -0
index bd600cfa44..86b639d3e2 100644
@@ -104,6 +104,9 @@ const uchar default_environment[] = {
 	"soc="		CONFIG_SYS_SOC			"\0"
 #endif
 #endif
+#if defined(CONFIG_BOOTCOUNT_BOOTLIMIT) && (CONFIG_BOOTCOUNT_BOOTLIMIT > 0)
+	"bootlimit="	__stringify(CONFIG_BOOTCOUNT_BOOTLIMIT)"\0"
+#endif
 #ifdef	CONFIG_EXTRA_ENV_SETTINGS
 	CONFIG_EXTRA_ENV_SETTINGS
 #endif
Signature · 1 line
2.17.1
#2 lore raw

PATCH v3 1/2 Add BOOTCOUNT_BOOTLIMIT to set reboot limit

Quoted 3 lines · Alex Kiernan

Add ability to set environment bootlimit from Kconfig

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180817/924561a1/attachment.sig>
#3 lore raw

PATCH v3 2/2 Migrate bootlimit to Kconfig

In reply to Alex Kiernan

Migrate boards which set bootlimit in the environment to Kconfig.

We exclude gurnard_defconfig which includes a bootlimit=, but doesn't set CONFIG_BOOTCOUNT_LIMIT, so we'd fail to include a bootlimit setting if we migrated it.

display5_defconfig and display5_factory_defconfig share a SYS_CONFIG_NAME, but only display5_defconfig enables CONFIG_BOOTCOUNT_LIMIT, so we fail to set bootlimit= in display5_factory_defconfig. This is okay because the display5_factory_defconfig doesn't need to have it set, as it is only meant to prepare the board in the factory.

Environment changes for all modified configs as seen from buildman:

boards.cfg is up to date. Nothing to do.
Summary of 3 commits for 32 boards (8 threads, 1 job per thread) 01: Merge git://git.denx.de/u-boot-x86
arm: + draco etamin rastaban pxm2 display5 thuban rut
02: Add BOOTCOUNT_BOOTLIMIT to set reboot limit
03: Migrate bootlimit to Kconfig
- display5_factory: bootlimit=3

---

Changes in v3:
- Rebase
- Add Lukasz' Reviewed-by

Changes in v2:
- include display5 in the migration to Kconfig

 configs/calimain_defconfig             | 1 +
 configs/display5_defconfig             | 1 +
 configs/draco_defconfig                | 1 +
 configs/etamin_defconfig               | 1 +
 configs/ge_bx50v3_defconfig            | 1 +
 configs/km_kirkwood_128m16_defconfig   | 1 +
 configs/km_kirkwood_defconfig          | 1 +
 configs/km_kirkwood_pci_defconfig      | 1 +
 configs/kmcoge4_defconfig              | 1 +
 configs/kmcoge5ne_defconfig            | 1 +
 configs/kmcoge5un_defconfig            | 1 +
 configs/kmeter1_defconfig              | 1 +
 configs/kmlion1_defconfig              | 1 +
 configs/kmnusa_defconfig               | 1 +
 configs/kmopti2_defconfig              | 1 +
 configs/kmsugp1_defconfig              | 1 +
 configs/kmsupx5_defconfig              | 1 +
 configs/kmsuv31_defconfig              | 1 +
 configs/kmtegr1_defconfig              | 1 +
 configs/kmtepr2_defconfig              | 1 +
 configs/kmvect1_defconfig              | 1 +
 configs/mgcoge3un_defconfig            | 1 +
 configs/mx53ppd_defconfig              | 1 +
 configs/portl2_defconfig               | 1 +
 configs/pxm2_defconfig                 | 1 +
 configs/rastaban_defconfig             | 1 +
 configs/rut_defconfig                  | 1 +
 configs/suvd3_defconfig                | 1 +
 configs/thuban_defconfig               | 1 +
 configs/tuge1_defconfig                | 1 +
 configs/tuxx1_defconfig                | 1 +
 include/configs/calimain.h             | 1 -
 include/configs/display5.h             | 1 -
 include/configs/ge_bx50v3.h            | 1 -
 include/configs/km/keymile-common.h    | 1 -
 include/configs/mx53ppd.h              | 1 -
 include/configs/siemens-am33x-common.h | 1 -
 37 files changed, 31 insertions(+), 6 deletions(-)
configs/calimain_defconfig +1 -0
index 7908cfcc34..55782463ae 100644
@@ -22,6 +22,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_DIAG=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0x01C23000
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/display5_defconfig +1 -0
index 1f3007f1be..0222144bf3 100644
@@ -56,6 +56,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=02008000.spi.1:128k(SPL),1m(u-boot),64k(env1),
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
 CONFIG_SYS_BOOTCOUNT_ADDR=0x020CC068
 CONFIG_FSL_ESDHC=y
configs/draco_defconfig +1 -0
index 5c61659fe5..3f91b0699c 100644
@@ -56,6 +56,7 @@ CONFIG_OF_EMBED=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_DFU_NAND=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
configs/etamin_defconfig +1 -0
index 3bb9b2e34e..1ffea06294 100644
@@ -56,6 +56,7 @@ CONFIG_OF_EMBED=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_DFU_NAND=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
configs/ge_bx50v3_defconfig +1 -0
index b312920a25..78bc91ff2c 100644
@@ -28,6 +28,7 @@ CONFIG_DOS_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_EXT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=10
 CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="1:5"
 CONFIG_SYS_BOOTCOUNT_ADDR=0x7000A000
 CONFIG_FSL_ESDHC=y
configs/km_kirkwood_128m16_defconfig +1 -0
index e41ec8990d..7b5a36ecc0 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_EEPROM=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/km_kirkwood_defconfig +1 -0
index fcab051ad6..a0c8588ce8 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_EEPROM=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/km_kirkwood_pci_defconfig +1 -0
index 4fc83a5ec8..4a67979fa4 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_EEPROM=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmcoge4_defconfig +1 -0
index c8473ca08a..9f94c2765f 100644
@@ -35,6 +35,7 @@ CONFIG_CMD_UBI=y
 CONFIG_DOS_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xFB000020
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
configs/kmcoge5ne_defconfig +1 -0
index 4e78d37ad4..fdf86028fc 100644
@@ -27,6 +27,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/kmcoge5un_defconfig +1 -0
index 4b1edb4c0a..d7c21362b1 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmeter1_defconfig +1 -0
index e64a6936db..00259a6f65 100644
@@ -26,6 +26,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/kmlion1_defconfig +1 -0
index 7ffeaf9019..4b9257545d 100644
@@ -35,6 +35,7 @@ CONFIG_CMD_UBI=y
 CONFIG_DOS_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xFB000020
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
configs/kmnusa_defconfig +1 -0
index 90d9a557b3..ff89dd902e 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmopti2_defconfig +1 -0
index c6ad62255d..d201ddc10d 100644
@@ -26,6 +26,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/kmsugp1_defconfig +1 -0
index 132db201ef..32a68e5c11 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmsupx5_defconfig +1 -0
index eb4c4b433b..9cdd4bdd77 100644
@@ -26,6 +26,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/kmsuv31_defconfig +1 -0
index 7b5b016f28..1fb7b97315 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmtegr1_defconfig +1 -0
index f3ca988c62..461ab530c9 100644
@@ -28,6 +28,7 @@ CONFIG_CMD_DIAG=y
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/kmtepr2_defconfig +1 -0
index cf17002d56..650f3bae17 100644
@@ -26,6 +26,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/kmvect1_defconfig +1 -0
index b148f80346..5e98c55f9b 100644
@@ -27,6 +27,7 @@ CONFIG_CMD_DIAG=y
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/mgcoge3un_defconfig +1 -0
index baee230c70..21c1eaea6c 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_EEPROM=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/mx53ppd_defconfig +1 -0
index 8a0cc5d481..10bf745375 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_EXT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=10
 CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="0:5"
 CONFIG_SYS_BOOTCOUNT_ADDR=0x7000A000
 CONFIG_FSL_ESDHC=y
configs/portl2_defconfig +1 -0
index 3c049c4449..268d9061a1 100644
@@ -28,6 +28,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_EEPROM=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/pxm2_defconfig +1 -0
index 459f8fe48e..1c084dd6ce 100644
@@ -58,6 +58,7 @@ CONFIG_OF_EMBED=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_DFU_NAND=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
configs/rastaban_defconfig +1 -0
index 7fdd6ddc56..aa991ae961 100644
@@ -56,6 +56,7 @@ CONFIG_OF_EMBED=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_DFU_NAND=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
configs/rut_defconfig +1 -0
index 07710d272d..7cb80f7d3b 100644
@@ -59,6 +59,7 @@ CONFIG_OF_EMBED=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_DFU_NAND=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
configs/suvd3_defconfig +1 -0
index 48fc91f46b..070ca2a62d 100644
@@ -26,6 +26,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/thuban_defconfig +1 -0
index 4eb58015b5..ef04d531fd 100644
@@ -56,6 +56,7 @@ CONFIG_OF_EMBED=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_DFU_NAND=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
configs/tuge1_defconfig +1 -0
index 14f256abd4..3368a4eb80 100644
@@ -26,6 +26,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
configs/tuxx1_defconfig +1 -0
index d3b9ca25b6..1847a47329 100644
@@ -26,6 +26,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
include/configs/calimain.h +0 -1
index ab4a9e6ddc..254352f299 100644
@@ -256,7 +256,6 @@
 	"verify=n\0"							\
 	"clearenv=protect off all;"					\
 		"erase 0x60040000 +0x40000;\0"				\
-	"bootlimit=3\0"							\
 	"altbootcmd=run bootrlk\0"
 
 #define CONFIG_PREBOOT			\
include/configs/display5.h +0 -1
index f3c8757385..0004c0df9b 100644
@@ -266,7 +266,6 @@
 	"baudrate=115200\0" \
 	"bootcmd=" CONFIG_BOOTCOMMAND "\0" \
 	"factory=" FACTORY_PROCEDURE "\0" \
-	"bootlimit=3\0" \
 	"ethact=FEC\0" \
 	"netdev=eth0\0" \
 	"boot_os=y\0" \
include/configs/ge_bx50v3.h +0 -1
index fef41a8a18..68ee380fa3 100644
@@ -88,7 +88,6 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"bootcause=POR\0" \
-	"bootlimit=10\0" \
 	"image=/boot/fitImage\0" \
 	"fdt_high=0xffffffff\0" \
 	"dev=mmc\0" \
include/configs/km/keymile-common.h +0 -1
index 92511193f6..1872708225 100644
@@ -196,7 +196,6 @@
 		"setenv altbootcmd \'setenv boot_bank ${backup_bank}; "	\
 			"run ${subbootcmds}; reset\' && "		\
 		"saveenv && saveenv && boot\0"				\
-	"bootlimit=3\0"							\
 	"cramfsloadfdt="						\
 		"cramfsload ${fdt_addr_r} "				\
 		"fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb\0"		\
include/configs/mx53ppd.h +0 -1
index e08e83151f..c4e145833f 100644
@@ -102,7 +102,6 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	PPD_CONFIG_NFS \
-	"bootlimit=10\0" \
 	"image=/boot/fitImage\0" \
 	"fdt_high=0xffffffff\0" \
 	"dev=mmc\0" \
include/configs/siemens-am33x-common.h +0 -1
index 470387df8c..b365e94505 100644
@@ -244,7 +244,6 @@
 	"project_dir=targetdir\0" \
 	"upgrade_available=0\0" \
 	"altbootcmd=run bootcmd\0" \
-	"bootlimit=3\0" \
 	"partitionset_active=A\0" \
 	"loadaddr=0x82000000\0" \
 	"kloadaddr=0x81000000\0" \
Signature · 1 line
2.17.1
#4 lore raw

PATCH v3 2/2 Migrate bootlimit to Kconfig

Quoted 22 lines · Alex Kiernan

Migrate boards which set bootlimit in the environment to Kconfig.

We exclude gurnard_defconfig which includes a bootlimit=, but doesn't set CONFIG_BOOTCOUNT_LIMIT, so we'd fail to include a bootlimit setting if we migrated it.

display5_defconfig and display5_factory_defconfig share a SYS_CONFIG_NAME, but only display5_defconfig enables CONFIG_BOOTCOUNT_LIMIT, so we fail to set bootlimit= in display5_factory_defconfig. This is okay because the display5_factory_defconfig doesn't need to have it set, as it is only meant to prepare the board in the factory.

Environment changes for all modified configs as seen from buildman:

boards.cfg is up to date. Nothing to do.
Summary of 3 commits for 32 boards (8 threads, 1 job per thread) 01: Merge git://git.denx.de/u-boot-x86
arm: + draco etamin rastaban pxm2 display5 thuban rut
02: Add BOOTCOUNT_BOOTLIMIT to set reboot limit
03: Migrate bootlimit to Kconfig
- display5_factory: bootlimit=3

Quoted 2 lines

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180817/e4646e83/attachment.sig>