Skip to content

Commit 47124b4

Browse files
committed
conditional: Document the bootvar0 variable
The `bootvar0` variable is a 32-bit user defined value which is set through rpi-eeprom-config, and then can be used as a conditional variable in config.txt
1 parent 3e2f3ac commit 47124b4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

documentation/asciidoc/computers/config_txt/conditional.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,26 @@ sudo vcmailbox 0x0003008c 8 8 1 0
171171
----
172172
The value of the `boot_arg1` variable when the OS was started can be read via xref:configuration.adoc#part4[device-tree] at `/proc/device-tree/chosen/bootloader/arg1`
173173

174+
==== `bootvar0`
175+
Raspberry Pi 5 and newer devices only.
176+
177+
The `bootvar0` variable is a 32-bit user defined value which is set through rpi-eeprom-config, and then can be used as a conditional variable in config.txt.
178+
179+
For example, setting `bootvar0` to 42 via `rpi-eeprom-config`:
180+
[source,ini]
181+
----
182+
BOOTVAR0=42
183+
----
184+
185+
and then using it conditionally in `config.txt`:
186+
[source,ini]
187+
----
188+
[bootvar0=42]
189+
arm_freq=1000
190+
----
191+
192+
This allows a common image (i.e. with the same config.txt file) to support different configurations based on the persistent rpi-eeprom-config settings.
193+
174194
==== `boot_count`
175195
Raspberry Pi 5 and newer devices only.
176196

0 commit comments

Comments
 (0)