blob: e0d1fc2fc65908f1b0ab151d5eee07c95bf9a762 [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 Kiernanbec8c642018-02-16 15:50:45 +000016 default BOOTCOUNT_AT91 if AT91SAM9XE
Alex Kiernanc1e1c1e2018-02-16 15:50:39 +000017
Ian Rayf31dac42017-11-08 15:35:13 +000018config BOOTCOUNT_EXT
19 bool "Boot counter on EXT filesystem"
20 help
21 Add support for maintaining boot count in a file on an EXT
22 filesystem.
23
Alex Kiernanc35e2d92018-02-16 15:50:40 +000024config BOOTCOUNT_AM33XX
25 bool "Boot counter in AM33XX RTC IP block"
26 depends on AM33XX || SOC_DA8XX
27 help
28 A bootcount driver for the RTC IP block found on many TI platforms.
29 This requires the RTC clocks, etc, to be enabled prior to use and
30 not all boards with this IP block on it will have the RTC in use.
31
Alex Kiernan04c96ed2018-02-16 15:50:41 +000032config BOOTCOUNT_ENV
33 bool "Boot counter in environment"
34 help
35 If no softreset save registers are found on the hardware
36 "bootcount" is stored in the environment. To prevent a
37 saveenv on all reboots, the environment variable
38 "upgrade_available" is used. If "upgrade_available" is
39 0, "bootcount" is always 0, if "upgrade_available" is
40 1 "bootcount" is incremented in the environment.
41 So the Userspace Application must set the "upgrade_available"
42 and "bootcount" variable to 0, if a boot was successfully.
43
Alex Kiernanff5410d2018-02-16 15:50:42 +000044config BOOTCOUNT_RAM
45 bool "Boot counter in RAM"
46 help
47 Store the bootcount in DRAM protected against against bit errors
48 due to short power loss or holding a system in RESET.
49
Alex Kiernan6cdd70e2018-02-16 15:50:43 +000050config BOOTCOUNT_I2C
51 bool "Boot counter on I2C device"
52 help
53 Enable support for the bootcounter on an i2c (like RTC) device.
54 CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
55 CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for
56 the bootcounter.
57 CONFIG_BOOTCOUNT_ALEN = address len
58
Alex Kiernanbec8c642018-02-16 15:50:45 +000059config BOOTCOUNT_AT91
60 bool "Boot counter for Atmel AT91SAM9XE"
61 depends on AT91SAM9XE
62
Alex Kiernanc1e1c1e2018-02-16 15:50:39 +000063endchoice
64
65config SYS_BOOTCOUNT_SINGLEWORD
66 bool "Use single word to pack boot count and magic value"
67 help
68 This option enables packing boot count magic value and boot count
69 into single word (32 bits).
Ian Rayf31dac42017-11-08 15:35:13 +000070
71config SYS_BOOTCOUNT_EXT_INTERFACE
72 string "Interface on which to find boot counter EXT filesystem"
73 default "mmc"
74 depends on BOOTCOUNT_EXT
75 help
76 Set the interface to use when locating the filesystem to use for the
77 boot counter.
78
79config SYS_BOOTCOUNT_EXT_DEVPART
80 string "Partition of the boot counter EXT filesystem"
81 default "0:1"
82 depends on BOOTCOUNT_EXT
83 help
84 Set the partition to use when locating the filesystem to use for the
85 boot counter.
86
87config SYS_BOOTCOUNT_EXT_NAME
88 string "Path and filename of the EXT filesystem based boot counter"
89 default "/boot/failures"
90 depends on BOOTCOUNT_EXT
91 help
92 Set the filename and path of the file used to store the boot counter.
93
94config SYS_BOOTCOUNT_ADDR
95 hex "RAM address used for reading and writing the boot counter"
96 default 0x7000A000
97 depends on BOOTCOUNT_EXT
98 help
99 Set the address used for reading and writing the boot counter.
100
101endif