blob: 40a07555af0b5f2a70cddda114cf1cd24cf99fa1 [file] [log] [blame]
Ian Ray542a48e2017-11-08 15:35:13 +00001#
2# Boot count configuration
3#
4
Alex Kiernanaa0abed2018-02-16 15:50:39 +00005menuconfig BOOTCOUNT_LIMIT
Lukasz Majewski6dd8c902018-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 Kiernan4aa943f2018-02-16 15:50:38 +000011if BOOTCOUNT_LIMIT
Ian Ray542a48e2017-11-08 15:35:13 +000012
Alex Kiernanaa0abed2018-02-16 15:50:39 +000013choice
14 prompt "Boot count device"
Alex Kiernan88456352018-02-16 15:50:40 +000015 default BOOTCOUNT_AM33XX if AM33XX || SOC_DA8XX
Alex Kiernanaa0abed2018-02-16 15:50:39 +000016
Ian Ray542a48e2017-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 Kiernan88456352018-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 Kiernanc5037a82018-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 Kiernanaa0abed2018-02-16 15:50:39 +000043endchoice
44
45config SYS_BOOTCOUNT_SINGLEWORD
46 bool "Use single word to pack boot count and magic value"
47 help
48 This option enables packing boot count magic value and boot count
49 into single word (32 bits).
Ian Ray542a48e2017-11-08 15:35:13 +000050
51config SYS_BOOTCOUNT_EXT_INTERFACE
52 string "Interface on which to find boot counter EXT filesystem"
53 default "mmc"
54 depends on BOOTCOUNT_EXT
55 help
56 Set the interface to use when locating the filesystem to use for the
57 boot counter.
58
59config SYS_BOOTCOUNT_EXT_DEVPART
60 string "Partition of the boot counter EXT filesystem"
61 default "0:1"
62 depends on BOOTCOUNT_EXT
63 help
64 Set the partition to use when locating the filesystem to use for the
65 boot counter.
66
67config SYS_BOOTCOUNT_EXT_NAME
68 string "Path and filename of the EXT filesystem based boot counter"
69 default "/boot/failures"
70 depends on BOOTCOUNT_EXT
71 help
72 Set the filename and path of the file used to store the boot counter.
73
74config SYS_BOOTCOUNT_ADDR
75 hex "RAM address used for reading and writing the boot counter"
76 default 0x7000A000
77 depends on BOOTCOUNT_EXT
78 help
79 Set the address used for reading and writing the boot counter.
80
81endif