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 373bf5f13cSAlex Kiernan select SPL_AM33XX_ENABLE_RTC32K_OSC if AM33XX 38c35e2d91SAlex Kiernan help 39c35e2d91SAlex Kiernan A bootcount driver for the RTC IP block found on many TI platforms. 40c35e2d91SAlex Kiernan This requires the RTC clocks, etc, to be enabled prior to use and 41c35e2d91SAlex Kiernan not all boards with this IP block on it will have the RTC in use. 42c35e2d91SAlex Kiernan 4304c96ed2SAlex Kiernanconfig BOOTCOUNT_ENV 4404c96ed2SAlex Kiernan bool "Boot counter in environment" 4504c96ed2SAlex Kiernan help 4604c96ed2SAlex Kiernan If no softreset save registers are found on the hardware 4704c96ed2SAlex Kiernan "bootcount" is stored in the environment. To prevent a 4804c96ed2SAlex Kiernan saveenv on all reboots, the environment variable 4904c96ed2SAlex Kiernan "upgrade_available" is used. If "upgrade_available" is 5004c96ed2SAlex Kiernan 0, "bootcount" is always 0, if "upgrade_available" is 5104c96ed2SAlex Kiernan 1 "bootcount" is incremented in the environment. 5204c96ed2SAlex Kiernan So the Userspace Application must set the "upgrade_available" 5304c96ed2SAlex Kiernan and "bootcount" variable to 0, if a boot was successfully. 5404c96ed2SAlex Kiernan 55ff5410d3SAlex Kiernanconfig BOOTCOUNT_RAM 56ff5410d3SAlex Kiernan bool "Boot counter in RAM" 57ff5410d3SAlex Kiernan help 58ff5410d3SAlex Kiernan Store the bootcount in DRAM protected against against bit errors 59ff5410d3SAlex Kiernan due to short power loss or holding a system in RESET. 60ff5410d3SAlex Kiernan 616cdd70ebSAlex Kiernanconfig BOOTCOUNT_I2C 626cdd70ebSAlex Kiernan bool "Boot counter on I2C device" 636cdd70ebSAlex Kiernan help 646cdd70ebSAlex Kiernan Enable support for the bootcounter on an i2c (like RTC) device. 656cdd70ebSAlex Kiernan CONFIG_SYS_I2C_RTC_ADDR = i2c chip address 666cdd70ebSAlex Kiernan CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for 676cdd70ebSAlex Kiernan the bootcounter. 686cdd70ebSAlex Kiernan 69bec8c647SAlex Kiernanconfig BOOTCOUNT_AT91 70bec8c647SAlex Kiernan bool "Boot counter for Atmel AT91SAM9XE" 71bec8c647SAlex Kiernan depends on AT91SAM9XE 72bec8c647SAlex Kiernan 73*ebb73de1SPhilipp Tomsichconfig DM_BOOTCOUNT 74*ebb73de1SPhilipp Tomsich bool "Boot counter in a device-model device" 75*ebb73de1SPhilipp Tomsich help 76*ebb73de1SPhilipp Tomsich Enables reading/writing the bootcount in a device-model based 77*ebb73de1SPhilipp Tomsich backing store. If an entry in /chosen/u-boot,bootcount-device 78*ebb73de1SPhilipp Tomsich exists, this will be the preferred bootcount device; otherwise 79*ebb73de1SPhilipp Tomsich the first available bootcount device will be used. 80*ebb73de1SPhilipp Tomsich 81c1e1c1ecSAlex Kiernanendchoice 82c1e1c1ecSAlex Kiernan 83c9ad6bc2SAlex Kiernanconfig BOOTCOUNT_BOOTLIMIT 84c9ad6bc2SAlex Kiernan int "Maximum number of reboot cycles allowed" 85c9ad6bc2SAlex Kiernan default 0 86c9ad6bc2SAlex Kiernan help 87c9ad6bc2SAlex Kiernan Set the Maximum number of reboot cycles allowed without the boot 88c9ad6bc2SAlex Kiernan counter being cleared. 89c9ad6bc2SAlex Kiernan If set to 0 do not set a boot limit in the environment. 90c9ad6bc2SAlex Kiernan 914bc4f8a6SAlex Kiernanconfig BOOTCOUNT_ALEN 924bc4f8a6SAlex Kiernan int "I2C address length" 934bc4f8a6SAlex Kiernan default 1 944bc4f8a6SAlex Kiernan depends on BOOTCOUNT_I2C 954bc4f8a6SAlex Kiernan help 964bc4f8a6SAlex Kiernan Length of the the I2C address at SYS_BOOTCOUNT_ADDR for storing 974bc4f8a6SAlex Kiernan the boot counter. 984bc4f8a6SAlex Kiernan 99c1e1c1ecSAlex Kiernanconfig SYS_BOOTCOUNT_SINGLEWORD 100c1e1c1ecSAlex Kiernan bool "Use single word to pack boot count and magic value" 101aa5a8632SAlex Kiernan depends on BOOTCOUNT_GENERIC 102c1e1c1ecSAlex Kiernan help 103c1e1c1ecSAlex Kiernan This option enables packing boot count magic value and boot count 104c1e1c1ecSAlex Kiernan into single word (32 bits). 105f31dac4eSIan Ray 106f31dac4eSIan Rayconfig SYS_BOOTCOUNT_EXT_INTERFACE 107f31dac4eSIan Ray string "Interface on which to find boot counter EXT filesystem" 108f31dac4eSIan Ray default "mmc" 109f31dac4eSIan Ray depends on BOOTCOUNT_EXT 110f31dac4eSIan Ray help 111f31dac4eSIan Ray Set the interface to use when locating the filesystem to use for the 112f31dac4eSIan Ray boot counter. 113f31dac4eSIan Ray 114f31dac4eSIan Rayconfig SYS_BOOTCOUNT_EXT_DEVPART 115f31dac4eSIan Ray string "Partition of the boot counter EXT filesystem" 116f31dac4eSIan Ray default "0:1" 117f31dac4eSIan Ray depends on BOOTCOUNT_EXT 118f31dac4eSIan Ray help 119f31dac4eSIan Ray Set the partition to use when locating the filesystem to use for the 120f31dac4eSIan Ray boot counter. 121f31dac4eSIan Ray 122f31dac4eSIan Rayconfig SYS_BOOTCOUNT_EXT_NAME 123f31dac4eSIan Ray string "Path and filename of the EXT filesystem based boot counter" 124f31dac4eSIan Ray default "/boot/failures" 125f31dac4eSIan Ray depends on BOOTCOUNT_EXT 126f31dac4eSIan Ray help 127f31dac4eSIan Ray Set the filename and path of the file used to store the boot counter. 128f31dac4eSIan Ray 129f31dac4eSIan Rayconfig SYS_BOOTCOUNT_ADDR 130f31dac4eSIan Ray hex "RAM address used for reading and writing the boot counter" 13139bcbb77STom Rini default 0x44E3E000 if BOOTCOUNT_AM33XX 13239bcbb77STom Rini default 0xE0115FF8 if ARCH_LS1043A || ARCH_LS1021A 13339bcbb77STom Rini depends on BOOTCOUNT_AM33XX || BOOTCOUNT_GENERIC || BOOTCOUNT_EXT || \ 13439bcbb77STom Rini BOOTCOUNT_I2C 135f31dac4eSIan Ray help 136f31dac4eSIan Ray Set the address used for reading and writing the boot counter. 137f31dac4eSIan Ray 138758694ffSMarek Vasutconfig SYS_BOOTCOUNT_MAGIC 139758694ffSMarek Vasut hex "Magic value for the boot counter" 140758694ffSMarek Vasut default 0xB001C041 141758694ffSMarek Vasut help 142758694ffSMarek Vasut Set the magic value used for the boot counter. 143758694ffSMarek Vasut 144f31dac4eSIan Rayendif 145