blob: 8c19ae610bb3493a9da6b49dcc41c7c6cd456e15 [file] [log] [blame]
Ian Rayf31dac42017-11-08 15:35:13 +00001#
2# Boot count configuration
3#
4
Alex Kiernanc1e1c1e2018-02-16 15:50:39 +00005menuconfig BOOTCOUNT_LIMIT
Lukasz Majewskid1ec9462018-02-09 23:50:57 +01006 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 Kiernan3dccc102018-02-16 15:50:38 +000011if BOOTCOUNT_LIMIT
Ian Rayf31dac42017-11-08 15:35:13 +000012
Alex Kiernanc1e1c1e2018-02-16 15:50:39 +000013choice
14 prompt "Boot count device"
Alex Kiernanc35e2d92018-02-16 15:50:40 +000015 default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
Alex Kiernanc1e1c1e2018-02-16 15:50:39 +000016
Ian Rayf31dac42017-11-08 15:35:13 +000017config 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 Kiernanc35e2d92018-02-16 15:50:40 +000023config 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 Kiernan04c96ed2018-02-16 15:50:41 +000031config 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 Kiernanff5410d2018-02-16 15:50:42 +000043config 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 Kiernan6cdd70e2018-02-16 15:50:43 +000049config 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 Kiernanc1e1c1e2018-02-16 15:50:39 +000058endchoice
59
60config 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 Rayf31dac42017-11-08 15:35:13 +000065
66config 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
74config 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
82config 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
89config 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
96endif