You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/asciidoc/computers/config_txt/conditional.adoc
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,34 @@ Some models of Raspberry Pi, including Zero, Compute Module, and Keyboard models
96
96
97
97
The `[none]` filter prevents any settings that follow from being applied to any hardware. Although there is nothing that you can't do without `[none]`, it can be a useful way to keep groups of unused settings in config.txt without having to comment out every line.
98
98
99
+
=== The `[partition=N]` filter
100
+
This `partition` filter can be be used to select alternate boot flows according to the requested partition number (`sudo reboot N`) or via direct usage of the `PM_RSTS` watchdog register.
101
+
102
+
[source,ini]
103
+
----
104
+
# Bootloader EEPROM config.
105
+
# If PM_RSTS is partition 62 then set bootloader properties to disable
106
+
# SD high speed and show HDMI diagnostics
107
+
# Boot from partition 2 with debug option.
108
+
[partition=62]
109
+
# Only high (>31) partition can be remapped.
110
+
PARTITION=2
111
+
SD_QUIRKS=0x1
112
+
HDMI_DELAY=0
113
+
----
114
+
115
+
Example `config.txt` - (Currently Raspberry Pi 5 onwards)
116
+
[source,ini]
117
+
----
118
+
# config.txt - If the original requested partition number in PM_RSTS was a
119
+
# special number then use an alternate cmdline.txt
120
+
[partition=62]
121
+
cmdline=cmdline-recovery.txt
122
+
----
123
+
124
+
The raw value of the `PM_RSTS` register at bootup is available via `/proc/device-tree/chosen/bootloader/rsts` and the final partition number used for booting is available via `/proc/device-tree/chosen/bootloader/partition`. These are big-endian binary values.
125
+
126
+
99
127
=== The `[tryboot]` filter
100
128
101
129
This filter succeeds if the `tryboot` reboot flag was set.
Copy file name to clipboardExpand all lines: documentation/asciidoc/computers/configuration/device-tree.adoc
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -845,6 +845,8 @@ The firmware uses the special https://www.kernel.org/doc/html/latest/devicetree/
845
845
846
846
`rpi-duid`:: _(string)_ Raspberry Pi 5 only. A string representation of the QR code on the PCB.
847
847
848
+
`rpi-serial64`:: _(string)_ A string representation of the 64-bit serial number. On flagship models since Raspberry Pi 5 this is same as the normal serial number (`/proc/device-tree/serial-number`). On earlier models the default serial number is still 32-bit but with newer firmware a 64-bit serial number is now available and is visible through this node.
849
+
848
850
==== Common bootloader properties `/chosen/bootloader`
849
851
850
852
Each property is stored as a 32-bit integer unless indicated otherwise.
Copy file name to clipboardExpand all lines: documentation/asciidoc/computers/raspberry-pi/eeprom-bootloader.adoc
+49-1Lines changed: 49 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Default: `0`
34
34
[[UART_BAUD]]
35
35
==== `UART_BAUD`
36
36
37
-
Raspberry Pi 5 only.
37
+
Flagship models since Raspberry Pi 5 only.
38
38
39
39
Changes the baud rate for the bootloader UART.
40
40
@@ -62,6 +62,15 @@ On Flagship models since Raspberry Pi 5 and Keyboard models since Pi 500, this p
62
62
63
63
Default: `1` on Compute Modules since CM5 and Keyboard models; otherwise `0`
64
64
65
+
[[WAIT_FOR_POWER_BUTTON]]
66
+
==== `WAIT_FOR_POWER_BUTTON`
67
+
68
+
Flagship models since Raspberry Pi 5 only.
69
+
70
+
If this property and `POWER_OFF_ON_HALT` are both set to `1` then the bootloader will immediately power-off and wait for the power to be pressed on the first boot after the power supply has been removed. This means that instead of booting immediately after power-loss the system will wait for the power button to be pressed.
71
+
72
+
Default: `0`
73
+
65
74
[[BOOT_ORDER]]
66
75
==== `BOOT_ORDER`
67
76
@@ -151,6 +160,24 @@ The number of times that SD boot will be retried after failure before moving to
151
160
152
161
`-1` means infinite retries.
153
162
163
+
Default: `0`
164
+
165
+
[[SD_QUIRKS]]
166
+
==== `SD_QURIKS`
167
+
168
+
The `SD_QUIRKS` property provides a set of options to support device bringup and workaround interoperability issues.
169
+
170
+
The flags are implemented as a bit-field. Undefined bits are reserved for future use and should be set to zero.
171
+
172
+
[cols="1m,3"]
173
+
|===
174
+
| Value | Behaviour
175
+
176
+
| 0x1
177
+
| Disable SD High Speed modes. The card clock is limited to 12.5 MHz
178
+
|===
179
+
180
+
154
181
Default: `0`
155
182
156
183
[[NET_BOOT_MAX_RETRIES]]
@@ -472,6 +499,19 @@ Max length: 32 characters
472
499
The `PARTITION` option may be used to specify the boot partition number, if it has not explicitly been set by the `reboot` command (e.g. `sudo reboot N`) or by `boot_partition=N` in `autoboot.txt`.
473
500
This could be used to boot from a rescue partition if the user presses a button.
474
501
502
+
The latest firmware also allows high partition numbers (> 31) to be overriden. This allows a custom setup of the system hardware watchdog to trigger a reboot with a special high partition number (e.g. 62) which can be detected by the bootloader (using a conditional filter) and remapped to a recovery partition.
503
+
504
+
Example:
505
+
[source,ini]
506
+
----
507
+
# System watchdog fired - boot the rescue partition with additional options
508
+
# Disable SD high speed mode and enable HDMI diagnostics immediately.
509
+
[partition=62]
510
+
PARTITION=2
511
+
HDMI_DELAY=0
512
+
SD_QUIRKS=1
513
+
----
514
+
475
515
[source,ini]
476
516
----
477
517
# Boot from partition 2 if GPIO 7 is pulled low
@@ -481,6 +521,14 @@ PARTITION=2
481
521
482
522
Default: 0
483
523
524
+
[[PARTITION_WALK]]
525
+
==== `PARTITION_WALK`
526
+
This property is designed to improve the reliability of `A/B` boot schemes using `autoboot.txt` by searching for bootable partitions if the specified partition does not appear to be bootable. If `PARTITION_WALK=1` and the requested partition is not bootable and does not have a valid `autoboot.txt` then the bootloader will check each partition in turn (up to 8 and wrapping to 0) to see if it is bootable (contains `start4.elf` on a Pi4, or `config.txt` and a suitable device-tree on Pi 5 or newer).
527
+
528
+
During the "partition walk" `autoboot.txt` files are not processed to avoid cycling dependencies. It is assumed that the requested boot partition has failed and the system is attempting recovery.
0 commit comments