Ian Ray | f31dac4 | 2017-11-08 15:35:13 +0000 | [diff] [blame] | 1 | # |
| 2 | # Boot count configuration |
| 3 | # |
| 4 | |
Alex Kiernan | c1e1c1e | 2018-02-16 15:50:39 +0000 | [diff] [blame] | 5 | menuconfig BOOTCOUNT_LIMIT |
Lukasz Majewski | d1ec946 | 2018-02-09 23:50:57 +0100 | [diff] [blame] | 6 | bool "Enable support for checking boot count limit" |
| 7 | help |
| 8 | Enable checking for exceeding the boot count limit. |
| 9 | More information: http://www.denx.de/wiki/DULG/UBootBootCountLimit |
| 10 | |
Alex Kiernan | 3dccc10 | 2018-02-16 15:50:38 +0000 | [diff] [blame] | 11 | if BOOTCOUNT_LIMIT |
Ian Ray | f31dac4 | 2017-11-08 15:35:13 +0000 | [diff] [blame] | 12 | |
Alex Kiernan | c1e1c1e | 2018-02-16 15:50:39 +0000 | [diff] [blame] | 13 | choice |
| 14 | prompt "Boot count device" |
Alex Kiernan | c35e2d9 | 2018-02-16 15:50:40 +0000 | [diff] [blame] | 15 | default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX |
Alex Kiernan | c1e1c1e | 2018-02-16 15:50:39 +0000 | [diff] [blame] | 16 | |
Ian Ray | f31dac4 | 2017-11-08 15:35:13 +0000 | [diff] [blame] | 17 | config BOOTCOUNT_EXT |
| 18 | bool "Boot counter on EXT filesystem" |
| 19 | help |
| 20 | Add support for maintaining boot count in a file on an EXT |
| 21 | filesystem. |
| 22 | |
Alex Kiernan | c35e2d9 | 2018-02-16 15:50:40 +0000 | [diff] [blame] | 23 | config BOOTCOUNT_AM33XX |
| 24 | bool "Boot counter in AM33XX RTC IP block" |
| 25 | depends on AM33XX || SOC_DA8XX |
| 26 | help |
| 27 | A bootcount driver for the RTC IP block found on many TI platforms. |
| 28 | This requires the RTC clocks, etc, to be enabled prior to use and |
| 29 | not all boards with this IP block on it will have the RTC in use. |
| 30 | |
Alex Kiernan | 04c96ed | 2018-02-16 15:50:41 +0000 | [diff] [blame] | 31 | config BOOTCOUNT_ENV |
| 32 | bool "Boot counter in environment" |
| 33 | help |
| 34 | If no softreset save registers are found on the hardware |
| 35 | "bootcount" is stored in the environment. To prevent a |
| 36 | saveenv on all reboots, the environment variable |
| 37 | "upgrade_available" is used. If "upgrade_available" is |
| 38 | 0, "bootcount" is always 0, if "upgrade_available" is |
| 39 | 1 "bootcount" is incremented in the environment. |
| 40 | So the Userspace Application must set the "upgrade_available" |
| 41 | and "bootcount" variable to 0, if a boot was successfully. |
| 42 | |
Alex Kiernan | ff5410d | 2018-02-16 15:50:42 +0000 | [diff] [blame] | 43 | config BOOTCOUNT_RAM |
| 44 | bool "Boot counter in RAM" |
| 45 | help |
| 46 | Store the bootcount in DRAM protected against against bit errors |
| 47 | due to short power loss or holding a system in RESET. |
| 48 | |
Alex Kiernan | 6cdd70e | 2018-02-16 15:50:43 +0000 | [diff] [blame^] | 49 | config BOOTCOUNT_I2C |
| 50 | bool "Boot counter on I2C device" |
| 51 | help |
| 52 | Enable support for the bootcounter on an i2c (like RTC) device. |
| 53 | CONFIG_SYS_I2C_RTC_ADDR = i2c chip address |
| 54 | CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for |
| 55 | the bootcounter. |
| 56 | CONFIG_BOOTCOUNT_ALEN = address len |
| 57 | |
Alex Kiernan | c1e1c1e | 2018-02-16 15:50:39 +0000 | [diff] [blame] | 58 | endchoice |
| 59 | |
| 60 | config SYS_BOOTCOUNT_SINGLEWORD |
| 61 | bool "Use single word to pack boot count and magic value" |
| 62 | help |
| 63 | This option enables packing boot count magic value and boot count |
| 64 | into single word (32 bits). |
Ian Ray | f31dac4 | 2017-11-08 15:35:13 +0000 | [diff] [blame] | 65 | |
| 66 | config SYS_BOOTCOUNT_EXT_INTERFACE |
| 67 | string "Interface on which to find boot counter EXT filesystem" |
| 68 | default "mmc" |
| 69 | depends on BOOTCOUNT_EXT |
| 70 | help |
| 71 | Set the interface to use when locating the filesystem to use for the |
| 72 | boot counter. |
| 73 | |
| 74 | config SYS_BOOTCOUNT_EXT_DEVPART |
| 75 | string "Partition of the boot counter EXT filesystem" |
| 76 | default "0:1" |
| 77 | depends on BOOTCOUNT_EXT |
| 78 | help |
| 79 | Set the partition to use when locating the filesystem to use for the |
| 80 | boot counter. |
| 81 | |
| 82 | config SYS_BOOTCOUNT_EXT_NAME |
| 83 | string "Path and filename of the EXT filesystem based boot counter" |
| 84 | default "/boot/failures" |
| 85 | depends on BOOTCOUNT_EXT |
| 86 | help |
| 87 | Set the filename and path of the file used to store the boot counter. |
| 88 | |
| 89 | config SYS_BOOTCOUNT_ADDR |
| 90 | hex "RAM address used for reading and writing the boot counter" |
| 91 | default 0x7000A000 |
| 92 | depends on BOOTCOUNT_EXT |
| 93 | help |
| 94 | Set the address used for reading and writing the boot counter. |
| 95 | |
| 96 | endif |