Skip to contentSkip to conversation

Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT

PATCH In review Alex Kiernan 5 participants 33 messages Feb 11, 2018 – Feb 16, 2018 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/8 Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT

CONFIG_BOOTCOUNT was only used in mx53ppd, merge it with CONFIG_BOOTCOUNT_LIMIT

---

 configs/mx53ppd_defconfig | 1 -
 drivers/bootcount/Kconfig | 9 +--------
 2 files changed, 1 insertion(+), 9 deletions(-)
configs/mx53ppd_defconfig +0 -1
index b83cf72..d6a1c6a 100644
@@ -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"
drivers/bootcount/Kconfig +1 -8
index d82289f..da2ccab 100644
@@ -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"
Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/8 Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT

Quoted 46 lines · On Sun, 11 Feb 2018 12:06:46 +0000 Alex Kiernan <[email protected]> wrote:

CONFIG_BOOTCOUNT was only used in mx53ppd, merge it with CONFIG_BOOTCOUNT_LIMIT

---

 configs/mx53ppd_defconfig | 1 -
 drivers/bootcount/Kconfig | 9 +--------
 2 files changed, 1 insertion(+), 9 deletions(-)
configs/mx53ppd_defconfig +0 -1
index b83cf72..d6a1c6a 100644
@@ -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"
drivers/bootcount/Kconfig +0 -4
index d82289f..da2ccab 100644
@@ -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

drivers/bootcount/Kconfig +0 -1
-	  number of times the board has booted on a number of

different

drivers/bootcount/Kconfig +0 -2
-	  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).

drivers/bootcount/Kconfig config SYS_BOOTCOUNT_SINGLEWORD · line 22

Quoted 5 lines
drivers/bootcount/Kconfig +1 -1
-if BOOTCOUNT
+if BOOTCOUNT_LIMIT
 
 config BOOTCOUNT_EXT
 	bool "Boot counter on EXT filesystem"

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>

#3 lore raw

PATCH 1/8 Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT

Quoted 49 lines · Lukasz Majewski
Quoted 46 lines · On Sun, 11 Feb 2018 12:06:46 +0000 Alex Kiernan <[email protected]> wrote:

CONFIG_BOOTCOUNT was only used in mx53ppd, merge it with CONFIG_BOOTCOUNT_LIMIT

---

 configs/mx53ppd_defconfig | 1 -
 drivers/bootcount/Kconfig | 9 +--------
 2 files changed, 1 insertion(+), 9 deletions(-)
configs/mx53ppd_defconfig +0 -1
index b83cf72..d6a1c6a 100644
@@ -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"
drivers/bootcount/Kconfig +0 -4
index d82289f..da2ccab 100644
@@ -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

drivers/bootcount/Kconfig +0 -1
-	  number of times the board has booted on a number of

different

drivers/bootcount/Kconfig +0 -2
-	  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).

Quoted 5 lines

drivers/bootcount/Kconfig config SYS_BOOTCOUNT_SINGLEWORD · line 22

Quoted 5 lines
drivers/bootcount/Kconfig +1 -1
-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

Reviewed-by Ian Ray on v1 1/8
#4 lore raw

[U-Boot] EXT: [PATCH 1/8] Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT

In reply to Alex Kiernan
Quoted 7 lines · Alex Kiernan

CONFIG_BOOTCOUNT was only used in mx53ppd, merge it with CONFIG_BOOTCOUNT_LIMIT

Quoted 48 lines

---

configs/mx53ppd_defconfig | 1 -
drivers/bootcount/Kconfig | 9 +--------

2 files changed, 1 insertion(+), 9 deletions(-)
configs/mx53ppd_defconfig +0 -0
index b83cf72..d6a1c6a 100644
@@ -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"

drivers/bootcount/Kconfig +0 -0
index d82289f..da2ccab 100644
@@ -4,13 +4,6 @@
 

menu "Boot count support"

drivers/bootcount/Kconfig +0 -7
-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

drivers/bootcount/Kconfig +1 -1
@@ -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"

Signature · 1 line
2.7.4
#5 lore raw

PATCH 2/8 Prepare for multiple bootcount drivers

In reply to a message not in the archive

---

 drivers/bootcount/Kconfig | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)
drivers/bootcount/Kconfig +11 -14
index da2ccab..26fec89 100644
@@ -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
Signature · 1 line
2.7.4
#6 lore raw

PATCH 2/8 Prepare for multiple bootcount drivers

Quoted 57 lines · On Sun, 11 Feb 2018 12:06:47 +0000 Alex Kiernan <[email protected]> wrote:

---

 drivers/bootcount/Kconfig | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)
drivers/bootcount/Kconfig +1 -3
index da2ccab..26fec89 100644
@@ -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

drivers/bootcount/Kconfig +0 -4
-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

drivers/bootcount/Kconfig +9 -3
-	  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

drivers/bootcount/Kconfig +1 -0
+	  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

drivers/bootcount/Kconfig config SYS_BOOTCOUNT_ADDR · line 63

Quoted 4 lines
drivers/bootcount/Kconfig +0 -4
-
-endif
-
-endmenu

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>

#7 lore raw

PATCH 3/8 Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig

In reply to a message not in the archive

This converts the following to Kconfig:
CONFIG_BOOTCOUNT_AM33XX

---

 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(-)
drivers/bootcount/Kconfig +9 -0
index 26fec89..e905295 100644
@@ -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
drivers/bootcount/Makefile +0 -1
index 45445d2..62bf55e 100644
@@ -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
include/configs/am335x_evm.h +0 -1
index 03791de..fff463e 100644
@@ -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 */
include/configs/am335x_sl50.h +0 -1
index 1cb3578..4bcbaee 100644
@@ -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)
include/configs/baltos.h +0 -2
index 440dbf5..10979c7 100644
@@ -230,8 +230,6 @@
 
 /* SPL */
 #ifndef CONFIG_NOR_BOOT
-/* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_AM33XX
 
 /* USB gadget RNDIS */
 
include/configs/bav335x.h +0 -1
index 7bbb7d1..27cb8f6 100644
@@ -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 */
include/configs/brppt1.h +0 -1
index fb2845f..30ea2d2 100644
@@ -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)
include/configs/chiliboard.h +0 -1
index 234cd6a..92e0479 100644
@@ -123,7 +123,6 @@
 
 /* SPL */
 /* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_AM33XX
 #define CONFIG_SYS_BOOTCOUNT_BE
 
 /* NAND: device related configs */
scripts/config_whitelist.txt +0 -1
index 1be3f23..46d9d5c 100644
@@ -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
Signature · 1 line
2.7.4
#8 lore raw

PATCH 3/8 Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig

Quoted 136 lines · On Sun, 11 Feb 2018 12:06:48 +0000 Alex Kiernan <[email protected]> wrote:

This converts the following to Kconfig:
CONFIG_BOOTCOUNT_AM33XX

---

 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(-)
drivers/bootcount/Kconfig +6 -0
index 26fec89..e905295 100644
@@ -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.

drivers/bootcount/Kconfig +1 -0
+	  This requires the RTC clocks, etc, to be enabled prior to

use and

drivers/bootcount/Kconfig +1 -0
+	  not all boards with this IP block on it will have the RTC

in use. +
endchoice

config SYS_BOOTCOUNT_SINGLEWORD

drivers/bootcount/Makefile +0 -1
index 45445d2..62bf55e 100644
@@ -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
(quoted diff) +0 -0

b/include/configs/am335x_evm.h index 03791de..fff463e 100644

include/configs/am335x_evm.h +0 -1
@@ -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 */
(quoted diff) +0 -0

b/include/configs/am335x_sl50.h index 1cb3578..4bcbaee 100644

include/configs/am335x_sl50.h +0 -1
@@ -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)
include/configs/baltos.h +0 -2
index 440dbf5..10979c7 100644
@@ -230,8 +230,6 @@
 
 /* SPL */
 #ifndef CONFIG_NOR_BOOT
-/* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_AM33XX
 
 /* USB gadget RNDIS */
 
include/configs/bav335x.h +0 -1
index 7bbb7d1..27cb8f6 100644
@@ -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 */
include/configs/brppt1.h +0 -1
index fb2845f..30ea2d2 100644
@@ -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)
(quoted diff) +0 -0

b/include/configs/chiliboard.h index 234cd6a..92e0479 100644

include/configs/chiliboard.h +0 -1
@@ -123,7 +123,6 @@
 
 /* SPL */
 /* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_AM33XX
 #define CONFIG_SYS_BOOTCOUNT_BE
 
 /* NAND: device related configs */
(quoted diff) +0 -0

b/scripts/config_whitelist.txt index 1be3f23..46d9d5c 100644

scripts/config_whitelist.txt CONFIG_BOOGER · line 153

Quoted 7 lines
scripts/config_whitelist.txt +0 -1
@@ -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

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>

#10 lore raw

PATCH 4/8 Convert CONFIG_BOOTCOUNT_ENV to Kconfig

In reply to a message not in the archive

This converts the following to Kconfig:
CONFIG_BOOTCOUNT_ENV

---

 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(-)
README +0 -11
index f51f670..0581b58 100644
@@ -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
configs/draco_defconfig +1 -0
index 693d91c..0416daa 100644
@@ -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
configs/etamin_defconfig +1 -0
index e7a3d22..7d639ea 100644
@@ -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
configs/pxm2_defconfig +1 -0
index 6063259..90783b4 100644
@@ -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
configs/rastaban_defconfig +1 -0
index ce6981e..c0947e9 100644
@@ -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
configs/rut_defconfig +1 -0
index b31eb97..685b4c8 100644
@@ -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
configs/thuban_defconfig +1 -0
index 4a3c0cd..f5d1077 100644
@@ -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
drivers/bootcount/Kconfig +12 -0
index e905295..40a0755 100644
@@ -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
include/configs/siemens-am33x-common.h +0 -2
index eb4b1f6..a7b427f 100644
@@ -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 */
scripts/config_whitelist.txt +0 -1
index 46d9d5c..0fd4ad6 100644
@@ -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
Signature · 1 line
2.7.4
#11 lore raw

PATCH 4/8 Convert CONFIG_BOOTCOUNT_ENV to Kconfig

Quoted 156 lines · On Sun, 11 Feb 2018 12:06:49 +0000 Alex Kiernan <[email protected]> wrote:

This converts the following to Kconfig:
CONFIG_BOOTCOUNT_ENV

---

 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(-)
README +0 -2
index f51f670..0581b58 100644
@@ -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

README +0 -1
-		"bootcount" is stored in the environment. To prevent

a

README +0 -2
-		saveenv on all reboots, the environment variable
-		"upgrade_available" is used. If "upgrade_available"

is

README +0 -3
-		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"

README +0 -1
-		and "bootcount" variable to 0, if a boot was

successfully. -
-- Pre-Boot Commands:

README +0 -0
 		CONFIG_PREBOOT
 
 		When this option is #defined, the existence of the
configs/draco_defconfig +1 -0
index 693d91c..0416daa 100644
@@ -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
configs/etamin_defconfig +1 -0
index e7a3d22..7d639ea 100644
@@ -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
configs/pxm2_defconfig +1 -0
index 6063259..90783b4 100644
@@ -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
configs/rastaban_defconfig +1 -0
index ce6981e..c0947e9 100644
@@ -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
configs/rut_defconfig +1 -0
index b31eb97..685b4c8 100644
@@ -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
configs/thuban_defconfig +1 -0
index 4a3c0cd..f5d1077 100644
@@ -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
drivers/bootcount/Kconfig +0 -0
index e905295..40a0755 100644
@@ -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.

drivers/bootcount/Kconfig +10 -0
+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"

drivers/bootcount/Kconfig +2 -0
+	  and "bootcount" variable to 0, if a boot was successfully.
+
 endchoice
 
 config SYS_BOOTCOUNT_SINGLEWORD
(quoted diff) +0 -0

b/include/configs/siemens-am33x-common.h index eb4b1f6..a7b427f 100644

include/configs/siemens-am33x-common.h +0 -2
@@ -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 */
(quoted diff) +0 -0

b/scripts/config_whitelist.txt index 46d9d5c..0fd4ad6 100644

scripts/config_whitelist.txt CONFIG_BOOGER · line 153

Quoted 7 lines
scripts/config_whitelist.txt +0 -1
@@ -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

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>

#12 lore raw

PATCH 4/8 Convert CONFIG_BOOTCOUNT_ENV to Kconfig

In reply to Alex Kiernan

Hi Alex,

Quoted 14 lines

- Bootcount:

(quoted diff) +0 -2
-		CONFIG_BOOTCOUNT_ENV
-		If no softreset save registers are found on the

hardware

(quoted diff) +0 -1
-		"bootcount" is stored in the environment. To prevent

a

(quoted diff) +0 -2
-		saveenv on all reboots, the environment variable
-		"upgrade_available" is used. If "upgrade_available"

is

README +0 -3
-		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"

(quoted diff) +0 -1
-		and "bootcount" variable to 0, if a boot was
Quoted 2 lines

successfully. -
-- Pre-Boot Commands:

	^^^^^^^^^^^ - This line shall be keep. The "- Bootcount:" Above
	shall be deleted instead. 
Quoted 1 line

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>

#13 lore raw

PATCH 4/8 Convert CONFIG_BOOTCOUNT_ENV to Kconfig

Quoted 18 lines · Lukasz Majewski

Hi Alex,

Quoted 12 lines

- Bootcount:

(quoted diff) +0 -2
-             CONFIG_BOOTCOUNT_ENV
-             If no softreset save registers are found on the

hardware
- "bootcount" is stored in the environment. To prevent
a

(quoted diff) +0 -2
-             saveenv on all reboots, the environment variable
-             "upgrade_available" is used. If "upgrade_available"

is

README +0 -3
-             0, "bootcount" is always 0, if "upgrade_available" is
-             1 "bootcount" is incremented in the environment.
-             So the Userspace Applikation must set the
Quoted 4 lines

"upgrade_available"
- and "bootcount" variable to 0, if a boot was
successfully. -
-- Pre-Boot Commands:

Quoted 3 lines

^^^^^^^^^^^ - This line shall be keep. The "- Bootcount:" Above shall be deleted instead.

Ooh, good spot!

Signature · 1 line
Alex Kiernan
#14 lore raw

PATCH 5/8 Convert CONFIG_BOOTCOUNT_RAM to Kconfig

In reply to a message not in the archive

This converts the following to Kconfig:
CONFIG_BOOTCOUNT_RAM

---

 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(-)
README +0 -2
index 0581b58..20637e0 100644
@@ -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
configs/km_kirkwood_128m16_defconfig +1 -0
index 075b4b3..a257275 100644
@@ -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
configs/km_kirkwood_defconfig +1 -0
index 4ed097d..0d8c642 100644
@@ -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
configs/km_kirkwood_pci_defconfig +1 -0
index b47c1ad..112344d 100644
@@ -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
configs/kmcoge5un_defconfig +1 -0
index 96c4ad0..3db48bc 100644
@@ -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
configs/kmnusa_defconfig +1 -0
index fec4017..b602932 100644
@@ -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
configs/kmsugp1_defconfig +1 -0
index d1f1900..91bed21 100644
@@ -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
configs/kmsuv31_defconfig +1 -0
index 9d4fbfe..a920664 100644
@@ -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
configs/mgcoge3un_defconfig +1 -0
index 250513d..6dff78b 100644
@@ -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
configs/portl2_defconfig +1 -0
index 857dec1..4ca0094 100644
@@ -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
configs/theadorable_debug_defconfig +1 -0
index b62645e..43c6e2c 100644
@@ -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
drivers/bootcount/Kconfig +6 -0
index 40a0755..eabfd13 100644
@@ -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
include/configs/km/km_arm.h +0 -2
index ed58d1e..ca23952 100644
@@ -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)
include/configs/theadorable.h +0 -1
index ec9dc2e..a3b5c87 100644
@@ -83,7 +83,6 @@
 /*
  * Bootcounter
  */
-#define CONFIG_BOOTCOUNT_RAM
 /* Max size of RAM minus BOOTCOUNT_ADDR is the bootcounter address */
 #define BOOTCOUNT_ADDR			0x1000
 
scripts/config_whitelist.txt +0 -1
index 0fd4ad6..487c790 100644
@@ -150,7 +150,6 @@ CONFIG_BOOTBLOCK
 CONFIG_BOOTCOUNT_ALEN
 CONFIG_BOOTCOUNT_I2C
 CONFIG_BOOTCOUNT_LIMIT
-CONFIG_BOOTCOUNT_RAM
 CONFIG_BOOTFILE
 CONFIG_BOOTMAPSZ
 CONFIG_BOOTMODE
Signature · 1 line
2.7.4
#15 lore raw

PATCH 5/8 Convert CONFIG_BOOTCOUNT_RAM to Kconfig

Quoted 165 lines · On Sun, 11 Feb 2018 12:06:50 +0000 Alex Kiernan <[email protected]> wrote:

This converts the following to Kconfig:
CONFIG_BOOTCOUNT_RAM

---

 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(-)
README +0 -0
index 0581b58..20637e0 100644
@@ -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.

README +0 -2
-		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

(quoted diff) +0 -0

b/configs/km_kirkwood_128m16_defconfig index 075b4b3..a257275 100644

configs/km_kirkwood_128m16_defconfig +1 -0
@@ -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
(quoted diff) +0 -0

b/configs/km_kirkwood_defconfig index 4ed097d..0d8c642 100644

configs/km_kirkwood_defconfig +1 -0
@@ -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
(quoted diff) +0 -0

b/configs/km_kirkwood_pci_defconfig index b47c1ad..112344d 100644

configs/km_kirkwood_pci_defconfig +1 -0
@@ -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
configs/kmcoge5un_defconfig +1 -0
index 96c4ad0..3db48bc 100644
@@ -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
configs/kmnusa_defconfig +1 -0
index fec4017..b602932 100644
@@ -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
configs/kmsugp1_defconfig +1 -0
index d1f1900..91bed21 100644
@@ -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
configs/kmsuv31_defconfig +1 -0
index 9d4fbfe..a920664 100644
@@ -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
configs/mgcoge3un_defconfig +1 -0
index 250513d..6dff78b 100644
@@ -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
configs/portl2_defconfig +1 -0
index 857dec1..4ca0094 100644
@@ -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
(quoted diff) +0 -0

b/configs/theadorable_debug_defconfig index b62645e..43c6e2c 100644

configs/theadorable_debug_defconfig +1 -0
@@ -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
drivers/bootcount/Kconfig +0 -0
index 40a0755..eabfd13 100644
@@ -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.

drivers/bootcount/Kconfig config BOOTCOUNT_ENV

Quoted 4 lines
drivers/bootcount/Kconfig +4 -0
+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.

Quoted 36 lines

errors

drivers/bootcount/Kconfig +2 -0
+	  due to short power loss or holding a system in RESET.
+
 endchoice
 
 config SYS_BOOTCOUNT_SINGLEWORD
include/configs/km/km_arm.h +0 -2
index ed58d1e..ca23952 100644
@@ -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)
(quoted diff) +0 -0

b/include/configs/theadorable.h index ec9dc2e..a3b5c87 100644

include/configs/theadorable.h +0 -1
@@ -83,7 +83,6 @@
 /*
  * Bootcounter
  */
-#define CONFIG_BOOTCOUNT_RAM
 /* Max size of RAM minus BOOTCOUNT_ADDR is the bootcounter address */
 #define BOOTCOUNT_ADDR			0x1000
 
(quoted diff) +0 -0

b/scripts/config_whitelist.txt index 0fd4ad6..487c790 100644

scripts/config_whitelist.txt CONFIG_BOOTBLOCK · line 155

Quoted 7 lines
scripts/config_whitelist.txt +0 -1
@@ -150,7 +150,6 @@ CONFIG_BOOTBLOCK
 CONFIG_BOOTCOUNT_ALEN
 CONFIG_BOOTCOUNT_I2C
 CONFIG_BOOTCOUNT_LIMIT
-CONFIG_BOOTCOUNT_RAM
 CONFIG_BOOTFILE
 CONFIG_BOOTMAPSZ
 CONFIG_BOOTMODE

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>

#16 lore raw

PATCH 6/8 Convert CONFIG_BOOTCOUNT_I2C to Kconfig

In reply to a message not in the archive

This converts the following to Kconfig:
CONFIG_BOOTCOUNT_I2C

---

 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(-)
README +0 -6
index 20637e0..a7b0890 100644
@@ -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
configs/ids8313_defconfig +1 -0
index 3e67c55..eb931ce 100644
@@ -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
drivers/bootcount/Kconfig +9 -0
index eabfd13..8c19ae6 100644
@@ -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
include/configs/ids8313.h +0 -1
index 529cbf1..fe39221 100644
@@ -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
 
scripts/config_whitelist.txt +0 -1
index 487c790..aa1d51f 100644
@@ -148,7 +148,6 @@ CONFIG_BOOGER
 CONFIG_BOOM
 CONFIG_BOOTBLOCK
 CONFIG_BOOTCOUNT_ALEN
-CONFIG_BOOTCOUNT_I2C
 CONFIG_BOOTCOUNT_LIMIT
 CONFIG_BOOTFILE
 CONFIG_BOOTMAPSZ
Signature · 1 line
2.7.4
#17 lore raw

PATCH 6/8 Convert CONFIG_BOOTCOUNT_I2C to Kconfig

Quoted 83 lines · On Sun, 11 Feb 2018 12:06:51 +0000 Alex Kiernan <[email protected]> wrote:

This converts the following to Kconfig:
CONFIG_BOOTCOUNT_I2C

---

 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(-)
README +0 -0
index 20637e0..a7b0890 100644
@@ -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.

README +0 -2
-		CONFIG_BOOTCOUNT_I2C
-		enable support for the bootcounter on an i2c (like

RTC) device.

README +0 -2
-			CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
-			CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which

is used for

README +0 -2
-						    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

configs/ids8313_defconfig +0 -0
@@ -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

configs/ids8313_defconfig +1 -0
+CONFIG_BOOTCOUNT_I2C=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
drivers/bootcount/Kconfig +0 -0
index eabfd13..8c19ae6 100644
@@ -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.

drivers/bootcount/Kconfig +4 -0
+config BOOTCOUNT_I2C
+	bool "Boot counter on I2C device"
+	help
+	  Enable support for the bootcounter on an i2c (like RTC)

device.

drivers/bootcount/Kconfig +5 -0
+	  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
include/configs/ids8313.h +0 -1
index 529cbf1..fe39221 100644
@@ -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
 
(quoted diff) +0 -0

b/scripts/config_whitelist.txt index 487c790..aa1d51f 100644

scripts/config_whitelist.txt CONFIG_BOOGER · line 153

Quoted 7 lines
scripts/config_whitelist.txt +0 -1
@@ -148,7 +148,6 @@ CONFIG_BOOGER
 CONFIG_BOOM
 CONFIG_BOOTBLOCK
 CONFIG_BOOTCOUNT_ALEN
-CONFIG_BOOTCOUNT_I2C
 CONFIG_BOOTCOUNT_LIMIT
 CONFIG_BOOTFILE
 CONFIG_BOOTMAPSZ

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>

#18 lore raw

PATCH 7/8 Integrate AT91 bootcount driver

In reply to a message not in the archive

Integrate Boot counter for Atmel AT91SAM9XE into Kconfig

---

 drivers/bootcount/Kconfig  | 5 +++++
 drivers/bootcount/Makefile | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/bootcount/Kconfig +5 -0
index 8c19ae6..e0d1fc2 100644
@@ -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
drivers/bootcount/Makefile +1 -1
index 62bf55e..a3658c1 100644
@@ -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
Signature · 1 line
2.7.4
#19 lore raw

PATCH 7/8 Integrate AT91 bootcount driver

Quoted 37 lines · On Sun, 11 Feb 2018 12:06:52 +0000 Alex Kiernan <[email protected]> wrote:

Integrate Boot counter for Atmel AT91SAM9XE into Kconfig

---

 drivers/bootcount/Kconfig  | 5 +++++
 drivers/bootcount/Makefile | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/bootcount/Kconfig +5 -0
index 8c19ae6..e0d1fc2 100644
@@ -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
drivers/bootcount/Makefile +0 -0
index 62bf55e..a3658c1 100644

drivers/bootcount/Makefile line 9

Quoted 8 lines
drivers/bootcount/Makefile +1 -1
@@ -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

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>

#20 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

In reply to a message not in the archive

Make generate boot counter selected in the same way as other boot count drivers

---

 drivers/bootcount/Kconfig  | 11 +++++++++++
 drivers/bootcount/Makefile |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)
drivers/bootcount/Kconfig +11 -0
index e0d1fc2..9fde2f2 100644
@@ -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).
drivers/bootcount/Makefile +1 -1
index a3658c1..3e1ae8c 100644
@@ -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
Signature · 1 line
2.7.4
#21 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Hi Alex,

Quoted 45 lines

Make generate boot counter selected in the same way as other boot count drivers

---

 drivers/bootcount/Kconfig  | 11 +++++++++++
 drivers/bootcount/Makefile |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)
drivers/bootcount/Kconfig +9 -0
index e0d1fc2..9fde2f2 100644
@@ -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

drivers/bootcount/Kconfig +2 -0
+	    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).

drivers/bootcount/Makefile +0 -0
index a3658c1..3e1ae8c 100644

drivers/bootcount/Makefile line 8

Quoted 8 lines
drivers/bootcount/Makefile +1 -1
@@ -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

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>

#22 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Quoted 59 lines · Lukasz Majewski

Hi Alex,

Quoted 45 lines

Make generate boot counter selected in the same way as other boot count drivers

---

 drivers/bootcount/Kconfig  | 11 +++++++++++
 drivers/bootcount/Makefile |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)
drivers/bootcount/Kconfig +9 -0
index e0d1fc2..9fde2f2 100644
@@ -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

drivers/bootcount/Kconfig +2 -0
+         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).

drivers/bootcount/Makefile +0 -0
index a3658c1..3e1ae8c 100644

drivers/bootcount/Makefile line 8

Quoted 8 lines
drivers/bootcount/Makefile +1 -1
@@ -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
Quoted 5 lines

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.

Signature · 1 line
Alex Kiernan
#23 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Quoted 68 lines · On Sun, 11 Feb 2018 21:04:46 +0000 Alex Kiernan <[email protected]> wrote:
Quoted 59 lines · Lukasz Majewski

Hi Alex,

Quoted 45 lines

Make generate boot counter selected in the same way as other boot count drivers

---

 drivers/bootcount/Kconfig  | 11 +++++++++++
 drivers/bootcount/Makefile |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)
drivers/bootcount/Kconfig +9 -0
index e0d1fc2..9fde2f2 100644
@@ -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

drivers/bootcount/Kconfig +2 -0
+         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).

(quoted diff) +0 -0

b/drivers/bootcount/Makefile index a3658c1..3e1ae8c 100644

drivers/bootcount/Makefile line 8

Quoted 8 lines
drivers/bootcount/Makefile +1 -1
@@ -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  
Quoted 6 lines

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?

Quoted 8 lines

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/

Quoted 6 lines

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>

#24 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Quoted 11 lines · Lukasz Majewski
Quoted 6 lines · On Sun, 11 Feb 2018 21:04:46 +0000 Alex Kiernan <[email protected]> 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.

Signature · 1 line
Alex Kiernan
#25 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Hi Alex,

Quoted 12 lines
Quoted 10 lines · Lukasz Majewski
Quoted 6 lines · On Sun, 11 Feb 2018 21:04:46 +0000 Alex Kiernan <[email protected]> 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.

Quoted 7 lines
Quoted 1 line

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

Quoted 4 lines

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.

Quoted 2 lines

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.

Quoted 1 line

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>

#26 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Quoted 25 lines · On Mon, 12 Feb 2018 09:48:13 +0100 Lukasz Majewski <[email protected]> wrote:

Hi Alex,

Quoted 12 lines
Quoted 10 lines · Lukasz Majewski
Quoted 6 lines · On Sun, 11 Feb 2018 21:04:46 +0000 Alex Kiernan <[email protected]> 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.

Quoted 7 lines
Quoted 1 line

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

Quoted 1 line
Quoted 11 lines
Quoted 3 lines

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.

Quoted 2 lines

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/

Quoted 8 lines

Let's ask Tom for his opinion as he did much such work before.

Quoted 1 line

Best regards,

Quoted 7 lines

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>

#27 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

In reply to Lukasz Majewski
Quoted 32 lines · Lukasz Majewski

Hi Alex,

Quoted 12 lines
Quoted 10 lines · Lukasz Majewski
Quoted 6 lines · On Sun, 11 Feb 2018 21:04:46 +0000 Alex Kiernan <[email protected]> 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.

Quoted 7 lines
Quoted 1 line

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

Quoted 4 lines

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.

Quoted 7 lines

Then we would have the previous behaviour preserved.

Quoted 2 lines

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.

Signature · 1 line
Alex Kiernan
#28 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Hi Alex,

Quoted 53 lines
Quoted 32 lines · Lukasz Majewski

Hi Alex,

Quoted 12 lines
Quoted 10 lines · Lukasz Majewski
Quoted 6 lines · On Sun, 11 Feb 2018 21:04:46 +0000 Alex Kiernan <[email protected]> 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.

Quoted 7 lines
Quoted 1 line

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

Quoted 4 lines

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.

Quoted 7 lines

Then we would have the previous behaviour preserved.

Quoted 2 lines

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

Quoted 1 line

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).

Quoted 5 lines

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

Quoted 9 lines

- 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>

#29 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Quoted 55 lines · Lukasz Majewski

Hi Alex,

Quoted 53 lines
Quoted 32 lines · Lukasz Majewski

Hi Alex,

Quoted 12 lines
Quoted 10 lines · Lukasz Majewski
Quoted 6 lines · On Sun, 11 Feb 2018 21:04:46 +0000 Alex Kiernan <[email protected]> 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.

Quoted 7 lines
Quoted 1 line

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

Quoted 4 lines

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.

Quoted 7 lines

Then we would have the previous behaviour preserved.

Quoted 2 lines

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

Quoted 5 lines
Quoted 1 line

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.

Quoted 16 lines
Quoted 5 lines

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

Quoted 9 lines

- 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.

Quoted 6 lines

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.

Quoted 8 lines

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...

Signature · 1 line
Alex Kiernan
#30 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Hi Alex,

Quoted 87 lines
Quoted 57 lines · Lukasz Majewski

Hi Alex,

Quoted 55 lines
Quoted 34 lines · Lukasz Majewski

Hi Alex,

Quoted 13 lines
Quoted 11 lines · Lukasz Majewski
Quoted 7 lines · On Sun, 11 Feb 2018 21:04:46 +0000 Alex Kiernan <[email protected]> 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.

Quoted 7 lines
Quoted 1 line

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

Quoted 4 lines

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.

Quoted 7 lines

Then we would have the previous behaviour preserved.

Quoted 2 lines

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

Quoted 5 lines
Quoted 1 line

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.

Quoted 20 lines
Quoted 5 lines

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

Quoted 9 lines

- 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?

Quoted 7 lines
Quoted 3 lines

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.

Quoted 4 lines
Quoted 4 lines

Then, for next merge window we can play around with moving CONFIG_SYS_BOOTCOUNT_ADDR per boards if needed.

Quoted 8 lines
Quoted 5 lines

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>

#31 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Quoted 23 lines · Lukasz Majewski
Quoted 23 lines
Quoted 22 lines
Quoted 4 lines

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

Quoted 9 lines

- 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.

Quoted 7 lines
Quoted 3 lines

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.

Signature · 1 line
Alex Kiernan
#32 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Hi Alex,

Quoted 39 lines
Quoted 23 lines · Lukasz Majewski
Quoted 23 lines
Quoted 22 lines
Quoted 4 lines

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

Quoted 9 lines

- 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.

Quoted 7 lines
Quoted 3 lines

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 :(

Quoted 7 lines

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>

#33 lore raw

PATCH 8/8 Migrate generic bootcount to Kconfig

Quoted 45 lines · Lukasz Majewski

Hi Alex,

Quoted 43 lines
Quoted 23 lines · Lukasz Majewski
Quoted 23 lines
Quoted 22 lines
Quoted 4 lines

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

Quoted 9 lines

- 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.

Quoted 7 lines
Quoted 3 lines

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.

Quoted 6 lines
Quoted 3 lines

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

Signature · 1 line
Alex Kiernan