Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e8092e

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 2e8092e

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-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

documentation/asciidoc/computers/raspberry-pi/eeprom-bootloader.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,13 @@ During the "partition walk" `autoboot.txt` files are not processed to avoid cycl
568568

569569
Default: `0`
570570

571+
[[BOOTVAR0]]
572+
==== `BOOTVAR0`
573+
574+
Allows setting the conditional variable bootvar0 used by `config.txt`. See xref:../config_txt/conditional.adoc#bootvar0[bootvar0].
575+
576+
Default: `0`
577+
571578
[[PSU_MAX_CURRENT]]
572579
==== `PSU_MAX_CURRENT`
573580

0 commit comments

Comments
 (0)