Skip to content

Commit 8fd2c75

Browse files
committed
PARTITION parameters: Preliminary documentatiobn for remapping partition numbers
The latest firmware provides a basic method for remapping a high partition number to a regular partition. This makes it more flexible as generic reboot parameter. E.g. It would be possible reboot into a different boot-order or even network install. This will probably evolve as we use it with rpi-image-gen
1 parent d93c296 commit 8fd2c75

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

documentation/asciidoc/computers/config_txt/conditional.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ Some models of Raspberry Pi, including Zero, Compute Module, and Keyboard models
9696

9797
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.
9898

99+
=== The `[partition=N]` filter
100+
This `partition` filter can be be used in the bootloader config (only) to remap high partition numbers set either by the `sudo reboot N` command or direct usage of the hardware watchdog registers.
101+
102+
Example
103+
[source,ini]
104+
---
105+
[partition=62]
106+
PARTITION=2
107+
---
108+
99109
=== The `[tryboot]` filter
100110

101111
This filter succeeds if the `tryboot` reboot flag was set.

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,16 @@ Max length: 32 characters
499499
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`.
500500
This could be used to boot from a rescue partition if the user presses a button.
501501

502+
The latest firmware also allows high partition numbers (> 31) to be overriden. This allows a custom setup of the system hardware watchdog to be 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
508+
[partition=62]
509+
PARTITION=2
510+
---
511+
502512
[source,ini]
503513
----
504514
# Boot from partition 2 if GPIO 7 is pulled low

0 commit comments

Comments
 (0)