Kconfig 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. #
  2. # Boot count configuration
  3. #
  4. menuconfig BOOTCOUNT_LIMIT
  5. bool "Enable support for checking boot count limit"
  6. help
  7. Enable checking for exceeding the boot count limit.
  8. More information: http://www.denx.de/wiki/DULG/UBootBootCountLimit
  9. if BOOTCOUNT_LIMIT
  10. choice
  11. prompt "Boot count device"
  12. default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
  13. default BOOTCOUNT_AT91 if AT91SAM9XE
  14. default BOOTCOUNT_GENERIC
  15. config BOOTCOUNT_GENERIC
  16. bool "Generic default boot counter"
  17. help
  18. Generic bootcount stored at SYS_BOOTCOUNT_ADDR.
  19. SYS_BOOTCOUNT_ADDR:
  20. Set to the address where the bootcount and bootcount magic
  21. will be stored.
  22. config BOOTCOUNT_EXT
  23. bool "Boot counter on EXT filesystem"
  24. depends on FS_EXT4
  25. select EXT4_WRITE
  26. help
  27. Add support for maintaining boot count in a file on an EXT
  28. filesystem.
  29. config BOOTCOUNT_AM33XX
  30. bool "Boot counter in AM33XX RTC IP block"
  31. depends on AM33XX || SOC_DA8XX
  32. select SPL_AM33XX_ENABLE_RTC32K_OSC if AM33XX
  33. help
  34. A bootcount driver for the RTC IP block found on many TI platforms.
  35. This requires the RTC clocks, etc, to be enabled prior to use and
  36. not all boards with this IP block on it will have the RTC in use.
  37. config BOOTCOUNT_ENV
  38. bool "Boot counter in environment"
  39. help
  40. If no softreset save registers are found on the hardware
  41. "bootcount" is stored in the environment. To prevent a
  42. saveenv on all reboots, the environment variable
  43. "upgrade_available" is used. If "upgrade_available" is
  44. 0, "bootcount" is always 0, if "upgrade_available" is
  45. 1 "bootcount" is incremented in the environment.
  46. So the Userspace Application must set the "upgrade_available"
  47. and "bootcount" variable to 0, if a boot was successfully.
  48. config BOOTCOUNT_RAM
  49. bool "Boot counter in RAM"
  50. help
  51. Store the bootcount in DRAM protected against against bit errors
  52. due to short power loss or holding a system in RESET.
  53. config BOOTCOUNT_I2C
  54. bool "Boot counter on I2C device"
  55. help
  56. Enable support for the bootcounter on an i2c (like RTC) device.
  57. CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
  58. CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for
  59. the bootcounter.
  60. config BOOTCOUNT_AT91
  61. bool "Boot counter for Atmel AT91SAM9XE"
  62. depends on AT91SAM9XE
  63. config DM_BOOTCOUNT
  64. bool "Boot counter in a device-model device"
  65. help
  66. Enables reading/writing the bootcount in a device-model based
  67. backing store. If an entry in /chosen/u-boot,bootcount-device
  68. exists, this will be the preferred bootcount device; otherwise
  69. the first available bootcount device will be used.
  70. endchoice
  71. if DM_BOOTCOUNT
  72. menu "Backing stores for device-model backed bootcount"
  73. config DM_BOOTCOUNT_RTC
  74. bool "Support RTC devices as a backing store for bootcount"
  75. depends on DM_RTC
  76. help
  77. Enabled reading/writing the bootcount in a DM RTC device.
  78. The wrapper device is to be specified with the compatible string
  79. 'u-boot,bootcount-rtc' and the 'rtc'-property (a phandle pointing
  80. to the underlying RTC device) and an optional 'offset' property
  81. are supported.
  82. Accesses to the backing store are performed using the write16
  83. and read16 ops of DM RTC devices.
  84. config DM_BOOTCOUNT_I2C_EEPROM
  85. bool "Support i2c eeprom devices as a backing store for bootcount"
  86. depends on I2C_EEPROM
  87. help
  88. Enabled reading/writing the bootcount in a DM i2c eeprom device.
  89. The wrapper device is to be specified with the compatible string
  90. 'u-boot,bootcount-i2c-eeprom' and the 'i2c-eeprom'-property (a phandle
  91. pointing to the underlying i2c eeprom device) and an optional 'offset'
  92. property are supported.
  93. config DM_BOOTCOUNT_SPI_FLASH
  94. bool "Support SPI flash devices as a backing store for bootcount"
  95. depends on DM_SPI_FLASH
  96. help
  97. Enabled reading/writing the bootcount in a DM SPI flash device.
  98. The wrapper device is to be specified with the compatible string
  99. 'u-boot,bootcount-spi-flash' and the 'spi-flash'-property (a phandle
  100. pointing to the underlying SPI flash device) and an optional 'offset'
  101. property are supported.
  102. config BOOTCOUNT_MEM
  103. bool "Support memory based bootcounter"
  104. help
  105. Enabling Memory based bootcount, typically in a SoC register which
  106. is not cleared on softreset.
  107. compatible = "u-boot,bootcount";
  108. endmenu
  109. endif
  110. config BOOTCOUNT_BOOTLIMIT
  111. int "Maximum number of reboot cycles allowed"
  112. default 0
  113. help
  114. Set the Maximum number of reboot cycles allowed without the boot
  115. counter being cleared.
  116. If set to 0 do not set a boot limit in the environment.
  117. config BOOTCOUNT_ALEN
  118. int "I2C address length"
  119. default 1
  120. depends on BOOTCOUNT_I2C
  121. help
  122. Length of the the I2C address at SYS_BOOTCOUNT_ADDR for storing
  123. the boot counter.
  124. config SYS_BOOTCOUNT_SINGLEWORD
  125. bool "Use single word to pack boot count and magic value"
  126. depends on BOOTCOUNT_GENERIC
  127. help
  128. This option enables packing boot count magic value and boot count
  129. into single word (32 bits).
  130. config SYS_BOOTCOUNT_EXT_INTERFACE
  131. string "Interface on which to find boot counter EXT filesystem"
  132. default "mmc"
  133. depends on BOOTCOUNT_EXT
  134. help
  135. Set the interface to use when locating the filesystem to use for the
  136. boot counter.
  137. config SYS_BOOTCOUNT_EXT_DEVPART
  138. string "Partition of the boot counter EXT filesystem"
  139. default "0:1"
  140. depends on BOOTCOUNT_EXT
  141. help
  142. Set the partition to use when locating the filesystem to use for the
  143. boot counter.
  144. config SYS_BOOTCOUNT_EXT_NAME
  145. string "Path and filename of the EXT filesystem based boot counter"
  146. default "/boot/failures"
  147. depends on BOOTCOUNT_EXT
  148. help
  149. Set the filename and path of the file used to store the boot counter.
  150. config SYS_BOOTCOUNT_ADDR
  151. hex "RAM address used for reading and writing the boot counter"
  152. default 0x44E3E000 if BOOTCOUNT_AM33XX
  153. default 0xE0115FF8 if ARCH_LS1043A || ARCH_LS1021A
  154. depends on BOOTCOUNT_AM33XX || BOOTCOUNT_GENERIC || BOOTCOUNT_EXT || \
  155. BOOTCOUNT_I2C
  156. help
  157. Set the address used for reading and writing the boot counter.
  158. config SYS_BOOTCOUNT_MAGIC
  159. hex "Magic value for the boot counter"
  160. default 0xB001C041
  161. help
  162. Set the magic value used for the boot counter.
  163. endif