* [U-Boot] [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT
[not found] <1518350813-3418-1-git-send-email-alex.kiernan@gmail.com>
@ 2018-02-11 12:06 ` Alex Kiernan
2018-02-11 19:08 ` Lukasz Majewski
2018-02-12 7:29 ` [U-Boot] EXT: " Ray, Ian
2018-02-11 12:06 ` [U-Boot] [PATCH 2/8] Prepare for multiple bootcount drivers Alex Kiernan
` (6 subsequent siblings)
7 siblings, 2 replies; 33+ messages in thread
From: Alex Kiernan @ 2018-02-11 12:06 UTC (permalink / raw)
To: u-boot
CONFIG_BOOTCOUNT was only used in mx53ppd, merge it with
CONFIG_BOOTCOUNT_LIMIT
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
configs/mx53ppd_defconfig | 1 -
drivers/bootcount/Kconfig | 9 +--------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig
index b83cf72..d6a1c6a 100644
--- a/configs/mx53ppd_defconfig
+++ b/configs/mx53ppd_defconfig
@@ -20,7 +20,6 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
-CONFIG_BOOTCOUNT=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_EXT=y
CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="0:5"
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index d82289f..da2ccab 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -4,13 +4,6 @@
menu "Boot count support"
-config BOOTCOUNT
- bool "Enable Boot count support"
- help
- Enable boot count support, which provides the ability to store the
- number of times the board has booted on a number of different
- persistent storage mediums.
-
config BOOTCOUNT_LIMIT
bool "Enable support for checking boot count limit"
help
@@ -23,7 +16,7 @@ config SYS_BOOTCOUNT_SINGLEWORD
This option enables packing boot count magic value and boot count
into single word (32 bits).
-if BOOTCOUNT
+if BOOTCOUNT_LIMIT
config BOOTCOUNT_EXT
bool "Boot counter on EXT filesystem"
--
2.7.4
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 2/8] Prepare for multiple bootcount drivers
[not found] <1518350813-3418-1-git-send-email-alex.kiernan@gmail.com>
2018-02-11 12:06 ` [U-Boot] [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT Alex Kiernan
@ 2018-02-11 12:06 ` Alex Kiernan
2018-02-11 19:08 ` Lukasz Majewski
2018-02-11 12:06 ` [U-Boot] [PATCH 3/8] Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig Alex Kiernan
` (5 subsequent siblings)
7 siblings, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-11 12:06 UTC (permalink / raw)
To: u-boot
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
drivers/bootcount/Kconfig | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index da2ccab..26fec89 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -2,29 +2,30 @@
# Boot count configuration
#
-menu "Boot count support"
-
-config BOOTCOUNT_LIMIT
+menuconfig BOOTCOUNT_LIMIT
bool "Enable support for checking boot count limit"
help
Enable checking for exceeding the boot count limit.
More information: http://www.denx.de/wiki/DULG/UBootBootCountLimit
-config SYS_BOOTCOUNT_SINGLEWORD
- bool "Use single word to pack boot count and magic value"
- help
- This option enables packing boot count magic value and boot count
- into single word (32 bits).
-
if BOOTCOUNT_LIMIT
+choice
+ prompt "Boot count device"
+
config BOOTCOUNT_EXT
bool "Boot counter on EXT filesystem"
help
Add support for maintaining boot count in a file on an EXT
filesystem.
-if BOOTCOUNT_EXT
+endchoice
+
+config SYS_BOOTCOUNT_SINGLEWORD
+ bool "Use single word to pack boot count and magic value"
+ help
+ This option enables packing boot count magic value and boot count
+ into single word (32 bits).
config SYS_BOOTCOUNT_EXT_INTERFACE
string "Interface on which to find boot counter EXT filesystem"
@@ -57,7 +58,3 @@ config SYS_BOOTCOUNT_ADDR
Set the address used for reading and writing the boot counter.
endif
-
-endif
-
-endmenu
--
2.7.4
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 3/8] Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig
[not found] <1518350813-3418-1-git-send-email-alex.kiernan@gmail.com>
2018-02-11 12:06 ` [U-Boot] [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT Alex Kiernan
2018-02-11 12:06 ` [U-Boot] [PATCH 2/8] Prepare for multiple bootcount drivers Alex Kiernan
@ 2018-02-11 12:06 ` Alex Kiernan
2018-02-11 19:08 ` Lukasz Majewski
2018-02-12 7:58 ` [U-Boot] Antwort: " Hannes Schmelzer
2018-02-11 12:06 ` [U-Boot] [PATCH 4/8] Convert CONFIG_BOOTCOUNT_ENV " Alex Kiernan
` (4 subsequent siblings)
7 siblings, 2 replies; 33+ messages in thread
From: Alex Kiernan @ 2018-02-11 12:06 UTC (permalink / raw)
To: u-boot
This converts the following to Kconfig:
CONFIG_BOOTCOUNT_AM33XX
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
drivers/bootcount/Kconfig | 9 +++++++++
drivers/bootcount/Makefile | 1 -
include/configs/am335x_evm.h | 1 -
include/configs/am335x_sl50.h | 1 -
include/configs/baltos.h | 2 --
include/configs/bav335x.h | 1 -
include/configs/brppt1.h | 1 -
include/configs/chiliboard.h | 1 -
scripts/config_whitelist.txt | 1 -
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index 26fec89..e905295 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -12,6 +12,7 @@ if BOOTCOUNT_LIMIT
choice
prompt "Boot count device"
+ default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
config BOOTCOUNT_EXT
bool "Boot counter on EXT filesystem"
@@ -19,6 +20,14 @@ config BOOTCOUNT_EXT
Add support for maintaining boot count in a file on an EXT
filesystem.
+config BOOTCOUNT_AM33XX
+ bool "Boot counter in AM33XX RTC IP block"
+ depends on AM33XX || SOC_DA8XX
+ help
+ A bootcount driver for the RTC IP block found on many TI platforms.
+ This requires the RTC clocks, etc, to be enabled prior to use and
+ not all boards with this IP block on it will have the RTC in use.
+
endchoice
config SYS_BOOTCOUNT_SINGLEWORD
diff --git a/drivers/bootcount/Makefile b/drivers/bootcount/Makefile
index 45445d2..62bf55e 100644
--- a/drivers/bootcount/Makefile
+++ b/drivers/bootcount/Makefile
@@ -4,7 +4,6 @@
obj-y += bootcount.o
obj-$(CONFIG_AT91SAM9XE) += bootcount_at91.o
-obj-$(CONFIG_SOC_DA8XX) += bootcount_davinci.o
obj-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
obj-$(CONFIG_BOOTCOUNT_ENV) += bootcount_env.o
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 03791de..fff463e 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -177,7 +177,6 @@
/* SPL */
#ifndef CONFIG_NOR_BOOT
/* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_AM33XX
#define CONFIG_SYS_BOOTCOUNT_BE
/* USB gadget RNDIS */
diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h
index 1cb3578..4bcbaee 100644
--- a/include/configs/am335x_sl50.h
+++ b/include/configs/am335x_sl50.h
@@ -74,7 +74,6 @@
/* SPL */
/* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_AM33XX
#define CONFIG_SYS_BOOTCOUNT_BE
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index 440dbf5..10979c7 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -230,8 +230,6 @@
/* SPL */
#ifndef CONFIG_NOR_BOOT
-/* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_AM33XX
/* USB gadget RNDIS */
diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h
index 7bbb7d1..27cb8f6 100644
--- a/include/configs/bav335x.h
+++ b/include/configs/bav335x.h
@@ -339,7 +339,6 @@ DEFAULT_LINUX_BOOT_ENV \
/* SPL */
#ifndef CONFIG_NOR_BOOT
/* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_AM33XX
#define CONFIG_SYS_BOOTCOUNT_BE
/* USB gadget RNDIS */
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index fb2845f..30ea2d2 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -22,7 +22,6 @@
/* Bootcount using the RTC block */
#define CONFIG_SYS_BOOTCOUNT_ADDR 0x44E3E000
-#define CONFIG_BOOTCOUNT_AM33XX
/* memory */
#define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024)
diff --git a/include/configs/chiliboard.h b/include/configs/chiliboard.h
index 234cd6a..92e0479 100644
--- a/include/configs/chiliboard.h
+++ b/include/configs/chiliboard.h
@@ -123,7 +123,6 @@
/* SPL */
/* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_AM33XX
#define CONFIG_SYS_BOOTCOUNT_BE
/* NAND: device related configs */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 1be3f23..46d9d5c 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -148,7 +148,6 @@ CONFIG_BOOGER
CONFIG_BOOM
CONFIG_BOOTBLOCK
CONFIG_BOOTCOUNT_ALEN
-CONFIG_BOOTCOUNT_AM33XX
CONFIG_BOOTCOUNT_ENV
CONFIG_BOOTCOUNT_I2C
CONFIG_BOOTCOUNT_LIMIT
--
2.7.4
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 4/8] Convert CONFIG_BOOTCOUNT_ENV to Kconfig
[not found] <1518350813-3418-1-git-send-email-alex.kiernan@gmail.com>
` (2 preceding siblings ...)
2018-02-11 12:06 ` [U-Boot] [PATCH 3/8] Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig Alex Kiernan
@ 2018-02-11 12:06 ` Alex Kiernan
2018-02-11 19:09 ` Lukasz Majewski
2018-02-13 9:30 ` Lukasz Majewski
2018-02-11 12:06 ` [U-Boot] [PATCH 5/8] Convert CONFIG_BOOTCOUNT_RAM " Alex Kiernan
` (3 subsequent siblings)
7 siblings, 2 replies; 33+ messages in thread
From: Alex Kiernan @ 2018-02-11 12:06 UTC (permalink / raw)
To: u-boot
This converts the following to Kconfig:
CONFIG_BOOTCOUNT_ENV
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
README | 11 -----------
configs/draco_defconfig | 1 +
configs/etamin_defconfig | 1 +
configs/pxm2_defconfig | 1 +
configs/rastaban_defconfig | 1 +
configs/rut_defconfig | 1 +
configs/thuban_defconfig | 1 +
drivers/bootcount/Kconfig | 12 ++++++++++++
include/configs/siemens-am33x-common.h | 2 --
scripts/config_whitelist.txt | 1 -
10 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/README b/README
index f51f670..0581b58 100644
--- a/README
+++ b/README
@@ -714,17 +714,6 @@ The following options need to be configured:
RAM and NFS.
- Bootcount:
- CONFIG_BOOTCOUNT_ENV
- If no softreset save registers are found on the hardware
- "bootcount" is stored in the environment. To prevent a
- saveenv on all reboots, the environment variable
- "upgrade_available" is used. If "upgrade_available" is
- 0, "bootcount" is always 0, if "upgrade_available" is
- 1 "bootcount" is incremented in the environment.
- So the Userspace Applikation must set the "upgrade_available"
- and "bootcount" variable to 0, if a boot was successfully.
-
-- Pre-Boot Commands:
CONFIG_PREBOOT
When this option is #defined, the existence of the
diff --git a/configs/draco_defconfig b/configs/draco_defconfig
index 693d91c..0416daa 100644
--- a/configs/draco_defconfig
+++ b/configs/draco_defconfig
@@ -52,6 +52,7 @@ CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_DFU_NAND=y
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig
index e7a3d22..7d639ea 100644
--- a/configs/etamin_defconfig
+++ b/configs/etamin_defconfig
@@ -52,6 +52,7 @@ CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_DFU_NAND=y
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index 6063259..90783b4 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -55,6 +55,7 @@ CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_DFU_NAND=y
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
index ce6981e..c0947e9 100644
--- a/configs/rastaban_defconfig
+++ b/configs/rastaban_defconfig
@@ -52,6 +52,7 @@ CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_DFU_NAND=y
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
diff --git a/configs/rut_defconfig b/configs/rut_defconfig
index b31eb97..685b4c8 100644
--- a/configs/rut_defconfig
+++ b/configs/rut_defconfig
@@ -56,6 +56,7 @@ CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_DFU_NAND=y
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig
index 4a3c0cd..f5d1077 100644
--- a/configs/thuban_defconfig
+++ b/configs/thuban_defconfig
@@ -52,6 +52,7 @@ CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_DFU_NAND=y
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index e905295..40a0755 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -28,6 +28,18 @@ config BOOTCOUNT_AM33XX
This requires the RTC clocks, etc, to be enabled prior to use and
not all boards with this IP block on it will have the RTC in use.
+config BOOTCOUNT_ENV
+ bool "Boot counter in environment"
+ help
+ If no softreset save registers are found on the hardware
+ "bootcount" is stored in the environment. To prevent a
+ saveenv on all reboots, the environment variable
+ "upgrade_available" is used. If "upgrade_available" is
+ 0, "bootcount" is always 0, if "upgrade_available" is
+ 1 "bootcount" is incremented in the environment.
+ So the Userspace Application must set the "upgrade_available"
+ and "bootcount" variable to 0, if a boot was successfully.
+
endchoice
config SYS_BOOTCOUNT_SINGLEWORD
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index eb4b1f6..a7b427f 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -500,6 +500,4 @@
#define CONFIG_RESET_TO_RETRY
#define CONFIG_BOOT_RETRY_TIME 60
-#define CONFIG_BOOTCOUNT_ENV
-
#endif /* ! __CONFIG_SIEMENS_AM33X_COMMON_H */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 46d9d5c..0fd4ad6 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -148,7 +148,6 @@ CONFIG_BOOGER
CONFIG_BOOM
CONFIG_BOOTBLOCK
CONFIG_BOOTCOUNT_ALEN
-CONFIG_BOOTCOUNT_ENV
CONFIG_BOOTCOUNT_I2C
CONFIG_BOOTCOUNT_LIMIT
CONFIG_BOOTCOUNT_RAM
--
2.7.4
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 5/8] Convert CONFIG_BOOTCOUNT_RAM to Kconfig
[not found] <1518350813-3418-1-git-send-email-alex.kiernan@gmail.com>
` (3 preceding siblings ...)
2018-02-11 12:06 ` [U-Boot] [PATCH 4/8] Convert CONFIG_BOOTCOUNT_ENV " Alex Kiernan
@ 2018-02-11 12:06 ` Alex Kiernan
2018-02-11 19:04 ` Lukasz Majewski
2018-02-11 12:06 ` [U-Boot] [PATCH 6/8] Convert CONFIG_BOOTCOUNT_I2C " Alex Kiernan
` (2 subsequent siblings)
7 siblings, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-11 12:06 UTC (permalink / raw)
To: u-boot
This converts the following to Kconfig:
CONFIG_BOOTCOUNT_RAM
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
README | 2 --
configs/km_kirkwood_128m16_defconfig | 1 +
configs/km_kirkwood_defconfig | 1 +
configs/km_kirkwood_pci_defconfig | 1 +
configs/kmcoge5un_defconfig | 1 +
configs/kmnusa_defconfig | 1 +
configs/kmsugp1_defconfig | 1 +
configs/kmsuv31_defconfig | 1 +
configs/mgcoge3un_defconfig | 1 +
configs/portl2_defconfig | 1 +
configs/theadorable_debug_defconfig | 1 +
drivers/bootcount/Kconfig | 6 ++++++
include/configs/km/km_arm.h | 2 --
include/configs/theadorable.h | 1 -
scripts/config_whitelist.txt | 1 -
15 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/README b/README
index 0581b58..20637e0 100644
--- a/README
+++ b/README
@@ -2321,8 +2321,6 @@ The following options need to be configured:
enable special bootcounter support on at91sam9xe based boards.
CONFIG_SOC_DA8XX
enable special bootcounter support on da850 based boards.
- CONFIG_BOOTCOUNT_RAM
- enable support for the bootcounter in RAM
CONFIG_BOOTCOUNT_I2C
enable support for the bootcounter on an i2c (like RTC) device.
CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig
index 075b4b3..a257275 100644
--- a/configs/km_kirkwood_128m16_defconfig
+++ b/configs/km_kirkwood_128m16_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_EEPROM=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
# 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 4ed097d..0d8c642 100644
--- a/configs/km_kirkwood_defconfig
+++ b/configs/km_kirkwood_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_EEPROM=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
# 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 b47c1ad..112344d 100644
--- a/configs/km_kirkwood_pci_defconfig
+++ b/configs/km_kirkwood_pci_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_EEPROM=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
# CONFIG_MMC is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig
index 96c4ad0..3db48bc 100644
--- a/configs/kmcoge5un_defconfig
+++ b/configs/kmcoge5un_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
# CONFIG_MMC is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig
index fec4017..b602932 100644
--- a/configs/kmnusa_defconfig
+++ b/configs/kmnusa_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
# CONFIG_MMC is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig
index d1f1900..91bed21 100644
--- a/configs/kmsugp1_defconfig
+++ b/configs/kmsugp1_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
# CONFIG_MMC is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig
index 9d4fbfe..a920664 100644
--- a/configs/kmsuv31_defconfig
+++ b/configs/kmsuv31_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
# CONFIG_MMC is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig
index 250513d..6dff78b 100644
--- a/configs/mgcoge3un_defconfig
+++ b/configs/mgcoge3un_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_EEPROM=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
# CONFIG_MMC is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/portl2_defconfig b/configs/portl2_defconfig
index 857dec1..4ca0094 100644
--- a/configs/portl2_defconfig
+++ b/configs/portl2_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_EEPROM=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
# CONFIG_MMC is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/theadorable_debug_defconfig b/configs/theadorable_debug_defconfig
index b62645e..43c6e2c 100644
--- a/configs/theadorable_debug_defconfig
+++ b/configs/theadorable_debug_defconfig
@@ -44,6 +44,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_OF_TRANSLATE=y
CONFIG_SATA_MV=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_RAM=y
CONFIG_FPGA_ALTERA=y
CONFIG_DM_GPIO=y
# CONFIG_MMC is not set
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index 40a0755..eabfd13 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -40,6 +40,12 @@ config BOOTCOUNT_ENV
So the Userspace Application must set the "upgrade_available"
and "bootcount" variable to 0, if a boot was successfully.
+config BOOTCOUNT_RAM
+ bool "Boot counter in RAM"
+ help
+ Store the bootcount in DRAM protected against against bit errors
+ due to short power loss or holding a system in RESET.
+
endchoice
config SYS_BOOTCOUNT_SINGLEWORD
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index ed58d1e..ca23952 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -277,8 +277,6 @@ int get_scl(void);
#define CONFIG_KM_RESERVED_PRAM 0x801000
/* address for the bootcount (taken from end of RAM) */
#define BOOTCOUNT_ADDR (CONFIG_KM_RESERVED_PRAM)
-/* Use generic bootcount RAM driver */
-#define CONFIG_BOOTCOUNT_RAM
/* enable POST tests */
#define CONFIG_POST (CONFIG_SYS_POST_MEM_REGIONS)
diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h
index ec9dc2e..a3b5c87 100644
--- a/include/configs/theadorable.h
+++ b/include/configs/theadorable.h
@@ -83,7 +83,6 @@
/*
* Bootcounter
*/
-#define CONFIG_BOOTCOUNT_RAM
/* Max size of RAM minus BOOTCOUNT_ADDR is the bootcounter address */
#define BOOTCOUNT_ADDR 0x1000
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 0fd4ad6..487c790 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -150,7 +150,6 @@ CONFIG_BOOTBLOCK
CONFIG_BOOTCOUNT_ALEN
CONFIG_BOOTCOUNT_I2C
CONFIG_BOOTCOUNT_LIMIT
-CONFIG_BOOTCOUNT_RAM
CONFIG_BOOTFILE
CONFIG_BOOTMAPSZ
CONFIG_BOOTMODE
--
2.7.4
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 6/8] Convert CONFIG_BOOTCOUNT_I2C to Kconfig
[not found] <1518350813-3418-1-git-send-email-alex.kiernan@gmail.com>
` (4 preceding siblings ...)
2018-02-11 12:06 ` [U-Boot] [PATCH 5/8] Convert CONFIG_BOOTCOUNT_RAM " Alex Kiernan
@ 2018-02-11 12:06 ` Alex Kiernan
2018-02-11 19:05 ` Lukasz Majewski
2018-02-11 12:06 ` [U-Boot] [PATCH 7/8] Integrate AT91 bootcount driver Alex Kiernan
2018-02-11 12:06 ` [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig Alex Kiernan
7 siblings, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-11 12:06 UTC (permalink / raw)
To: u-boot
This converts the following to Kconfig:
CONFIG_BOOTCOUNT_I2C
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
README | 6 ------
configs/ids8313_defconfig | 1 +
drivers/bootcount/Kconfig | 9 +++++++++
include/configs/ids8313.h | 1 -
scripts/config_whitelist.txt | 1 -
5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/README b/README
index 20637e0..a7b0890 100644
--- a/README
+++ b/README
@@ -2321,12 +2321,6 @@ The following options need to be configured:
enable special bootcounter support on at91sam9xe based boards.
CONFIG_SOC_DA8XX
enable special bootcounter support on da850 based boards.
- CONFIG_BOOTCOUNT_I2C
- enable support for the bootcounter on an i2c (like RTC) device.
- CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
- CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for
- the bootcounter.
- CONFIG_BOOTCOUNT_ALEN = address len
CONFIG_BOOTCOUNT_EXT
enable support for the bootcounter in EXT filesystem
CONFIG_SYS_BOOTCOUNT_ADDR = RAM address used for read
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index 3e67c55..eb931ce 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -30,6 +30,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff800000.flash,nand0=e1000000.flash"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:7m(dum),768k(BOOT-BIN),128k(BOOT-ENV),128k(BOOT-REDENV);e1000000.flash:-(ubi)"
CONFIG_CMD_UBI=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_I2C=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
CONFIG_PHYLIB=y
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index eabfd13..8c19ae6 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -46,6 +46,15 @@ config BOOTCOUNT_RAM
Store the bootcount in DRAM protected against against bit errors
due to short power loss or holding a system in RESET.
+config BOOTCOUNT_I2C
+ bool "Boot counter on I2C device"
+ help
+ Enable support for the bootcounter on an i2c (like RTC) device.
+ CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
+ CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for
+ the bootcounter.
+ CONFIG_BOOTCOUNT_ALEN = address len
+
endchoice
config SYS_BOOTCOUNT_SINGLEWORD
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 529cbf1..fe39221 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -516,7 +516,6 @@
#define CONFIG_MTD_PARTITIONS
/* bootcount support */
-#define CONFIG_BOOTCOUNT_I2C
#define CONFIG_BOOTCOUNT_ALEN 1
#define CONFIG_SYS_BOOTCOUNT_ADDR 0x9
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 487c790..aa1d51f 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -148,7 +148,6 @@ CONFIG_BOOGER
CONFIG_BOOM
CONFIG_BOOTBLOCK
CONFIG_BOOTCOUNT_ALEN
-CONFIG_BOOTCOUNT_I2C
CONFIG_BOOTCOUNT_LIMIT
CONFIG_BOOTFILE
CONFIG_BOOTMAPSZ
--
2.7.4
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 7/8] Integrate AT91 bootcount driver
[not found] <1518350813-3418-1-git-send-email-alex.kiernan@gmail.com>
` (5 preceding siblings ...)
2018-02-11 12:06 ` [U-Boot] [PATCH 6/8] Convert CONFIG_BOOTCOUNT_I2C " Alex Kiernan
@ 2018-02-11 12:06 ` Alex Kiernan
2018-02-11 19:05 ` Lukasz Majewski
2018-02-11 12:06 ` [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig Alex Kiernan
7 siblings, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-11 12:06 UTC (permalink / raw)
To: u-boot
Integrate Boot counter for Atmel AT91SAM9XE into Kconfig
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
drivers/bootcount/Kconfig | 5 +++++
drivers/bootcount/Makefile | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index 8c19ae6..e0d1fc2 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -13,6 +13,7 @@ if BOOTCOUNT_LIMIT
choice
prompt "Boot count device"
default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
+ default BOOTCOUNT_AT91 if AT91SAM9XE
config BOOTCOUNT_EXT
bool "Boot counter on EXT filesystem"
@@ -55,6 +56,10 @@ config BOOTCOUNT_I2C
the bootcounter.
CONFIG_BOOTCOUNT_ALEN = address len
+config BOOTCOUNT_AT91
+ bool "Boot counter for Atmel AT91SAM9XE"
+ depends on AT91SAM9XE
+
endchoice
config SYS_BOOTCOUNT_SINGLEWORD
diff --git a/drivers/bootcount/Makefile b/drivers/bootcount/Makefile
index 62bf55e..a3658c1 100644
--- a/drivers/bootcount/Makefile
+++ b/drivers/bootcount/Makefile
@@ -3,7 +3,7 @@
#
obj-y += bootcount.o
-obj-$(CONFIG_AT91SAM9XE) += bootcount_at91.o
+obj-$(CONFIG_BOOTCOUNT_AT91) += bootcount_at91.o
obj-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
obj-$(CONFIG_BOOTCOUNT_ENV) += bootcount_env.o
--
2.7.4
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
[not found] <1518350813-3418-1-git-send-email-alex.kiernan@gmail.com>
` (6 preceding siblings ...)
2018-02-11 12:06 ` [U-Boot] [PATCH 7/8] Integrate AT91 bootcount driver Alex Kiernan
@ 2018-02-11 12:06 ` Alex Kiernan
2018-02-11 19:36 ` Lukasz Majewski
7 siblings, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-11 12:06 UTC (permalink / raw)
To: u-boot
Make generate boot counter selected in the same way as other boot count
drivers
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
drivers/bootcount/Kconfig | 11 +++++++++++
drivers/bootcount/Makefile | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index e0d1fc2..9fde2f2 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -14,6 +14,16 @@ choice
prompt "Boot count device"
default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
default BOOTCOUNT_AT91 if AT91SAM9XE
+ default BOOTCOUNT_GENERIC
+
+config BOOTCOUNT_GENERIC
+ bool "Generic default boot counter"
+ help
+ Generic bootcount stored at SYS_BOOTCOUNT_ADDR.
+
+ SYS_BOOTCOUNT_ADDR:
+ Set to the address where the bootcount and bootcount magic
+ will be stored.
config BOOTCOUNT_EXT
bool "Boot counter on EXT filesystem"
@@ -64,6 +74,7 @@ endchoice
config SYS_BOOTCOUNT_SINGLEWORD
bool "Use single word to pack boot count and magic value"
+ depends on BOOTCOUNT_GENERIC
help
This option enables packing boot count magic value and boot count
into single word (32 bits).
diff --git a/drivers/bootcount/Makefile b/drivers/bootcount/Makefile
index a3658c1..3e1ae8c 100644
--- a/drivers/bootcount/Makefile
+++ b/drivers/bootcount/Makefile
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-obj-y += bootcount.o
+obj-$(CONFIG_BOOTCOUNT_GENERIC) += bootcount.o
obj-$(CONFIG_BOOTCOUNT_AT91) += bootcount_at91.o
obj-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
--
2.7.4
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 5/8] Convert CONFIG_BOOTCOUNT_RAM to Kconfig
2018-02-11 12:06 ` [U-Boot] [PATCH 5/8] Convert CONFIG_BOOTCOUNT_RAM " Alex Kiernan
@ 2018-02-11 19:04 ` Lukasz Majewski
0 siblings, 0 replies; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-11 19:04 UTC (permalink / raw)
To: u-boot
On Sun, 11 Feb 2018 12:06:50 +0000
Alex Kiernan <alex.kiernan@gmail.com> wrote:
> This converts the following to Kconfig:
> CONFIG_BOOTCOUNT_RAM
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
>
> README | 2 --
> configs/km_kirkwood_128m16_defconfig | 1 +
> configs/km_kirkwood_defconfig | 1 +
> configs/km_kirkwood_pci_defconfig | 1 +
> configs/kmcoge5un_defconfig | 1 +
> configs/kmnusa_defconfig | 1 +
> configs/kmsugp1_defconfig | 1 +
> configs/kmsuv31_defconfig | 1 +
> configs/mgcoge3un_defconfig | 1 +
> configs/portl2_defconfig | 1 +
> configs/theadorable_debug_defconfig | 1 +
> drivers/bootcount/Kconfig | 6 ++++++
> include/configs/km/km_arm.h | 2 --
> include/configs/theadorable.h | 1 -
> scripts/config_whitelist.txt | 1 -
> 15 files changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/README b/README
> index 0581b58..20637e0 100644
> --- a/README
> +++ b/README
> @@ -2321,8 +2321,6 @@ The following options need to be configured:
> enable special bootcounter support on at91sam9xe
> based boards. CONFIG_SOC_DA8XX
> enable special bootcounter support on da850 based
> boards.
> - CONFIG_BOOTCOUNT_RAM
> - enable support for the bootcounter in RAM
> CONFIG_BOOTCOUNT_I2C
> enable support for the bootcounter on an i2c (like
> RTC) device. CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
> diff --git a/configs/km_kirkwood_128m16_defconfig
> b/configs/km_kirkwood_128m16_defconfig index 075b4b3..a257275 100644
> --- a/configs/km_kirkwood_128m16_defconfig
> +++ b/configs/km_kirkwood_128m16_defconfig
> @@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
> # CONFIG_CMD_UBIFS is not set
> CONFIG_ENV_IS_IN_EEPROM=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> # 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 4ed097d..0d8c642 100644
> --- a/configs/km_kirkwood_defconfig
> +++ b/configs/km_kirkwood_defconfig
> @@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
> # CONFIG_CMD_UBIFS is not set
> CONFIG_ENV_IS_IN_EEPROM=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> # 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 b47c1ad..112344d 100644
> --- a/configs/km_kirkwood_pci_defconfig
> +++ b/configs/km_kirkwood_pci_defconfig
> @@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
> # CONFIG_CMD_UBIFS is not set
> CONFIG_ENV_IS_IN_EEPROM=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> # CONFIG_MMC is not set
> CONFIG_SPI_FLASH=y
> CONFIG_SPI_FLASH_STMICRO=y
> diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig
> index 96c4ad0..3db48bc 100644
> --- a/configs/kmcoge5un_defconfig
> +++ b/configs/kmcoge5un_defconfig
> @@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
> # CONFIG_CMD_UBIFS is not set
> CONFIG_ENV_IS_IN_SPI_FLASH=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> # CONFIG_MMC is not set
> CONFIG_SPI_FLASH=y
> CONFIG_SPI_FLASH_STMICRO=y
> diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig
> index fec4017..b602932 100644
> --- a/configs/kmnusa_defconfig
> +++ b/configs/kmnusa_defconfig
> @@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
> # CONFIG_CMD_UBIFS is not set
> CONFIG_ENV_IS_IN_SPI_FLASH=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> # CONFIG_MMC is not set
> CONFIG_SPI_FLASH=y
> CONFIG_SPI_FLASH_STMICRO=y
> diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig
> index d1f1900..91bed21 100644
> --- a/configs/kmsugp1_defconfig
> +++ b/configs/kmsugp1_defconfig
> @@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
> # CONFIG_CMD_UBIFS is not set
> CONFIG_ENV_IS_IN_SPI_FLASH=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> # CONFIG_MMC is not set
> CONFIG_SPI_FLASH=y
> CONFIG_SPI_FLASH_STMICRO=y
> diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig
> index 9d4fbfe..a920664 100644
> --- a/configs/kmsuv31_defconfig
> +++ b/configs/kmsuv31_defconfig
> @@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
> # CONFIG_CMD_UBIFS is not set
> CONFIG_ENV_IS_IN_SPI_FLASH=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> # CONFIG_MMC is not set
> CONFIG_SPI_FLASH=y
> CONFIG_SPI_FLASH_STMICRO=y
> diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig
> index 250513d..6dff78b 100644
> --- a/configs/mgcoge3un_defconfig
> +++ b/configs/mgcoge3un_defconfig
> @@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
> # CONFIG_CMD_UBIFS is not set
> CONFIG_ENV_IS_IN_EEPROM=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> # CONFIG_MMC is not set
> CONFIG_SPI_FLASH=y
> CONFIG_SPI_FLASH_STMICRO=y
> diff --git a/configs/portl2_defconfig b/configs/portl2_defconfig
> index 857dec1..4ca0094 100644
> --- a/configs/portl2_defconfig
> +++ b/configs/portl2_defconfig
> @@ -26,6 +26,7 @@ CONFIG_CMD_UBI=y
> # CONFIG_CMD_UBIFS is not set
> CONFIG_ENV_IS_IN_EEPROM=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> # CONFIG_MMC is not set
> CONFIG_SPI_FLASH=y
> CONFIG_SPI_FLASH_STMICRO=y
> diff --git a/configs/theadorable_debug_defconfig
> b/configs/theadorable_debug_defconfig index b62645e..43c6e2c 100644
> --- a/configs/theadorable_debug_defconfig
> +++ b/configs/theadorable_debug_defconfig
> @@ -44,6 +44,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
> CONFIG_SPL_OF_TRANSLATE=y
> CONFIG_SATA_MV=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_RAM=y
> CONFIG_FPGA_ALTERA=y
> CONFIG_DM_GPIO=y
> # CONFIG_MMC is not set
> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> index 40a0755..eabfd13 100644
> --- a/drivers/bootcount/Kconfig
> +++ b/drivers/bootcount/Kconfig
> @@ -40,6 +40,12 @@ config BOOTCOUNT_ENV
> So the Userspace Application must set the
> "upgrade_available" and "bootcount" variable to 0, if a boot was
> successfully.
> +config BOOTCOUNT_RAM
> + bool "Boot counter in RAM"
> + help
> + Store the bootcount in DRAM protected against against bit
^^^^^^^^^^^^^^ - this
could be probably
written in a better way.
> errors
> + due to short power loss or holding a system in RESET.
> +
> endchoice
>
> config SYS_BOOTCOUNT_SINGLEWORD
> diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
> index ed58d1e..ca23952 100644
> --- a/include/configs/km/km_arm.h
> +++ b/include/configs/km/km_arm.h
> @@ -277,8 +277,6 @@ int get_scl(void);
> #define CONFIG_KM_RESERVED_PRAM 0x801000
> /* address for the bootcount (taken from end of RAM) */
> #define BOOTCOUNT_ADDR (CONFIG_KM_RESERVED_PRAM)
> -/* Use generic bootcount RAM driver */
> -#define CONFIG_BOOTCOUNT_RAM
>
> /* enable POST tests */
> #define CONFIG_POST (CONFIG_SYS_POST_MEM_REGIONS)
> diff --git a/include/configs/theadorable.h
> b/include/configs/theadorable.h index ec9dc2e..a3b5c87 100644
> --- a/include/configs/theadorable.h
> +++ b/include/configs/theadorable.h
> @@ -83,7 +83,6 @@
> /*
> * Bootcounter
> */
> -#define CONFIG_BOOTCOUNT_RAM
> /* Max size of RAM minus BOOTCOUNT_ADDR is the bootcounter address */
> #define BOOTCOUNT_ADDR 0x1000
>
> diff --git a/scripts/config_whitelist.txt
> b/scripts/config_whitelist.txt index 0fd4ad6..487c790 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -150,7 +150,6 @@ CONFIG_BOOTBLOCK
> CONFIG_BOOTCOUNT_ALEN
> CONFIG_BOOTCOUNT_I2C
> CONFIG_BOOTCOUNT_LIMIT
> -CONFIG_BOOTCOUNT_RAM
> CONFIG_BOOTFILE
> CONFIG_BOOTMAPSZ
> CONFIG_BOOTMODE
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/101a1529/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 6/8] Convert CONFIG_BOOTCOUNT_I2C to Kconfig
2018-02-11 12:06 ` [U-Boot] [PATCH 6/8] Convert CONFIG_BOOTCOUNT_I2C " Alex Kiernan
@ 2018-02-11 19:05 ` Lukasz Majewski
0 siblings, 0 replies; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-11 19:05 UTC (permalink / raw)
To: u-boot
On Sun, 11 Feb 2018 12:06:51 +0000
Alex Kiernan <alex.kiernan@gmail.com> wrote:
> This converts the following to Kconfig:
> CONFIG_BOOTCOUNT_I2C
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
>
> README | 6 ------
> configs/ids8313_defconfig | 1 +
> drivers/bootcount/Kconfig | 9 +++++++++
> include/configs/ids8313.h | 1 -
> scripts/config_whitelist.txt | 1 -
> 5 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/README b/README
> index 20637e0..a7b0890 100644
> --- a/README
> +++ b/README
> @@ -2321,12 +2321,6 @@ The following options need to be configured:
> enable special bootcounter support on at91sam9xe
> based boards. CONFIG_SOC_DA8XX
> enable special bootcounter support on da850 based
> boards.
> - CONFIG_BOOTCOUNT_I2C
> - enable support for the bootcounter on an i2c (like
> RTC) device.
> - CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
> - CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which
> is used for
> - the bootcounter.
> - CONFIG_BOOTCOUNT_ALEN = address len
> CONFIG_BOOTCOUNT_EXT
> enable support for the bootcounter in EXT filesystem
> CONFIG_SYS_BOOTCOUNT_ADDR = RAM address used
> for read diff --git a/configs/ids8313_defconfig
> b/configs/ids8313_defconfig index 3e67c55..eb931ce 100644
> --- a/configs/ids8313_defconfig
> +++ b/configs/ids8313_defconfig
> @@ -30,6 +30,7 @@
> CONFIG_MTDIDS_DEFAULT="nor0=ff800000.flash,nand0=e1000000.flash"
> CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:7m(dum),768k(BOOT-BIN),128k(BOOT-ENV),128k(BOOT-REDENV);e1000000.flash:-(ubi)"
> CONFIG_CMD_UBI=y CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_I2C=y
> # CONFIG_MMC is not set
> CONFIG_MTD_NOR_FLASH=y
> CONFIG_PHYLIB=y
> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> index eabfd13..8c19ae6 100644
> --- a/drivers/bootcount/Kconfig
> +++ b/drivers/bootcount/Kconfig
> @@ -46,6 +46,15 @@ config BOOTCOUNT_RAM
> Store the bootcount in DRAM protected against against bit
> errors due to short power loss or holding a system in RESET.
>
> +config BOOTCOUNT_I2C
> + bool "Boot counter on I2C device"
> + help
> + Enable support for the bootcounter on an i2c (like RTC)
> device.
> + CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
> + CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for
> + the bootcounter.
> + CONFIG_BOOTCOUNT_ALEN = address len
> +
> endchoice
>
> config SYS_BOOTCOUNT_SINGLEWORD
> diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
> index 529cbf1..fe39221 100644
> --- a/include/configs/ids8313.h
> +++ b/include/configs/ids8313.h
> @@ -516,7 +516,6 @@
> #define CONFIG_MTD_PARTITIONS
>
> /* bootcount support */
> -#define CONFIG_BOOTCOUNT_I2C
> #define CONFIG_BOOTCOUNT_ALEN 1
> #define CONFIG_SYS_BOOTCOUNT_ADDR 0x9
>
> diff --git a/scripts/config_whitelist.txt
> b/scripts/config_whitelist.txt index 487c790..aa1d51f 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -148,7 +148,6 @@ CONFIG_BOOGER
> CONFIG_BOOM
> CONFIG_BOOTBLOCK
> CONFIG_BOOTCOUNT_ALEN
> -CONFIG_BOOTCOUNT_I2C
> CONFIG_BOOTCOUNT_LIMIT
> CONFIG_BOOTFILE
> CONFIG_BOOTMAPSZ
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/1a01812c/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 7/8] Integrate AT91 bootcount driver
2018-02-11 12:06 ` [U-Boot] [PATCH 7/8] Integrate AT91 bootcount driver Alex Kiernan
@ 2018-02-11 19:05 ` Lukasz Majewski
0 siblings, 0 replies; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-11 19:05 UTC (permalink / raw)
To: u-boot
On Sun, 11 Feb 2018 12:06:52 +0000
Alex Kiernan <alex.kiernan@gmail.com> wrote:
> Integrate Boot counter for Atmel AT91SAM9XE into Kconfig
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
>
> drivers/bootcount/Kconfig | 5 +++++
> drivers/bootcount/Makefile | 2 +-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> index 8c19ae6..e0d1fc2 100644
> --- a/drivers/bootcount/Kconfig
> +++ b/drivers/bootcount/Kconfig
> @@ -13,6 +13,7 @@ if BOOTCOUNT_LIMIT
> choice
> prompt "Boot count device"
> default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
> + default BOOTCOUNT_AT91 if AT91SAM9XE
>
> config BOOTCOUNT_EXT
> bool "Boot counter on EXT filesystem"
> @@ -55,6 +56,10 @@ config BOOTCOUNT_I2C
> the bootcounter.
> CONFIG_BOOTCOUNT_ALEN = address len
>
> +config BOOTCOUNT_AT91
> + bool "Boot counter for Atmel AT91SAM9XE"
> + depends on AT91SAM9XE
> +
> endchoice
>
> config SYS_BOOTCOUNT_SINGLEWORD
> diff --git a/drivers/bootcount/Makefile b/drivers/bootcount/Makefile
> index 62bf55e..a3658c1 100644
> --- a/drivers/bootcount/Makefile
> +++ b/drivers/bootcount/Makefile
> @@ -3,7 +3,7 @@
> #
>
> obj-y += bootcount.o
> -obj-$(CONFIG_AT91SAM9XE) += bootcount_at91.o
> +obj-$(CONFIG_BOOTCOUNT_AT91) += bootcount_at91.o
> obj-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
> obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
> obj-$(CONFIG_BOOTCOUNT_ENV) += bootcount_env.o
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/ea101851/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT
2018-02-11 12:06 ` [U-Boot] [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT Alex Kiernan
@ 2018-02-11 19:08 ` Lukasz Majewski
2018-02-16 2:13 ` Heinrich Schuchardt
2018-02-12 7:29 ` [U-Boot] EXT: " Ray, Ian
1 sibling, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-11 19:08 UTC (permalink / raw)
To: u-boot
On Sun, 11 Feb 2018 12:06:46 +0000
Alex Kiernan <alex.kiernan@gmail.com> wrote:
> CONFIG_BOOTCOUNT was only used in mx53ppd, merge it with
> CONFIG_BOOTCOUNT_LIMIT
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
>
> configs/mx53ppd_defconfig | 1 -
> drivers/bootcount/Kconfig | 9 +--------
> 2 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig
> index b83cf72..d6a1c6a 100644
> --- a/configs/mx53ppd_defconfig
> +++ b/configs/mx53ppd_defconfig
> @@ -20,7 +20,6 @@ CONFIG_CMD_EXT4=y
> CONFIG_CMD_EXT4_WRITE=y
> CONFIG_CMD_FAT=y
> CONFIG_CMD_FS_GENERIC=y
> -CONFIG_BOOTCOUNT=y
> CONFIG_BOOTCOUNT_LIMIT=y
> CONFIG_BOOTCOUNT_EXT=y
> CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="0:5"
> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> index d82289f..da2ccab 100644
> --- a/drivers/bootcount/Kconfig
> +++ b/drivers/bootcount/Kconfig
> @@ -4,13 +4,6 @@
>
> menu "Boot count support"
>
> -config BOOTCOUNT
> - bool "Enable Boot count support"
> - help
> - Enable boot count support, which provides the ability to
> store the
> - number of times the board has booted on a number of
> different
> - persistent storage mediums.
> -
> config BOOTCOUNT_LIMIT
> bool "Enable support for checking boot count limit"
> help
> @@ -23,7 +16,7 @@ config SYS_BOOTCOUNT_SINGLEWORD
> This option enables packing boot count magic value and
> boot count into single word (32 bits).
>
> -if BOOTCOUNT
> +if BOOTCOUNT_LIMIT
>
> config BOOTCOUNT_EXT
> bool "Boot counter on EXT filesystem"
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/fddd8343/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 2/8] Prepare for multiple bootcount drivers
2018-02-11 12:06 ` [U-Boot] [PATCH 2/8] Prepare for multiple bootcount drivers Alex Kiernan
@ 2018-02-11 19:08 ` Lukasz Majewski
0 siblings, 0 replies; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-11 19:08 UTC (permalink / raw)
To: u-boot
On Sun, 11 Feb 2018 12:06:47 +0000
Alex Kiernan <alex.kiernan@gmail.com> wrote:
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
>
> drivers/bootcount/Kconfig | 25 +++++++++++--------------
> 1 file changed, 11 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> index da2ccab..26fec89 100644
> --- a/drivers/bootcount/Kconfig
> +++ b/drivers/bootcount/Kconfig
> @@ -2,29 +2,30 @@
> # Boot count configuration
> #
>
> -menu "Boot count support"
> -
> -config BOOTCOUNT_LIMIT
> +menuconfig BOOTCOUNT_LIMIT
> bool "Enable support for checking boot count limit"
> help
> Enable checking for exceeding the boot count limit.
> More information:
> http://www.denx.de/wiki/DULG/UBootBootCountLimit
> -config SYS_BOOTCOUNT_SINGLEWORD
> - bool "Use single word to pack boot count and magic value"
> - help
> - This option enables packing boot count magic value and
> boot count
> - into single word (32 bits).
> -
> if BOOTCOUNT_LIMIT
>
> +choice
> + prompt "Boot count device"
> +
> config BOOTCOUNT_EXT
> bool "Boot counter on EXT filesystem"
> help
> Add support for maintaining boot count in a file on an EXT
> filesystem.
>
> -if BOOTCOUNT_EXT
> +endchoice
> +
> +config SYS_BOOTCOUNT_SINGLEWORD
> + bool "Use single word to pack boot count and magic value"
> + help
> + This option enables packing boot count magic value and
> boot count
> + into single word (32 bits).
>
> config SYS_BOOTCOUNT_EXT_INTERFACE
> string "Interface on which to find boot counter EXT
> filesystem" @@ -57,7 +58,3 @@ config SYS_BOOTCOUNT_ADDR
> Set the address used for reading and writing the boot
> counter.
> endif
> -
> -endif
> -
> -endmenu
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/b8aa7a6b/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 3/8] Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig
2018-02-11 12:06 ` [U-Boot] [PATCH 3/8] Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig Alex Kiernan
@ 2018-02-11 19:08 ` Lukasz Majewski
2018-02-12 7:58 ` [U-Boot] Antwort: " Hannes Schmelzer
1 sibling, 0 replies; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-11 19:08 UTC (permalink / raw)
To: u-boot
On Sun, 11 Feb 2018 12:06:48 +0000
Alex Kiernan <alex.kiernan@gmail.com> wrote:
> This converts the following to Kconfig:
> CONFIG_BOOTCOUNT_AM33XX
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
>
> drivers/bootcount/Kconfig | 9 +++++++++
> drivers/bootcount/Makefile | 1 -
> include/configs/am335x_evm.h | 1 -
> include/configs/am335x_sl50.h | 1 -
> include/configs/baltos.h | 2 --
> include/configs/bav335x.h | 1 -
> include/configs/brppt1.h | 1 -
> include/configs/chiliboard.h | 1 -
> scripts/config_whitelist.txt | 1 -
> 9 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> index 26fec89..e905295 100644
> --- a/drivers/bootcount/Kconfig
> +++ b/drivers/bootcount/Kconfig
> @@ -12,6 +12,7 @@ if BOOTCOUNT_LIMIT
>
> choice
> prompt "Boot count device"
> + default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
>
> config BOOTCOUNT_EXT
> bool "Boot counter on EXT filesystem"
> @@ -19,6 +20,14 @@ config BOOTCOUNT_EXT
> Add support for maintaining boot count in a file on an EXT
> filesystem.
>
> +config BOOTCOUNT_AM33XX
> + bool "Boot counter in AM33XX RTC IP block"
> + depends on AM33XX || SOC_DA8XX
> + help
> + A bootcount driver for the RTC IP block found on many TI
> platforms.
> + This requires the RTC clocks, etc, to be enabled prior to
> use and
> + not all boards with this IP block on it will have the RTC
> in use. +
> endchoice
>
> config SYS_BOOTCOUNT_SINGLEWORD
> diff --git a/drivers/bootcount/Makefile b/drivers/bootcount/Makefile
> index 45445d2..62bf55e 100644
> --- a/drivers/bootcount/Makefile
> +++ b/drivers/bootcount/Makefile
> @@ -4,7 +4,6 @@
>
> obj-y += bootcount.o
> obj-$(CONFIG_AT91SAM9XE) += bootcount_at91.o
> -obj-$(CONFIG_SOC_DA8XX) += bootcount_davinci.o
> obj-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
> obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
> obj-$(CONFIG_BOOTCOUNT_ENV) += bootcount_env.o
> diff --git a/include/configs/am335x_evm.h
> b/include/configs/am335x_evm.h index 03791de..fff463e 100644
> --- a/include/configs/am335x_evm.h
> +++ b/include/configs/am335x_evm.h
> @@ -177,7 +177,6 @@
> /* SPL */
> #ifndef CONFIG_NOR_BOOT
> /* Bootcount using the RTC block */
> -#define CONFIG_BOOTCOUNT_AM33XX
> #define CONFIG_SYS_BOOTCOUNT_BE
>
> /* USB gadget RNDIS */
> diff --git a/include/configs/am335x_sl50.h
> b/include/configs/am335x_sl50.h index 1cb3578..4bcbaee 100644
> --- a/include/configs/am335x_sl50.h
> +++ b/include/configs/am335x_sl50.h
> @@ -74,7 +74,6 @@
> /* SPL */
>
> /* Bootcount using the RTC block */
> -#define CONFIG_BOOTCOUNT_AM33XX
> #define CONFIG_SYS_BOOTCOUNT_BE
>
> #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
> diff --git a/include/configs/baltos.h b/include/configs/baltos.h
> index 440dbf5..10979c7 100644
> --- a/include/configs/baltos.h
> +++ b/include/configs/baltos.h
> @@ -230,8 +230,6 @@
>
> /* SPL */
> #ifndef CONFIG_NOR_BOOT
> -/* Bootcount using the RTC block */
> -#define CONFIG_BOOTCOUNT_AM33XX
>
> /* USB gadget RNDIS */
>
> diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h
> index 7bbb7d1..27cb8f6 100644
> --- a/include/configs/bav335x.h
> +++ b/include/configs/bav335x.h
> @@ -339,7 +339,6 @@ DEFAULT_LINUX_BOOT_ENV \
> /* SPL */
> #ifndef CONFIG_NOR_BOOT
> /* Bootcount using the RTC block */
> -#define CONFIG_BOOTCOUNT_AM33XX
> #define CONFIG_SYS_BOOTCOUNT_BE
>
> /* USB gadget RNDIS */
> diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
> index fb2845f..30ea2d2 100644
> --- a/include/configs/brppt1.h
> +++ b/include/configs/brppt1.h
> @@ -22,7 +22,6 @@
>
> /* Bootcount using the RTC block */
> #define CONFIG_SYS_BOOTCOUNT_ADDR 0x44E3E000
> -#define CONFIG_BOOTCOUNT_AM33XX
>
> /* memory */
> #define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024)
> diff --git a/include/configs/chiliboard.h
> b/include/configs/chiliboard.h index 234cd6a..92e0479 100644
> --- a/include/configs/chiliboard.h
> +++ b/include/configs/chiliboard.h
> @@ -123,7 +123,6 @@
>
> /* SPL */
> /* Bootcount using the RTC block */
> -#define CONFIG_BOOTCOUNT_AM33XX
> #define CONFIG_SYS_BOOTCOUNT_BE
>
> /* NAND: device related configs */
> diff --git a/scripts/config_whitelist.txt
> b/scripts/config_whitelist.txt index 1be3f23..46d9d5c 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -148,7 +148,6 @@ CONFIG_BOOGER
> CONFIG_BOOM
> CONFIG_BOOTBLOCK
> CONFIG_BOOTCOUNT_ALEN
> -CONFIG_BOOTCOUNT_AM33XX
> CONFIG_BOOTCOUNT_ENV
> CONFIG_BOOTCOUNT_I2C
> CONFIG_BOOTCOUNT_LIMIT
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/ffa6b63c/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 4/8] Convert CONFIG_BOOTCOUNT_ENV to Kconfig
2018-02-11 12:06 ` [U-Boot] [PATCH 4/8] Convert CONFIG_BOOTCOUNT_ENV " Alex Kiernan
@ 2018-02-11 19:09 ` Lukasz Majewski
2018-02-13 9:30 ` Lukasz Majewski
1 sibling, 0 replies; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-11 19:09 UTC (permalink / raw)
To: u-boot
On Sun, 11 Feb 2018 12:06:49 +0000
Alex Kiernan <alex.kiernan@gmail.com> wrote:
> This converts the following to Kconfig:
> CONFIG_BOOTCOUNT_ENV
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
>
> README | 11 -----------
> configs/draco_defconfig | 1 +
> configs/etamin_defconfig | 1 +
> configs/pxm2_defconfig | 1 +
> configs/rastaban_defconfig | 1 +
> configs/rut_defconfig | 1 +
> configs/thuban_defconfig | 1 +
> drivers/bootcount/Kconfig | 12 ++++++++++++
> include/configs/siemens-am33x-common.h | 2 --
> scripts/config_whitelist.txt | 1 -
> 10 files changed, 18 insertions(+), 14 deletions(-)
>
> diff --git a/README b/README
> index f51f670..0581b58 100644
> --- a/README
> +++ b/README
> @@ -714,17 +714,6 @@ The following options need to be configured:
> RAM and NFS.
>
> - Bootcount:
> - CONFIG_BOOTCOUNT_ENV
> - If no softreset save registers are found on the
> hardware
> - "bootcount" is stored in the environment. To prevent
> a
> - saveenv on all reboots, the environment variable
> - "upgrade_available" is used. If "upgrade_available"
> is
> - 0, "bootcount" is always 0, if "upgrade_available" is
> - 1 "bootcount" is incremented in the environment.
> - So the Userspace Applikation must set the
> "upgrade_available"
> - and "bootcount" variable to 0, if a boot was
> successfully. -
> -- Pre-Boot Commands:
> CONFIG_PREBOOT
>
> When this option is #defined, the existence of the
> diff --git a/configs/draco_defconfig b/configs/draco_defconfig
> index 693d91c..0416daa 100644
> --- a/configs/draco_defconfig
> +++ b/configs/draco_defconfig
> @@ -52,6 +52,7 @@ CONFIG_OF_CONTROL=y
> CONFIG_OF_EMBED=y
> CONFIG_ENV_IS_IN_NAND=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_ENV=y
> CONFIG_DFU_NAND=y
> CONFIG_MMC_OMAP_HS=y
> CONFIG_NAND=y
> diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig
> index e7a3d22..7d639ea 100644
> --- a/configs/etamin_defconfig
> +++ b/configs/etamin_defconfig
> @@ -52,6 +52,7 @@ CONFIG_OF_CONTROL=y
> CONFIG_OF_EMBED=y
> CONFIG_ENV_IS_IN_NAND=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_ENV=y
> CONFIG_DFU_NAND=y
> CONFIG_MMC_OMAP_HS=y
> CONFIG_NAND=y
> diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
> index 6063259..90783b4 100644
> --- a/configs/pxm2_defconfig
> +++ b/configs/pxm2_defconfig
> @@ -55,6 +55,7 @@ CONFIG_OF_CONTROL=y
> CONFIG_OF_EMBED=y
> CONFIG_ENV_IS_IN_NAND=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_ENV=y
> CONFIG_DFU_NAND=y
> CONFIG_MMC_OMAP_HS=y
> CONFIG_NAND=y
> diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
> index ce6981e..c0947e9 100644
> --- a/configs/rastaban_defconfig
> +++ b/configs/rastaban_defconfig
> @@ -52,6 +52,7 @@ CONFIG_OF_CONTROL=y
> CONFIG_OF_EMBED=y
> CONFIG_ENV_IS_IN_NAND=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_ENV=y
> CONFIG_DFU_NAND=y
> CONFIG_MMC_OMAP_HS=y
> CONFIG_NAND=y
> diff --git a/configs/rut_defconfig b/configs/rut_defconfig
> index b31eb97..685b4c8 100644
> --- a/configs/rut_defconfig
> +++ b/configs/rut_defconfig
> @@ -56,6 +56,7 @@ CONFIG_OF_CONTROL=y
> CONFIG_OF_EMBED=y
> CONFIG_ENV_IS_IN_NAND=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_ENV=y
> CONFIG_DFU_NAND=y
> CONFIG_MMC_OMAP_HS=y
> CONFIG_NAND=y
> diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig
> index 4a3c0cd..f5d1077 100644
> --- a/configs/thuban_defconfig
> +++ b/configs/thuban_defconfig
> @@ -52,6 +52,7 @@ CONFIG_OF_CONTROL=y
> CONFIG_OF_EMBED=y
> CONFIG_ENV_IS_IN_NAND=y
> CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_BOOTCOUNT_ENV=y
> CONFIG_DFU_NAND=y
> CONFIG_MMC_OMAP_HS=y
> CONFIG_NAND=y
> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> index e905295..40a0755 100644
> --- a/drivers/bootcount/Kconfig
> +++ b/drivers/bootcount/Kconfig
> @@ -28,6 +28,18 @@ config BOOTCOUNT_AM33XX
> This requires the RTC clocks, etc, to be enabled prior to
> use and not all boards with this IP block on it will have the RTC in
> use.
> +config BOOTCOUNT_ENV
> + bool "Boot counter in environment"
> + help
> + If no softreset save registers are found on the hardware
> + "bootcount" is stored in the environment. To prevent a
> + saveenv on all reboots, the environment variable
> + "upgrade_available" is used. If "upgrade_available" is
> + 0, "bootcount" is always 0, if "upgrade_available" is
> + 1 "bootcount" is incremented in the environment.
> + So the Userspace Application must set the
> "upgrade_available"
> + and "bootcount" variable to 0, if a boot was successfully.
> +
> endchoice
>
> config SYS_BOOTCOUNT_SINGLEWORD
> diff --git a/include/configs/siemens-am33x-common.h
> b/include/configs/siemens-am33x-common.h index eb4b1f6..a7b427f 100644
> --- a/include/configs/siemens-am33x-common.h
> +++ b/include/configs/siemens-am33x-common.h
> @@ -500,6 +500,4 @@
> #define CONFIG_RESET_TO_RETRY
> #define CONFIG_BOOT_RETRY_TIME 60
>
> -#define CONFIG_BOOTCOUNT_ENV
> -
> #endif /* ! __CONFIG_SIEMENS_AM33X_COMMON_H */
> diff --git a/scripts/config_whitelist.txt
> b/scripts/config_whitelist.txt index 46d9d5c..0fd4ad6 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -148,7 +148,6 @@ CONFIG_BOOGER
> CONFIG_BOOM
> CONFIG_BOOTBLOCK
> CONFIG_BOOTCOUNT_ALEN
> -CONFIG_BOOTCOUNT_ENV
> CONFIG_BOOTCOUNT_I2C
> CONFIG_BOOTCOUNT_LIMIT
> CONFIG_BOOTCOUNT_RAM
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/829385ff/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-11 12:06 ` [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig Alex Kiernan
@ 2018-02-11 19:36 ` Lukasz Majewski
2018-02-11 21:04 ` Alex Kiernan
0 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-11 19:36 UTC (permalink / raw)
To: u-boot
Hi Alex,
> Make generate boot counter selected in the same way as other boot
> count drivers
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
>
> drivers/bootcount/Kconfig | 11 +++++++++++
> drivers/bootcount/Makefile | 2 +-
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> index e0d1fc2..9fde2f2 100644
> --- a/drivers/bootcount/Kconfig
> +++ b/drivers/bootcount/Kconfig
> @@ -14,6 +14,16 @@ choice
> prompt "Boot count device"
> default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
> default BOOTCOUNT_AT91 if AT91SAM9XE
> + default BOOTCOUNT_GENERIC
> +
> +config BOOTCOUNT_GENERIC
> + bool "Generic default boot counter"
> + help
> + Generic bootcount stored at SYS_BOOTCOUNT_ADDR.
> +
> + SYS_BOOTCOUNT_ADDR:
> + Set to the address where the bootcount and bootcount
> magic
> + will be stored.
>
> config BOOTCOUNT_EXT
> bool "Boot counter on EXT filesystem"
> @@ -64,6 +74,7 @@ endchoice
>
> config SYS_BOOTCOUNT_SINGLEWORD
> bool "Use single word to pack boot count and magic value"
> + depends on BOOTCOUNT_GENERIC
> help
> This option enables packing boot count magic value and
> boot count into single word (32 bits).
> diff --git a/drivers/bootcount/Makefile b/drivers/bootcount/Makefile
> index a3658c1..3e1ae8c 100644
> --- a/drivers/bootcount/Makefile
> +++ b/drivers/bootcount/Makefile
> @@ -2,7 +2,7 @@
> # SPDX-License-Identifier: GPL-2.0+
> #
>
> -obj-y += bootcount.o
> +obj-$(CONFIG_BOOTCOUNT_GENERIC) += bootcount.o
> obj-$(CONFIG_BOOTCOUNT_AT91) += bootcount_at91.o
> obj-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
> obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
Reviewed-by: Lukasz Majewski <lukma@denx.de>
I had to put attached patch (one liner) to make it working on my setup
(this allows re-using the SYS_BOOTCOUNT_ADDR on non EXT setup).
Could you squash this patch to your work and send v2?
Thanks in advance,
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-bootcount-Kconfig-Enable-CONFIG_SYS_BOOTCOUNT_ADDR-t.patch
Type: text/x-patch
Size: 906 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/eae34b25/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/eae34b25/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-11 19:36 ` Lukasz Majewski
@ 2018-02-11 21:04 ` Alex Kiernan
2018-02-11 21:44 ` Lukasz Majewski
0 siblings, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-11 21:04 UTC (permalink / raw)
To: u-boot
On Sun, Feb 11, 2018 at 7:36 PM, Lukasz Majewski <lukma@denx.de> wrote:
> Hi Alex,
>
>> Make generate boot counter selected in the same way as other boot
>> count drivers
>>
>> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
>> ---
>>
>> drivers/bootcount/Kconfig | 11 +++++++++++
>> drivers/bootcount/Makefile | 2 +-
>> 2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
>> index e0d1fc2..9fde2f2 100644
>> --- a/drivers/bootcount/Kconfig
>> +++ b/drivers/bootcount/Kconfig
>> @@ -14,6 +14,16 @@ choice
>> prompt "Boot count device"
>> default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
>> default BOOTCOUNT_AT91 if AT91SAM9XE
>> + default BOOTCOUNT_GENERIC
>> +
>> +config BOOTCOUNT_GENERIC
>> + bool "Generic default boot counter"
>> + help
>> + Generic bootcount stored at SYS_BOOTCOUNT_ADDR.
>> +
>> + SYS_BOOTCOUNT_ADDR:
>> + Set to the address where the bootcount and bootcount
>> magic
>> + will be stored.
>>
>> config BOOTCOUNT_EXT
>> bool "Boot counter on EXT filesystem"
>> @@ -64,6 +74,7 @@ endchoice
>>
>> config SYS_BOOTCOUNT_SINGLEWORD
>> bool "Use single word to pack boot count and magic value"
>> + depends on BOOTCOUNT_GENERIC
>> help
>> This option enables packing boot count magic value and
>> boot count into single word (32 bits).
>> diff --git a/drivers/bootcount/Makefile b/drivers/bootcount/Makefile
>> index a3658c1..3e1ae8c 100644
>> --- a/drivers/bootcount/Makefile
>> +++ b/drivers/bootcount/Makefile
>> @@ -2,7 +2,7 @@
>> # SPDX-License-Identifier: GPL-2.0+
>> #
>>
>> -obj-y += bootcount.o
>> +obj-$(CONFIG_BOOTCOUNT_GENERIC) += bootcount.o
>> obj-$(CONFIG_BOOTCOUNT_AT91) += bootcount_at91.o
>> obj-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
>> obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
>
> Reviewed-by: Lukasz Majewski <lukma@denx.de>
>
>
> I had to put attached patch (one liner) to make it working on my setup
> (this allows re-using the SYS_BOOTCOUNT_ADDR on non EXT setup).
>
> Could you squash this patch to your work and send v2?
>
I'm not really sure what the right thing to do with SYS_BOOTCOUNT_ADDR is...
The default is only right for BOOTCOUNT_EXT (and then only on a
specific board?) and elsewhere it's mostly set in board configs. In my
case I actually want it to be defined based on a other bits of memory
map . Maybe it's been overloaded too much and really wants to be a
variable per driver?
That said, squashing in that change doesn't obviously break anything
for me, and is probably a step in the right direction.
I'll see what Travis thinks.
--
Alex Kiernan
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-11 21:04 ` Alex Kiernan
@ 2018-02-11 21:44 ` Lukasz Majewski
2018-02-12 5:55 ` Alex Kiernan
0 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-11 21:44 UTC (permalink / raw)
To: u-boot
On Sun, 11 Feb 2018 21:04:46 +0000
Alex Kiernan <alex.kiernan@gmail.com> wrote:
> On Sun, Feb 11, 2018 at 7:36 PM, Lukasz Majewski <lukma@denx.de>
> wrote:
> > Hi Alex,
> >
> >> Make generate boot counter selected in the same way as other boot
> >> count drivers
> >>
> >> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> >> ---
> >>
> >> drivers/bootcount/Kconfig | 11 +++++++++++
> >> drivers/bootcount/Makefile | 2 +-
> >> 2 files changed, 12 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> >> index e0d1fc2..9fde2f2 100644
> >> --- a/drivers/bootcount/Kconfig
> >> +++ b/drivers/bootcount/Kconfig
> >> @@ -14,6 +14,16 @@ choice
> >> prompt "Boot count device"
> >> default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
> >> default BOOTCOUNT_AT91 if AT91SAM9XE
> >> + default BOOTCOUNT_GENERIC
> >> +
> >> +config BOOTCOUNT_GENERIC
> >> + bool "Generic default boot counter"
> >> + help
> >> + Generic bootcount stored at SYS_BOOTCOUNT_ADDR.
> >> +
> >> + SYS_BOOTCOUNT_ADDR:
> >> + Set to the address where the bootcount and bootcount
> >> magic
> >> + will be stored.
> >>
> >> config BOOTCOUNT_EXT
> >> bool "Boot counter on EXT filesystem"
> >> @@ -64,6 +74,7 @@ endchoice
> >>
> >> config SYS_BOOTCOUNT_SINGLEWORD
> >> bool "Use single word to pack boot count and magic value"
> >> + depends on BOOTCOUNT_GENERIC
> >> help
> >> This option enables packing boot count magic value and
> >> boot count into single word (32 bits).
> >> diff --git a/drivers/bootcount/Makefile
> >> b/drivers/bootcount/Makefile index a3658c1..3e1ae8c 100644
> >> --- a/drivers/bootcount/Makefile
> >> +++ b/drivers/bootcount/Makefile
> >> @@ -2,7 +2,7 @@
> >> # SPDX-License-Identifier: GPL-2.0+
> >> #
> >>
> >> -obj-y += bootcount.o
> >> +obj-$(CONFIG_BOOTCOUNT_GENERIC) += bootcount.o
> >> obj-$(CONFIG_BOOTCOUNT_AT91) += bootcount_at91.o
> >> obj-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
> >> obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
> >
> > Reviewed-by: Lukasz Majewski <lukma@denx.de>
> >
> >
> > I had to put attached patch (one liner) to make it working on my
> > setup (this allows re-using the SYS_BOOTCOUNT_ADDR on non EXT
> > setup).
> >
> > Could you squash this patch to your work and send v2?
> >
>
> I'm not really sure what the right thing to do with
> SYS_BOOTCOUNT_ADDR is...
>
> The default is only right for BOOTCOUNT_EXT (and then only on a
> specific board?) and elsewhere it's mostly set in board configs. In my
> case I actually want it to be defined based on a other bits of memory
> map . Maybe it's been overloaded too much and really wants to be a
> variable per driver?
It is defined in a few places though:
git grep -n "SYS_BOOTCOUNT_ADDR" [1]
However, for my builds I did not observed the build breaks (build
definately breaks when this value is "") - but in my patch I do also
use BOOTCOUNT, which is not defined in [1] boards.
Hence, (when BOOTCOUNT is not defined) boards [1] use
SYS_BOOTCOUNT_ADDR from their ./include/configs/<board>.h.
When, I do define BOOTCOUNT on my board, then I _must_ also define
correct SYS_BOOTCOUNT_ADDR in my ./configs/<board>_defconfig.
Please look into following patchset:
http://patchwork.ozlabs.org/cover/871655/
>
> That said, squashing in that change doesn't obviously break anything
> for me, and is probably a step in the right direction.
>
> I'll see what Travis thinks.
>
We will probably receive build breaks...
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/fbad5194/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-11 21:44 ` Lukasz Majewski
@ 2018-02-12 5:55 ` Alex Kiernan
2018-02-12 8:48 ` Lukasz Majewski
0 siblings, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-12 5:55 UTC (permalink / raw)
To: u-boot
On Sun, Feb 11, 2018 at 9:44 PM, Lukasz Majewski <lukma@denx.de> wrote:
> On Sun, 11 Feb 2018 21:04:46 +0000
> Alex Kiernan <alex.kiernan@gmail.com> wrote:
>
>>
>> That said, squashing in that change doesn't obviously break anything
>> for me, and is probably a step in the right direction.
>>
>> I'll see what Travis thinks.
>>
>
> We will probably receive build breaks...
Yup... https://travis-ci.org/akiernan/u-boot/jobs/340344489
Just tried again on one of those failures (x600) with the the default
removed and just set the on board that uses CONFIG_EXT, but that then
fails at config time.
TBH I'd actually like to take it out of Kconfig (which I realise is
the wrong direction) as it just feels fundamentally wrong the way it
is. I don't know what the U-Boot approach configuration like this
is... struggling to find prior art.
--
Alex Kiernan
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] EXT: [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT
2018-02-11 12:06 ` [U-Boot] [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT Alex Kiernan
2018-02-11 19:08 ` Lukasz Majewski
@ 2018-02-12 7:29 ` Ray, Ian
1 sibling, 0 replies; 33+ messages in thread
From: Ray, Ian @ 2018-02-12 7:29 UTC (permalink / raw)
To: u-boot
> On 11 Feb 2018, at 14.06, Alex Kiernan <alex.kiernan@gmail.com> wrote:
>
> CONFIG_BOOTCOUNT was only used in mx53ppd, merge it with
> CONFIG_BOOTCOUNT_LIMIT
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Ian Ray <ian.ray@ge.com>
> ---
>
> configs/mx53ppd_defconfig | 1 -
> drivers/bootcount/Kconfig | 9 +--------
> 2 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig
> index b83cf72..d6a1c6a 100644
> --- a/configs/mx53ppd_defconfig
> +++ b/configs/mx53ppd_defconfig
> @@ -20,7 +20,6 @@ CONFIG_CMD_EXT4=y
> CONFIG_CMD_EXT4_WRITE=y
> CONFIG_CMD_FAT=y
> CONFIG_CMD_FS_GENERIC=y
> -CONFIG_BOOTCOUNT=y
> CONFIG_BOOTCOUNT_LIMIT=y
> CONFIG_BOOTCOUNT_EXT=y
> CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="0:5"
> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
> index d82289f..da2ccab 100644
> --- a/drivers/bootcount/Kconfig
> +++ b/drivers/bootcount/Kconfig
> @@ -4,13 +4,6 @@
>
> menu "Boot count support"
>
> -config BOOTCOUNT
> - bool "Enable Boot count support"
> - help
> - Enable boot count support, which provides the ability to store the
> - number of times the board has booted on a number of different
> - persistent storage mediums.
> -
> config BOOTCOUNT_LIMIT
> bool "Enable support for checking boot count limit"
> help
> @@ -23,7 +16,7 @@ config SYS_BOOTCOUNT_SINGLEWORD
> This option enables packing boot count magic value and boot count
> into single word (32 bits).
>
> -if BOOTCOUNT
> +if BOOTCOUNT_LIMIT
>
> config BOOTCOUNT_EXT
> bool "Boot counter on EXT filesystem"
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] Antwort: [PATCH 3/8] Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig
2018-02-11 12:06 ` [U-Boot] [PATCH 3/8] Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig Alex Kiernan
2018-02-11 19:08 ` Lukasz Majewski
@ 2018-02-12 7:58 ` Hannes Schmelzer
1 sibling, 0 replies; 33+ messages in thread
From: Hannes Schmelzer @ 2018-02-12 7:58 UTC (permalink / raw)
To: u-boot
>
> This converts the following to Kconfig:
> CONFIG_BOOTCOUNT_AM33XX
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
> include/configs/brppt1.h | 1 -
for the brppt1 files:
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Acked-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-12 5:55 ` Alex Kiernan
@ 2018-02-12 8:48 ` Lukasz Majewski
2018-02-12 10:27 ` Lukasz Majewski
2018-02-13 9:51 ` Alex Kiernan
0 siblings, 2 replies; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-12 8:48 UTC (permalink / raw)
To: u-boot
Hi Alex,
> On Sun, Feb 11, 2018 at 9:44 PM, Lukasz Majewski <lukma@denx.de>
> wrote:
> > On Sun, 11 Feb 2018 21:04:46 +0000
> > Alex Kiernan <alex.kiernan@gmail.com> wrote:
> >
> >>
> >> That said, squashing in that change doesn't obviously break
> >> anything for me, and is probably a step in the right direction.
> >>
> >> I'll see what Travis thinks.
> >>
> >
> > We will probably receive build breaks...
>
> Yup... https://travis-ci.org/akiernan/u-boot/jobs/340344489
>
> Just tried again on one of those failures (x600) with the the default
> removed and just set the on board that uses CONFIG_EXT, but that then
> fails at config time.
Ok. I see
>
> TBH I'd actually like to take it out of Kconfig (which I realise is
> the wrong direction) as it just feels fundamentally wrong the way it
> is.
To finish moving SYS_BOOTCOUNT_ADDR to Kconfig we would need to add its
definition to each eligible ./configs/<board>_defconfig file.
Then we would have the previous behaviour preserved.
> I don't know what the U-Boot approach configuration like this
> is... struggling to find prior art.
Let's ask Tom for his opinion as he did much such work before.
>
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180212/4ae14a19/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-12 8:48 ` Lukasz Majewski
@ 2018-02-12 10:27 ` Lukasz Majewski
2018-02-13 9:51 ` Alex Kiernan
1 sibling, 0 replies; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-12 10:27 UTC (permalink / raw)
To: u-boot
On Mon, 12 Feb 2018 09:48:13 +0100
Lukasz Majewski <lukma@denx.de> wrote:
> Hi Alex,
>
> > On Sun, Feb 11, 2018 at 9:44 PM, Lukasz Majewski <lukma@denx.de>
> > wrote:
> > > On Sun, 11 Feb 2018 21:04:46 +0000
> > > Alex Kiernan <alex.kiernan@gmail.com> wrote:
> > >
> > >>
> > >> That said, squashing in that change doesn't obviously break
> > >> anything for me, and is probably a step in the right direction.
> > >>
> > >> I'll see what Travis thinks.
> > >>
> > >
> > > We will probably receive build breaks...
> >
> > Yup... https://travis-ci.org/akiernan/u-boot/jobs/340344489
> >
> > Just tried again on one of those failures (x600) with the the
> > default removed and just set the on board that uses CONFIG_EXT, but
> > that then fails at config time.
>
> Ok. I see
>
> >
> > TBH I'd actually like to take it out of Kconfig (which I realise is
> > the wrong direction) as it just feels fundamentally wrong the way it
> > is.
>
> To finish moving SYS_BOOTCOUNT_ADDR to Kconfig we would need to add
> its definition to each eligible ./configs/<board>_defconfig file.
>
> Then we would have the previous behaviour preserved.
>
> > I don't know what the U-Boot approach configuration like this
> > is... struggling to find prior art.
I had similar issue with HW_WATCHDOG conversion:
http://patchwork.ozlabs.org/cover/871576/
especially:
http://patchwork.ozlabs.org/patch/871579/
>
> Let's ask Tom for his opinion as he did much such work before.
>
> >
>
>
> 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 at 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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180212/a4d9625c/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 4/8] Convert CONFIG_BOOTCOUNT_ENV to Kconfig
2018-02-11 12:06 ` [U-Boot] [PATCH 4/8] Convert CONFIG_BOOTCOUNT_ENV " Alex Kiernan
2018-02-11 19:09 ` Lukasz Majewski
@ 2018-02-13 9:30 ` Lukasz Majewski
2018-02-13 9:52 ` Alex Kiernan
1 sibling, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-13 9:30 UTC (permalink / raw)
To: u-boot
Hi Alex,
> - Bootcount:
> - CONFIG_BOOTCOUNT_ENV
> - If no softreset save registers are found on the
> hardware
> - "bootcount" is stored in the environment. To prevent
> a
> - saveenv on all reboots, the environment variable
> - "upgrade_available" is used. If "upgrade_available"
> is
> - 0, "bootcount" is always 0, if "upgrade_available" is
> - 1 "bootcount" is incremented in the environment.
> - So the Userspace Applikation must set the
> "upgrade_available"
> - and "bootcount" variable to 0, if a boot was
> successfully. -
> -- Pre-Boot Commands:
^^^^^^^^^^^ - This line shall be keep. The "- Bootcount:" Above
shall be deleted instead.
> CONFIG_PREBOOT
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180213/d2029c36/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-12 8:48 ` Lukasz Majewski
2018-02-12 10:27 ` Lukasz Majewski
@ 2018-02-13 9:51 ` Alex Kiernan
2018-02-13 14:41 ` Lukasz Majewski
1 sibling, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-13 9:51 UTC (permalink / raw)
To: u-boot
On Mon, Feb 12, 2018 at 8:48 AM, Lukasz Majewski <lukma@denx.de> wrote:
> Hi Alex,
>
>> On Sun, Feb 11, 2018 at 9:44 PM, Lukasz Majewski <lukma@denx.de>
>> wrote:
>> > On Sun, 11 Feb 2018 21:04:46 +0000
>> > Alex Kiernan <alex.kiernan@gmail.com> wrote:
>> >
>> >>
>> >> That said, squashing in that change doesn't obviously break
>> >> anything for me, and is probably a step in the right direction.
>> >>
>> >> I'll see what Travis thinks.
>> >>
>> >
>> > We will probably receive build breaks...
>>
>> Yup... https://travis-ci.org/akiernan/u-boot/jobs/340344489
>>
>> Just tried again on one of those failures (x600) with the the default
>> removed and just set the on board that uses CONFIG_EXT, but that then
>> fails at config time.
>
> Ok. I see
>
>>
>> TBH I'd actually like to take it out of Kconfig (which I realise is
>> the wrong direction) as it just feels fundamentally wrong the way it
>> is.
>
> To finish moving SYS_BOOTCOUNT_ADDR to Kconfig we would need to add its
> definition to each eligible ./configs/<board>_defconfig file.
>
> Then we would have the previous behaviour preserved.
>
>> I don't know what the U-Boot approach configuration like this
>> is... struggling to find prior art.
>
> Let's ask Tom for his opinion as he did much such work before.
>
Thoughts:
- Do nothing, leave CONFIG_SYS_BOOTCOUNT_ADDR as a purely CONFIG_EXT
piece of Kconfig
- Rename CONFIG_SYS_BOOTCOUNT_ADDR to something like
CONFIG_SYS_BOOTCOUNT_ADDR_EXT for just CONFIG_EXT
- Remove CONFIG_SYS_BOOTCOUNT_ADDR from Kconfig altogether (and rename
to say SYS_BOOTCOUNT_ADDR)
- Pick through every config building defaults - okay for some boards,
but lots have it defined based on other memory offsets
I think the only real options are the last two.
Whatever we do, I think CONFIG_SYS_BOOTCOUNT_ADDR wants splitting into
at least two:
- I2C - an offset from an I2C base for the bootcounter
- Others - an actual address used for storing the bootcounter
I'm struggling to see why EXT is the way it is - AFAICS the location
it uses to access/return the bootcounter is basically local to the two
functions in bootcount_ext and could just be a local variable.
--
Alex Kiernan
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 4/8] Convert CONFIG_BOOTCOUNT_ENV to Kconfig
2018-02-13 9:30 ` Lukasz Majewski
@ 2018-02-13 9:52 ` Alex Kiernan
0 siblings, 0 replies; 33+ messages in thread
From: Alex Kiernan @ 2018-02-13 9:52 UTC (permalink / raw)
To: u-boot
On Tue, Feb 13, 2018 at 9:30 AM, Lukasz Majewski <lukma@denx.de> wrote:
> Hi Alex,
>
>> - Bootcount:
>> - CONFIG_BOOTCOUNT_ENV
>> - If no softreset save registers are found on the
>> hardware
>> - "bootcount" is stored in the environment. To prevent
>> a
>> - saveenv on all reboots, the environment variable
>> - "upgrade_available" is used. If "upgrade_available"
>> is
>> - 0, "bootcount" is always 0, if "upgrade_available" is
>> - 1 "bootcount" is incremented in the environment.
>> - So the Userspace Applikation must set the
>> "upgrade_available"
>> - and "bootcount" variable to 0, if a boot was
>> successfully. -
>> -- Pre-Boot Commands:
> ^^^^^^^^^^^ - This line shall be keep. The "- Bootcount:" Above
> shall be deleted instead.
>
Ooh, good spot!
--
Alex Kiernan
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-13 9:51 ` Alex Kiernan
@ 2018-02-13 14:41 ` Lukasz Majewski
2018-02-14 6:23 ` Alex Kiernan
0 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-13 14:41 UTC (permalink / raw)
To: u-boot
Hi Alex,
> On Mon, Feb 12, 2018 at 8:48 AM, Lukasz Majewski <lukma@denx.de>
> wrote:
> > Hi Alex,
> >
> >> On Sun, Feb 11, 2018 at 9:44 PM, Lukasz Majewski <lukma@denx.de>
> >> wrote:
> >> > On Sun, 11 Feb 2018 21:04:46 +0000
> >> > Alex Kiernan <alex.kiernan@gmail.com> wrote:
> >> >
> >> >>
> >> >> That said, squashing in that change doesn't obviously break
> >> >> anything for me, and is probably a step in the right direction.
> >> >>
> >> >> I'll see what Travis thinks.
> >> >>
> >> >
> >> > We will probably receive build breaks...
> >>
> >> Yup... https://travis-ci.org/akiernan/u-boot/jobs/340344489
> >>
> >> Just tried again on one of those failures (x600) with the the
> >> default removed and just set the on board that uses CONFIG_EXT,
> >> but that then fails at config time.
> >
> > Ok. I see
> >
> >>
> >> TBH I'd actually like to take it out of Kconfig (which I realise is
> >> the wrong direction) as it just feels fundamentally wrong the way
> >> it is.
> >
> > To finish moving SYS_BOOTCOUNT_ADDR to Kconfig we would need to add
> > its definition to each eligible ./configs/<board>_defconfig file.
> >
> > Then we would have the previous behaviour preserved.
> >
> >> I don't know what the U-Boot approach configuration like this
> >> is... struggling to find prior art.
> >
> > Let's ask Tom for his opinion as he did much such work before.
> >
>
> Thoughts:
>
> - Do nothing, leave CONFIG_SYS_BOOTCOUNT_ADDR as a purely CONFIG_EXT
> piece of Kconfig
> - Rename CONFIG_SYS_BOOTCOUNT_ADDR to something like
> CONFIG_SYS_BOOTCOUNT_ADDR_EXT for just CONFIG_EXT
> - Remove CONFIG_SYS_BOOTCOUNT_ADDR from Kconfig altogether (and rename
> to say SYS_BOOTCOUNT_ADDR)
> - Pick through every config building defaults - okay for some boards,
> but lots have it defined based on other memory offsets
>
> I think the only real options are the last two.
I would go for third option - Remove the SYS_BOOTCOUNT_ADDR from
Kconfig (also for EXT).
>
> Whatever we do, I think CONFIG_SYS_BOOTCOUNT_ADDR wants splitting into
> at least two:
>
> - I2C - an offset from an I2C base for the bootcounter
- RAM/SoC memory - location of special register to store bootcounter
> - Others - an actual address used for storing the bootcounter
>
> I'm struggling to see why EXT is the way it is - AFAICS the location
> it uses to access/return the bootcounter is basically local to the two
> functions in bootcount_ext and could just be a local variable.
>
Maybe we can replace it with local, static variable then?
As said above - I would remove the (wrongly?) used BOOTCOUNT_ADDR in
Kconfig.
Then, for next merge window we can play around with moving
CONFIG_SYS_BOOTCOUNT_ADDR per boards if needed.
I just do have a feeling that -rc2 is too late for it....
Also, wrong SYS_BOOTCOUNT_ADDR will not be caught in build testing and
may cause boards to silency break.
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180213/0894ba15/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-13 14:41 ` Lukasz Majewski
@ 2018-02-14 6:23 ` Alex Kiernan
2018-02-14 8:53 ` Lukasz Majewski
0 siblings, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-14 6:23 UTC (permalink / raw)
To: u-boot
On Tue, Feb 13, 2018 at 2:41 PM, Lukasz Majewski <lukma@denx.de> wrote:
> Hi Alex,
>
>> On Mon, Feb 12, 2018 at 8:48 AM, Lukasz Majewski <lukma@denx.de>
>> wrote:
>> > Hi Alex,
>> >
>> >> On Sun, Feb 11, 2018 at 9:44 PM, Lukasz Majewski <lukma@denx.de>
>> >> wrote:
>> >> > On Sun, 11 Feb 2018 21:04:46 +0000
>> >> > Alex Kiernan <alex.kiernan@gmail.com> wrote:
>> >> >
>> >> >>
>> >> >> That said, squashing in that change doesn't obviously break
>> >> >> anything for me, and is probably a step in the right direction.
>> >> >>
>> >> >> I'll see what Travis thinks.
>> >> >>
>> >> >
>> >> > We will probably receive build breaks...
>> >>
>> >> Yup... https://travis-ci.org/akiernan/u-boot/jobs/340344489
>> >>
>> >> Just tried again on one of those failures (x600) with the the
>> >> default removed and just set the on board that uses CONFIG_EXT,
>> >> but that then fails at config time.
>> >
>> > Ok. I see
>> >
>> >>
>> >> TBH I'd actually like to take it out of Kconfig (which I realise is
>> >> the wrong direction) as it just feels fundamentally wrong the way
>> >> it is.
>> >
>> > To finish moving SYS_BOOTCOUNT_ADDR to Kconfig we would need to add
>> > its definition to each eligible ./configs/<board>_defconfig file.
>> >
>> > Then we would have the previous behaviour preserved.
>> >
>> >> I don't know what the U-Boot approach configuration like this
>> >> is... struggling to find prior art.
>> >
>> > Let's ask Tom for his opinion as he did much such work before.
>> >
>>
>> Thoughts:
>>
>> - Do nothing, leave CONFIG_SYS_BOOTCOUNT_ADDR as a purely CONFIG_EXT
>> piece of Kconfig
>> - Rename CONFIG_SYS_BOOTCOUNT_ADDR to something like
>> CONFIG_SYS_BOOTCOUNT_ADDR_EXT for just CONFIG_EXT
>> - Remove CONFIG_SYS_BOOTCOUNT_ADDR from Kconfig altogether (and rename
>> to say SYS_BOOTCOUNT_ADDR)
>> - Pick through every config building defaults - okay for some boards,
>> but lots have it defined based on other memory offsets
>>
>> I think the only real options are the last two.
>
> I would go for third option - Remove the SYS_BOOTCOUNT_ADDR from
> Kconfig (also for EXT).
>
I agree.
>>
>> Whatever we do, I think CONFIG_SYS_BOOTCOUNT_ADDR wants splitting into
>> at least two:
>>
>> - I2C - an offset from an I2C base for the bootcounter
> - RAM/SoC memory - location of special register to store bootcounter
>> - Others - an actual address used for storing the bootcounter
>
>
>
>>
>> I'm struggling to see why EXT is the way it is - AFAICS the location
>> it uses to access/return the bootcounter is basically local to the two
>> functions in bootcount_ext and could just be a local variable.
>>
>
> Maybe we can replace it with local, static variable then?
>
>
> As said above - I would remove the (wrongly?) used BOOTCOUNT_ADDR in
> Kconfig.
>
Just removing SYS_BOOTCOUNT_ADDR from Kconfig and putting the default
back into bootcount_ext seems like the simplest correct change. I'll
add that onto the series and throw it at Travis.
> Then, for next merge window we can play around with moving
> CONFIG_SYS_BOOTCOUNT_ADDR per boards if needed.
>
> I just do have a feeling that -rc2 is too late for it....
>
> Also, wrong SYS_BOOTCOUNT_ADDR will not be caught in build testing and
> may cause boards to silency break.
>
Yeah...
--
Alex Kiernan
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-14 6:23 ` Alex Kiernan
@ 2018-02-14 8:53 ` Lukasz Majewski
2018-02-14 16:34 ` Alex Kiernan
0 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-14 8:53 UTC (permalink / raw)
To: u-boot
Hi Alex,
> On Tue, Feb 13, 2018 at 2:41 PM, Lukasz Majewski <lukma@denx.de>
> wrote:
> > Hi Alex,
> >
> >> On Mon, Feb 12, 2018 at 8:48 AM, Lukasz Majewski <lukma@denx.de>
> >> wrote:
> >> > Hi Alex,
> >> >
> >> >> On Sun, Feb 11, 2018 at 9:44 PM, Lukasz Majewski <lukma@denx.de>
> >> >> wrote:
> >> >> > On Sun, 11 Feb 2018 21:04:46 +0000
> >> >> > Alex Kiernan <alex.kiernan@gmail.com> wrote:
> >> >> >
> >> >> >>
> >> >> >> That said, squashing in that change doesn't obviously break
> >> >> >> anything for me, and is probably a step in the right
> >> >> >> direction.
> >> >> >>
> >> >> >> I'll see what Travis thinks.
> >> >> >>
> >> >> >
> >> >> > We will probably receive build breaks...
> >> >>
> >> >> Yup... https://travis-ci.org/akiernan/u-boot/jobs/340344489
> >> >>
> >> >> Just tried again on one of those failures (x600) with the the
> >> >> default removed and just set the on board that uses CONFIG_EXT,
> >> >> but that then fails at config time.
> >> >
> >> > Ok. I see
> >> >
> >> >>
> >> >> TBH I'd actually like to take it out of Kconfig (which I
> >> >> realise is the wrong direction) as it just feels fundamentally
> >> >> wrong the way it is.
> >> >
> >> > To finish moving SYS_BOOTCOUNT_ADDR to Kconfig we would need to
> >> > add its definition to each eligible ./configs/<board>_defconfig
> >> > file.
> >> >
> >> > Then we would have the previous behaviour preserved.
> >> >
> >> >> I don't know what the U-Boot approach configuration like this
> >> >> is... struggling to find prior art.
> >> >
> >> > Let's ask Tom for his opinion as he did much such work before.
> >> >
> >>
> >> Thoughts:
> >>
> >> - Do nothing, leave CONFIG_SYS_BOOTCOUNT_ADDR as a purely
> >> CONFIG_EXT piece of Kconfig
> >> - Rename CONFIG_SYS_BOOTCOUNT_ADDR to something like
> >> CONFIG_SYS_BOOTCOUNT_ADDR_EXT for just CONFIG_EXT
> >> - Remove CONFIG_SYS_BOOTCOUNT_ADDR from Kconfig altogether (and
> >> rename to say SYS_BOOTCOUNT_ADDR)
> >> - Pick through every config building defaults - okay for some
> >> boards, but lots have it defined based on other memory offsets
> >>
> >> I think the only real options are the last two.
> >
> > I would go for third option - Remove the SYS_BOOTCOUNT_ADDR from
> > Kconfig (also for EXT).
> >
>
> I agree.
>
> >>
> >> Whatever we do, I think CONFIG_SYS_BOOTCOUNT_ADDR wants splitting
> >> into at least two:
> >>
> >> - I2C - an offset from an I2C base for the bootcounter
> > - RAM/SoC memory - location of special register to store
> > bootcounter
> >> - Others - an actual address used for storing the bootcounter
> >
> >
> >
> >>
> >> I'm struggling to see why EXT is the way it is - AFAICS the
> >> location it uses to access/return the bootcounter is basically
> >> local to the two functions in bootcount_ext and could just be a
> >> local variable.
> >
> > Maybe we can replace it with local, static variable then?
> >
> >
> > As said above - I would remove the (wrongly?) used BOOTCOUNT_ADDR in
> > Kconfig.
> >
>
> Just removing SYS_BOOTCOUNT_ADDR from Kconfig and putting the default
> back into bootcount_ext seems like the simplest correct change. I'll
> add that onto the series and throw it at Travis.
Great. I'm looking forward for next verison of the code - as I do have
some code to be put on top of it.
Thanks for help.
>
> > Then, for next merge window we can play around with moving
> > CONFIG_SYS_BOOTCOUNT_ADDR per boards if needed.
> >
> > I just do have a feeling that -rc2 is too late for it....
> >
> > Also, wrong SYS_BOOTCOUNT_ADDR will not be caught in build testing
> > and may cause boards to silency break.
> >
>
> Yeah...
>
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180214/f5614789/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-14 8:53 ` Lukasz Majewski
@ 2018-02-14 16:34 ` Alex Kiernan
2018-02-14 19:13 ` Lukasz Majewski
0 siblings, 1 reply; 33+ messages in thread
From: Alex Kiernan @ 2018-02-14 16:34 UTC (permalink / raw)
To: u-boot
On Wed, Feb 14, 2018 at 8:53 AM, Lukasz Majewski <lukma@denx.de> wrote:
>> >> Whatever we do, I think CONFIG_SYS_BOOTCOUNT_ADDR wants splitting
>> >> into at least two:
>> >>
>> >> - I2C - an offset from an I2C base for the bootcounter
>> > - RAM/SoC memory - location of special register to store
>> > bootcounter
>> >> - Others - an actual address used for storing the bootcounter
>> >
>> >
>> >
>> >>
>> >> I'm struggling to see why EXT is the way it is - AFAICS the
>> >> location it uses to access/return the bootcounter is basically
>> >> local to the two functions in bootcount_ext and could just be a
>> >> local variable.
>> >
>> > Maybe we can replace it with local, static variable then?
>> >
>> >
>> > As said above - I would remove the (wrongly?) used BOOTCOUNT_ADDR in
>> > Kconfig.
>> >
>>
>> Just removing SYS_BOOTCOUNT_ADDR from Kconfig and putting the default
>> back into bootcount_ext seems like the simplest correct change. I'll
>> add that onto the series and throw it at Travis.
>
> Great. I'm looking forward for next verison of the code - as I do have
> some code to be put on top of it.
>
So the super-trivial approach doesn't work, because
CONFIG_SYS_BOOTCOUNT_ADDR isn't in the whitelist anymore
(7af2e3648f3f6d726f6476745c2eec5de709a702) and I think the only reason
it was getting through before is because scripts/check-config.sh
doesn't parse conditionals in Kconfig so thought it was allowed :(
I expect reintroducing CONFIG_SYS_BOOTCOUNT_ADDR to
config_whitelist.txt would "fix" the problem, but that's not going to
make it in.
Which I think means I have to do the work to migrate it out of CONFIG_
land properly.
--
Alex Kiernan
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-14 16:34 ` Alex Kiernan
@ 2018-02-14 19:13 ` Lukasz Majewski
2018-02-15 14:04 ` Alex Kiernan
0 siblings, 1 reply; 33+ messages in thread
From: Lukasz Majewski @ 2018-02-14 19:13 UTC (permalink / raw)
To: u-boot
Hi Alex,
> On Wed, Feb 14, 2018 at 8:53 AM, Lukasz Majewski <lukma@denx.de>
> wrote:
> >> >> Whatever we do, I think CONFIG_SYS_BOOTCOUNT_ADDR wants
> >> >> splitting into at least two:
> >> >>
> >> >> - I2C - an offset from an I2C base for the bootcounter
> >> > - RAM/SoC memory - location of special register to store
> >> > bootcounter
> >> >> - Others - an actual address used for storing the bootcounter
> >> >
> >> >
> >> >
> >> >>
> >> >> I'm struggling to see why EXT is the way it is - AFAICS the
> >> >> location it uses to access/return the bootcounter is basically
> >> >> local to the two functions in bootcount_ext and could just be a
> >> >> local variable.
> >> >
> >> > Maybe we can replace it with local, static variable then?
> >> >
> >> >
> >> > As said above - I would remove the (wrongly?) used
> >> > BOOTCOUNT_ADDR in Kconfig.
> >> >
> >>
> >> Just removing SYS_BOOTCOUNT_ADDR from Kconfig and putting the
> >> default back into bootcount_ext seems like the simplest correct
> >> change. I'll add that onto the series and throw it at Travis.
> >
> > Great. I'm looking forward for next verison of the code - as I do
> > have some code to be put on top of it.
> >
>
> So the super-trivial approach doesn't work, because
> CONFIG_SYS_BOOTCOUNT_ADDR isn't in the whitelist anymore
> (7af2e3648f3f6d726f6476745c2eec5de709a702) and I think the only reason
> it was getting through before is because scripts/check-config.sh
> doesn't parse conditionals in Kconfig so thought it was allowed :(
>
> I expect reintroducing CONFIG_SYS_BOOTCOUNT_ADDR to
> config_whitelist.txt would "fix" the problem, but that's not going to
> make it in.
>
> Which I think means I have to do the work to migrate it out of CONFIG_
> land properly.
>
Ok. I see.
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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180214/285b33e8/attachment.sig>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig
2018-02-14 19:13 ` Lukasz Majewski
@ 2018-02-15 14:04 ` Alex Kiernan
0 siblings, 0 replies; 33+ messages in thread
From: Alex Kiernan @ 2018-02-15 14:04 UTC (permalink / raw)
To: u-boot
On Wed, Feb 14, 2018 at 7:13 PM, Lukasz Majewski <lukma@denx.de> wrote:
> Hi Alex,
>
>> On Wed, Feb 14, 2018 at 8:53 AM, Lukasz Majewski <lukma@denx.de>
>> wrote:
>> >> >> Whatever we do, I think CONFIG_SYS_BOOTCOUNT_ADDR wants
>> >> >> splitting into at least two:
>> >> >>
>> >> >> - I2C - an offset from an I2C base for the bootcounter
>> >> > - RAM/SoC memory - location of special register to store
>> >> > bootcounter
>> >> >> - Others - an actual address used for storing the bootcounter
>> >> >
>> >> >
>> >> >
>> >> >>
>> >> >> I'm struggling to see why EXT is the way it is - AFAICS the
>> >> >> location it uses to access/return the bootcounter is basically
>> >> >> local to the two functions in bootcount_ext and could just be a
>> >> >> local variable.
>> >> >
>> >> > Maybe we can replace it with local, static variable then?
>> >> >
>> >> >
>> >> > As said above - I would remove the (wrongly?) used
>> >> > BOOTCOUNT_ADDR in Kconfig.
>> >> >
>> >>
>> >> Just removing SYS_BOOTCOUNT_ADDR from Kconfig and putting the
>> >> default back into bootcount_ext seems like the simplest correct
>> >> change. I'll add that onto the series and throw it at Travis.
>> >
>> > Great. I'm looking forward for next verison of the code - as I do
>> > have some code to be put on top of it.
>> >
>>
>> So the super-trivial approach doesn't work, because
>> CONFIG_SYS_BOOTCOUNT_ADDR isn't in the whitelist anymore
>> (7af2e3648f3f6d726f6476745c2eec5de709a702) and I think the only reason
>> it was getting through before is because scripts/check-config.sh
>> doesn't parse conditionals in Kconfig so thought it was allowed :(
>>
>> I expect reintroducing CONFIG_SYS_BOOTCOUNT_ADDR to
>> config_whitelist.txt would "fix" the problem, but that's not going to
>> make it in.
>>
>> Which I think means I have to do the work to migrate it out of CONFIG_
>> land properly.
>>
>
> Ok. I see.
>
'tis done. Only I've fallen foul of the recipient limit on the mailing
list :( Will see if the two pieces get pushed out, if not I'll go and
trim the list and try again.
As you say, this isn't a patch for -rc2
--
Alex Kiernan
^ permalink raw reply [flat|nested] 33+ messages in thread
* [U-Boot] [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT
2018-02-11 19:08 ` Lukasz Majewski
@ 2018-02-16 2:13 ` Heinrich Schuchardt
0 siblings, 0 replies; 33+ messages in thread
From: Heinrich Schuchardt @ 2018-02-16 2:13 UTC (permalink / raw)
To: u-boot
On 02/11/2018 08:08 PM, Lukasz Majewski wrote:
> On Sun, 11 Feb 2018 12:06:46 +0000
> Alex Kiernan <alex.kiernan@gmail.com> wrote:
>
>> CONFIG_BOOTCOUNT was only used in mx53ppd, merge it with
>> CONFIG_BOOTCOUNT_LIMIT
>>
>> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
>> ---
>>
>> configs/mx53ppd_defconfig | 1 -
>> drivers/bootcount/Kconfig | 9 +--------
>> 2 files changed, 1 insertion(+), 9 deletions(-)
>>
>> diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig
>> index b83cf72..d6a1c6a 100644
>> --- a/configs/mx53ppd_defconfig
>> +++ b/configs/mx53ppd_defconfig
>> @@ -20,7 +20,6 @@ CONFIG_CMD_EXT4=y
>> CONFIG_CMD_EXT4_WRITE=y
>> CONFIG_CMD_FAT=y
>> CONFIG_CMD_FS_GENERIC=y
>> -CONFIG_BOOTCOUNT=y
>> CONFIG_BOOTCOUNT_LIMIT=y
>> CONFIG_BOOTCOUNT_EXT=y
>> CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="0:5"
>> diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
>> index d82289f..da2ccab 100644
>> --- a/drivers/bootcount/Kconfig
>> +++ b/drivers/bootcount/Kconfig
>> @@ -4,13 +4,6 @@
>>
>> menu "Boot count support"
>>
>> -config BOOTCOUNT
>> - bool "Enable Boot count support"
>> - help
>> - Enable boot count support, which provides the ability to
>> store the
>> - number of times the board has booted on a number of
>> different
>> - persistent storage mediums.
>> -
>> config BOOTCOUNT_LIMIT
>> bool "Enable support for checking boot count limit"
>> help
>> @@ -23,7 +16,7 @@ config SYS_BOOTCOUNT_SINGLEWORD
>> This option enables packing boot count magic value and
>> boot count into single word (32 bits).
>>
>> -if BOOTCOUNT
>> +if BOOTCOUNT_LIMIT
>>
>> config BOOTCOUNT_EXT
>> bool "Boot counter on EXT filesystem"
Please, have a look at SYS_BOOTCOUNT_SINGLEWORD.
It is only used in drivers/bootcount/bootcount.c.
drivers/bootcount/bootcount.c is only compiled if BOOTCOUNT_LIMIT is
enabled.
So with your patch it should depend on BOOTCOUNT_LIMIT.
Regards
Heinrich
^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2018-02-16 2:13 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1518350813-3418-1-git-send-email-alex.kiernan@gmail.com>
2018-02-11 12:06 ` [U-Boot] [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT Alex Kiernan
2018-02-11 19:08 ` Lukasz Majewski
2018-02-16 2:13 ` Heinrich Schuchardt
2018-02-12 7:29 ` [U-Boot] EXT: " Ray, Ian
2018-02-11 12:06 ` [U-Boot] [PATCH 2/8] Prepare for multiple bootcount drivers Alex Kiernan
2018-02-11 19:08 ` Lukasz Majewski
2018-02-11 12:06 ` [U-Boot] [PATCH 3/8] Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig Alex Kiernan
2018-02-11 19:08 ` Lukasz Majewski
2018-02-12 7:58 ` [U-Boot] Antwort: " Hannes Schmelzer
2018-02-11 12:06 ` [U-Boot] [PATCH 4/8] Convert CONFIG_BOOTCOUNT_ENV " Alex Kiernan
2018-02-11 19:09 ` Lukasz Majewski
2018-02-13 9:30 ` Lukasz Majewski
2018-02-13 9:52 ` Alex Kiernan
2018-02-11 12:06 ` [U-Boot] [PATCH 5/8] Convert CONFIG_BOOTCOUNT_RAM " Alex Kiernan
2018-02-11 19:04 ` Lukasz Majewski
2018-02-11 12:06 ` [U-Boot] [PATCH 6/8] Convert CONFIG_BOOTCOUNT_I2C " Alex Kiernan
2018-02-11 19:05 ` Lukasz Majewski
2018-02-11 12:06 ` [U-Boot] [PATCH 7/8] Integrate AT91 bootcount driver Alex Kiernan
2018-02-11 19:05 ` Lukasz Majewski
2018-02-11 12:06 ` [U-Boot] [PATCH 8/8] Migrate generic bootcount to Kconfig Alex Kiernan
2018-02-11 19:36 ` Lukasz Majewski
2018-02-11 21:04 ` Alex Kiernan
2018-02-11 21:44 ` Lukasz Majewski
2018-02-12 5:55 ` Alex Kiernan
2018-02-12 8:48 ` Lukasz Majewski
2018-02-12 10:27 ` Lukasz Majewski
2018-02-13 9:51 ` Alex Kiernan
2018-02-13 14:41 ` Lukasz Majewski
2018-02-14 6:23 ` Alex Kiernan
2018-02-14 8:53 ` Lukasz Majewski
2018-02-14 16:34 ` Alex Kiernan
2018-02-14 19:13 ` Lukasz Majewski
2018-02-15 14:04 ` Alex Kiernan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.