1f31dac4eSIan Ray# 2f31dac4eSIan Ray# Boot count configuration 3f31dac4eSIan Ray# 4f31dac4eSIan Ray 5c1e1c1ecSAlex Kiernanmenuconfig BOOTCOUNT_LIMIT 6d1ec9461SLukasz Majewski bool "Enable support for checking boot count limit" 7d1ec9461SLukasz Majewski help 8d1ec9461SLukasz Majewski Enable checking for exceeding the boot count limit. 9d1ec9461SLukasz Majewski More information: http://www.denx.de/wiki/DULG/UBootBootCountLimit 10d1ec9461SLukasz Majewski 113dccc10eSAlex Kiernanif BOOTCOUNT_LIMIT 12f31dac4eSIan Ray 13c1e1c1ecSAlex Kiernanchoice 14c1e1c1ecSAlex Kiernan prompt "Boot count device" 15c35e2d91SAlex Kiernan default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX 16bec8c647SAlex Kiernan default BOOTCOUNT_AT91 if AT91SAM9XE 17aa5a8632SAlex Kiernan default BOOTCOUNT_GENERIC 18aa5a8632SAlex Kiernan 19aa5a8632SAlex Kiernanconfig BOOTCOUNT_GENERIC 20aa5a8632SAlex Kiernan bool "Generic default boot counter" 21aa5a8632SAlex Kiernan help 22aa5a8632SAlex Kiernan Generic bootcount stored at SYS_BOOTCOUNT_ADDR. 23aa5a8632SAlex Kiernan 24aa5a8632SAlex Kiernan SYS_BOOTCOUNT_ADDR: 25aa5a8632SAlex Kiernan Set to the address where the bootcount and bootcount magic 26aa5a8632SAlex Kiernan will be stored. 27c1e1c1ecSAlex Kiernan 28f31dac4eSIan Rayconfig BOOTCOUNT_EXT 29f31dac4eSIan Ray bool "Boot counter on EXT filesystem" 30f31dac4eSIan Ray help 31f31dac4eSIan Ray Add support for maintaining boot count in a file on an EXT 32f31dac4eSIan Ray filesystem. 33f31dac4eSIan Ray 34c35e2d91SAlex Kiernanconfig BOOTCOUNT_AM33XX 35c35e2d91SAlex Kiernan bool "Boot counter in AM33XX RTC IP block" 36c35e2d91SAlex Kiernan depends on AM33XX || SOC_DA8XX 37c35e2d91SAlex Kiernan help 38c35e2d91SAlex Kiernan A bootcount driver for the RTC IP block found on many TI platforms. 39c35e2d91SAlex Kiernan This requires the RTC clocks, etc, to be enabled prior to use and 40c35e2d91SAlex Kiernan not all boards with this IP block on it will have the RTC in use. 41c35e2d91SAlex Kiernan 4204c96ed2SAlex Kiernanconfig BOOTCOUNT_ENV 4304c96ed2SAlex Kiernan bool "Boot counter in environment" 4404c96ed2SAlex Kiernan help 4504c96ed2SAlex Kiernan If no softreset save registers are found on the hardware 4604c96ed2SAlex Kiernan "bootcount" is stored in the environment. To prevent a 4704c96ed2SAlex Kiernan saveenv on all reboots, the environment variable 4804c96ed2SAlex Kiernan "upgrade_available" is used. If "upgrade_available" is 4904c96ed2SAlex Kiernan 0, "bootcount" is always 0, if "upgrade_available" is 5004c96ed2SAlex Kiernan 1 "bootcount" is incremented in the environment. 5104c96ed2SAlex Kiernan So the Userspace Application must set the "upgrade_available" 5204c96ed2SAlex Kiernan and "bootcount" variable to 0, if a boot was successfully. 5304c96ed2SAlex Kiernan 54ff5410d3SAlex Kiernanconfig BOOTCOUNT_RAM 55ff5410d3SAlex Kiernan bool "Boot counter in RAM" 56ff5410d3SAlex Kiernan help 57ff5410d3SAlex Kiernan Store the bootcount in DRAM protected against against bit errors 58ff5410d3SAlex Kiernan due to short power loss or holding a system in RESET. 59ff5410d3SAlex Kiernan 606cdd70ebSAlex Kiernanconfig BOOTCOUNT_I2C 616cdd70ebSAlex Kiernan bool "Boot counter on I2C device" 626cdd70ebSAlex Kiernan help 636cdd70ebSAlex Kiernan Enable support for the bootcounter on an i2c (like RTC) device. 646cdd70ebSAlex Kiernan CONFIG_SYS_I2C_RTC_ADDR = i2c chip address 656cdd70ebSAlex Kiernan CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for 666cdd70ebSAlex Kiernan the bootcounter. 676cdd70ebSAlex Kiernan 68bec8c647SAlex Kiernanconfig BOOTCOUNT_AT91 69bec8c647SAlex Kiernan bool "Boot counter for Atmel AT91SAM9XE" 70bec8c647SAlex Kiernan depends on AT91SAM9XE 71bec8c647SAlex Kiernan 72c1e1c1ecSAlex Kiernanendchoice 73c1e1c1ecSAlex Kiernan 744bc4f8a6SAlex Kiernanconfig BOOTCOUNT_ALEN 754bc4f8a6SAlex Kiernan int "I2C address length" 764bc4f8a6SAlex Kiernan default 1 774bc4f8a6SAlex Kiernan depends on BOOTCOUNT_I2C 784bc4f8a6SAlex Kiernan help 794bc4f8a6SAlex Kiernan Length of the the I2C address at SYS_BOOTCOUNT_ADDR for storing 804bc4f8a6SAlex Kiernan the boot counter. 814bc4f8a6SAlex Kiernan 82c1e1c1ecSAlex Kiernanconfig SYS_BOOTCOUNT_SINGLEWORD 83c1e1c1ecSAlex Kiernan bool "Use single word to pack boot count and magic value" 84aa5a8632SAlex Kiernan depends on BOOTCOUNT_GENERIC 85c1e1c1ecSAlex Kiernan help 86c1e1c1ecSAlex Kiernan This option enables packing boot count magic value and boot count 87c1e1c1ecSAlex Kiernan into single word (32 bits). 88f31dac4eSIan Ray 89f31dac4eSIan Rayconfig SYS_BOOTCOUNT_EXT_INTERFACE 90f31dac4eSIan Ray string "Interface on which to find boot counter EXT filesystem" 91f31dac4eSIan Ray default "mmc" 92f31dac4eSIan Ray depends on BOOTCOUNT_EXT 93f31dac4eSIan Ray help 94f31dac4eSIan Ray Set the interface to use when locating the filesystem to use for the 95f31dac4eSIan Ray boot counter. 96f31dac4eSIan Ray 97f31dac4eSIan Rayconfig SYS_BOOTCOUNT_EXT_DEVPART 98f31dac4eSIan Ray string "Partition of the boot counter EXT filesystem" 99f31dac4eSIan Ray default "0:1" 100f31dac4eSIan Ray depends on BOOTCOUNT_EXT 101f31dac4eSIan Ray help 102f31dac4eSIan Ray Set the partition to use when locating the filesystem to use for the 103f31dac4eSIan Ray boot counter. 104f31dac4eSIan Ray 105f31dac4eSIan Rayconfig SYS_BOOTCOUNT_EXT_NAME 106f31dac4eSIan Ray string "Path and filename of the EXT filesystem based boot counter" 107f31dac4eSIan Ray default "/boot/failures" 108f31dac4eSIan Ray depends on BOOTCOUNT_EXT 109f31dac4eSIan Ray help 110f31dac4eSIan Ray Set the filename and path of the file used to store the boot counter. 111f31dac4eSIan Ray 112f31dac4eSIan Rayconfig SYS_BOOTCOUNT_ADDR 113f31dac4eSIan Ray hex "RAM address used for reading and writing the boot counter" 114*39bcbb77STom Rini default 0x44E3E000 if BOOTCOUNT_AM33XX 115*39bcbb77STom Rini default 0xE0115FF8 if ARCH_LS1043A || ARCH_LS1021A 116*39bcbb77STom Rini depends on BOOTCOUNT_AM33XX || BOOTCOUNT_GENERIC || BOOTCOUNT_EXT || \ 117*39bcbb77STom Rini BOOTCOUNT_I2C 118f31dac4eSIan Ray help 119f31dac4eSIan Ray Set the address used for reading and writing the boot counter. 120f31dac4eSIan Ray 121f31dac4eSIan Rayendif 122