[U-Boot] [RESEND PATCH v2 0/2] Add bootlimit to Kconfig

This patch series adds the bootlimit environment variable to Kconfig and migrates users to it.
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/brppt1_mmc_defconfig | 1 + configs/brppt1_nand_defconfig | 1 + configs/brppt1_spi_defconfig | 1 + 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/brppt1.h | 2 -- 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 +++ 43 files changed, 45 insertions(+), 8 deletions(-)

Add ability to set environment bootlimit from Kconfig
Signed-off-by: Alex Kiernan alex.kiernan@gmail.com ---
Changes in v2: None
drivers/bootcount/Kconfig | 8 ++++++++ include/env_default.h | 3 +++ 2 files changed, 11 insertions(+)
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig index d335ed14b9..9a0bd516d9 100644 --- a/drivers/bootcount/Kconfig +++ b/drivers/bootcount/Kconfig @@ -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 diff --git a/include/env_default.h b/include/env_default.h index 54d8124793..748076288e 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -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

-----Original Message----- From: U-Boot [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Alex Kiernan Sent: Saturday, July 14, 2018 1:30 PM To: u-boot@lists.denx.de Cc: Thomas Petazzoni thomas.petazzoni@free-electrons.com; Martyn Welch martyn.welch@collabora.co.uk; Ian Ray ian.ray@ge.com Subject: [U-Boot] [RESEND PATCH v2 1/2] Add BOOTCOUNT_BOOTLIMIT to set reboot limit
Add ability to set environment bootlimit from Kconfig
Signed-off-by: Alex Kiernan alex.kiernan@gmail.com
Changes in v2: None
drivers/bootcount/Kconfig | 8 ++++++++ include/env_default.h | 3 +++ 2 files changed, 11 insertions(+)
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig index d335ed14b9..9a0bd516d9 100644 --- a/drivers/bootcount/Kconfig +++ b/drivers/bootcount/Kconfig @@ -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.
Just a curiosity, if maximum number of reboot cycles expires, what will be the behavior of u-boot?
--pk

On Sun, Jul 15, 2018 at 10:36 AM Prabhakar Kushwaha prabhakar.kushwaha@nxp.com wrote:
-----Original Message----- From: U-Boot [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Alex Kiernan Sent: Saturday, July 14, 2018 1:30 PM To: u-boot@lists.denx.de Cc: Thomas Petazzoni thomas.petazzoni@free-electrons.com; Martyn Welch martyn.welch@collabora.co.uk; Ian Ray ian.ray@ge.com Subject: [U-Boot] [RESEND PATCH v2 1/2] Add BOOTCOUNT_BOOTLIMIT to set reboot limit
Add ability to set environment bootlimit from Kconfig
Signed-off-by: Alex Kiernan alex.kiernan@gmail.com
Changes in v2: None
drivers/bootcount/Kconfig | 8 ++++++++ include/env_default.h | 3 +++ 2 files changed, 11 insertions(+)
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig index d335ed14b9..9a0bd516d9 100644 --- a/drivers/bootcount/Kconfig +++ b/drivers/bootcount/Kconfig @@ -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.
Just a curiosity, if maximum number of reboot cycles expires, what will be the behavior of u-boot?
It depends on which bootcount implementation you're using, I expect some are undefined. For the default based on a u32, it'll wrap to 0 (which IIRC is defined behaviour in C) and you'll go back to the bootcmd flow rather than altbootcmd.
--pk

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.
Signed-off-by: Alex Kiernan alex.kiernan@gmail.com ---
Changes in v2: - include display5 in the migration to Kconfig
configs/brppt1_mmc_defconfig | 1 + configs/brppt1_nand_defconfig | 1 + configs/brppt1_spi_defconfig | 1 + 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/brppt1.h | 2 -- 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 - 41 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/configs/brppt1_mmc_defconfig b/configs/brppt1_mmc_defconfig index a9d0f71fbe..7fb28b134b 100644 --- a/configs/brppt1_mmc_defconfig +++ b/configs/brppt1_mmc_defconfig @@ -50,6 +50,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_ENV_IS_IN_MMC=y CONFIG_NETCONSOLE=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_BOOTLIMIT=1 CONFIG_MMC_OMAP_HS=y CONFIG_DRIVER_TI_CPSW=y CONFIG_SYS_NS16550=y diff --git a/configs/brppt1_nand_defconfig b/configs/brppt1_nand_defconfig index ac50abc661..240e1187b2 100644 --- a/configs/brppt1_nand_defconfig +++ b/configs/brppt1_nand_defconfig @@ -51,6 +51,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:128k(MLO),128k(MLO.backup),128k(d CONFIG_ENV_IS_IN_NAND=y CONFIG_NETCONSOLE=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_BOOTLIMIT=1 # CONFIG_MMC is not set CONFIG_NAND=y CONFIG_DRIVER_TI_CPSW=y diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig index 140a7ddfef..a12184cff4 100644 --- a/configs/brppt1_spi_defconfig +++ b/configs/brppt1_spi_defconfig @@ -57,6 +57,7 @@ CONFIG_CMD_MTDPARTS=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NETCONSOLE=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_BOOTLIMIT=1 CONFIG_MMC_OMAP_HS=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/calimain_defconfig b/configs/calimain_defconfig index 7908cfcc34..55782463ae 100644 --- a/configs/calimain_defconfig +++ b/configs/calimain_defconfig @@ -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 diff --git a/configs/display5_defconfig b/configs/display5_defconfig index 1f3007f1be..0222144bf3 100644 --- a/configs/display5_defconfig +++ b/configs/display5_defconfig @@ -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 diff --git a/configs/draco_defconfig b/configs/draco_defconfig index 5c61659fe5..3f91b0699c 100644 --- a/configs/draco_defconfig +++ b/configs/draco_defconfig @@ -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 diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig index 3bb9b2e34e..1ffea06294 100644 --- a/configs/etamin_defconfig +++ b/configs/etamin_defconfig @@ -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 diff --git a/configs/ge_bx50v3_defconfig b/configs/ge_bx50v3_defconfig index b312920a25..78bc91ff2c 100644 --- a/configs/ge_bx50v3_defconfig +++ b/configs/ge_bx50v3_defconfig @@ -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 diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig index e41ec8990d..7b5a36ecc0 100644 --- a/configs/km_kirkwood_128m16_defconfig +++ b/configs/km_kirkwood_128m16_defconfig @@ -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 diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig index fcab051ad6..a0c8588ce8 100644 --- a/configs/km_kirkwood_defconfig +++ b/configs/km_kirkwood_defconfig @@ -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 diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig index 4fc83a5ec8..4a67979fa4 100644 --- a/configs/km_kirkwood_pci_defconfig +++ b/configs/km_kirkwood_pci_defconfig @@ -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 diff --git a/configs/kmcoge4_defconfig b/configs/kmcoge4_defconfig index c8473ca08a..9f94c2765f 100644 --- a/configs/kmcoge4_defconfig +++ b/configs/kmcoge4_defconfig @@ -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 diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig index 4e78d37ad4..fdf86028fc 100644 --- a/configs/kmcoge5ne_defconfig +++ b/configs/kmcoge5ne_defconfig @@ -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 diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig index 4b1edb4c0a..d7c21362b1 100644 --- a/configs/kmcoge5un_defconfig +++ b/configs/kmcoge5un_defconfig @@ -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 diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig index e64a6936db..00259a6f65 100644 --- a/configs/kmeter1_defconfig +++ b/configs/kmeter1_defconfig @@ -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 diff --git a/configs/kmlion1_defconfig b/configs/kmlion1_defconfig index 7ffeaf9019..4b9257545d 100644 --- a/configs/kmlion1_defconfig +++ b/configs/kmlion1_defconfig @@ -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 diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig index 90d9a557b3..ff89dd902e 100644 --- a/configs/kmnusa_defconfig +++ b/configs/kmnusa_defconfig @@ -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 diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig index c6ad62255d..d201ddc10d 100644 --- a/configs/kmopti2_defconfig +++ b/configs/kmopti2_defconfig @@ -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 diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig index 132db201ef..32a68e5c11 100644 --- a/configs/kmsugp1_defconfig +++ b/configs/kmsugp1_defconfig @@ -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 diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig index eb4c4b433b..9cdd4bdd77 100644 --- a/configs/kmsupx5_defconfig +++ b/configs/kmsupx5_defconfig @@ -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 diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig index 7b5b016f28..1fb7b97315 100644 --- a/configs/kmsuv31_defconfig +++ b/configs/kmsuv31_defconfig @@ -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 diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig index f3ca988c62..461ab530c9 100644 --- a/configs/kmtegr1_defconfig +++ b/configs/kmtegr1_defconfig @@ -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 diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig index cf17002d56..650f3bae17 100644 --- a/configs/kmtepr2_defconfig +++ b/configs/kmtepr2_defconfig @@ -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 diff --git a/configs/kmvect1_defconfig b/configs/kmvect1_defconfig index b148f80346..5e98c55f9b 100644 --- a/configs/kmvect1_defconfig +++ b/configs/kmvect1_defconfig @@ -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 diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig index baee230c70..21c1eaea6c 100644 --- a/configs/mgcoge3un_defconfig +++ b/configs/mgcoge3un_defconfig @@ -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 diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig index 8a0cc5d481..10bf745375 100644 --- a/configs/mx53ppd_defconfig +++ b/configs/mx53ppd_defconfig @@ -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 diff --git a/configs/portl2_defconfig b/configs/portl2_defconfig index 3c049c4449..268d9061a1 100644 --- a/configs/portl2_defconfig +++ b/configs/portl2_defconfig @@ -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 diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig index 459f8fe48e..1c084dd6ce 100644 --- a/configs/pxm2_defconfig +++ b/configs/pxm2_defconfig @@ -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 diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig index 7fdd6ddc56..aa991ae961 100644 --- a/configs/rastaban_defconfig +++ b/configs/rastaban_defconfig @@ -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 diff --git a/configs/rut_defconfig b/configs/rut_defconfig index 07710d272d..7cb80f7d3b 100644 --- a/configs/rut_defconfig +++ b/configs/rut_defconfig @@ -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 diff --git a/configs/suvd3_defconfig b/configs/suvd3_defconfig index 48fc91f46b..070ca2a62d 100644 --- a/configs/suvd3_defconfig +++ b/configs/suvd3_defconfig @@ -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 diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig index 4eb58015b5..ef04d531fd 100644 --- a/configs/thuban_defconfig +++ b/configs/thuban_defconfig @@ -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 diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig index 14f256abd4..3368a4eb80 100644 --- a/configs/tuge1_defconfig +++ b/configs/tuge1_defconfig @@ -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 diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig index d3b9ca25b6..1847a47329 100644 --- a/configs/tuxx1_defconfig +++ b/configs/tuxx1_defconfig @@ -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 diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h index eb45331033..7bc255085f 100644 --- a/include/configs/brppt1.h +++ b/include/configs/brppt1.h @@ -90,7 +90,6 @@ "nand read ${loadaddr} kernel ${kernelsize}; " \ "bootz ${loadaddr} - ${dtbaddr}\0" \ "defboot=run nandboot\0" \ - "bootlimit=1\0" \ "simplefb=1\0 " \ "altbootcmd=run usbscript\0" #else @@ -116,7 +115,6 @@ "defboot=ext4load mmc 1:2 ${loadaddr} /boot/PPTImage.md5 && run mmcboot1; " \ "ext4load mmc 1:1 ${dtbaddr} /$dtb && run mmcboot0; " \ "run ramboot; run usbscript;\0" \ -"bootlimit=1\0" \ "altbootcmd=mmc dev 1; run mmcboot0;\0" \ "upduboot=dhcp; " \ "tftp ${loadaddr} MLO && mmc write ${loadaddr} 100 100; " \ diff --git a/include/configs/calimain.h b/include/configs/calimain.h index ab4a9e6ddc..254352f299 100644 --- a/include/configs/calimain.h +++ b/include/configs/calimain.h @@ -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 \ diff --git a/include/configs/display5.h b/include/configs/display5.h index f3c8757385..0004c0df9b 100644 --- a/include/configs/display5.h +++ b/include/configs/display5.h @@ -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" \ diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h index fef41a8a18..68ee380fa3 100644 --- a/include/configs/ge_bx50v3.h +++ b/include/configs/ge_bx50v3.h @@ -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" \ diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index 92511193f6..1872708225 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -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" \ diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h index e08e83151f..c4e145833f 100644 --- a/include/configs/mx53ppd.h +++ b/include/configs/mx53ppd.h @@ -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" \ diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h index 470387df8c..b365e94505 100644 --- a/include/configs/siemens-am33x-common.h +++ b/include/configs/siemens-am33x-common.h @@ -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" \

Hi Alex,
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.
Signed-off-by: Alex Kiernan alex.kiernan@gmail.com
Changes in v2:
- include display5 in the migration to Kconfig
Reviewed-by: Lukasz Majewski lukma@denx.de
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
participants (3)
-
Alex Kiernan
-
Lukasz Majewski
-
Prabhakar Kushwaha