Skip to content

Commit bc644be

Browse files
committed
conditional: Describe the new boot_partition config.txt conditional filter
1 parent 83be4b3 commit bc644be

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

documentation/asciidoc/computers/config_txt/conditional.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ cmdline=cmdline-recovery.txt
123123

124124
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.
125125

126+
=== The `[boot_partition=N]` filter
127+
The `boot_partition` filter can be used to select alternate OS files (e.g. `cmdline.txt`) to be loaded, depending on which partition `config.txt` was loaded from after processing `autoboot.txt`. This is intended for use with an `A/B` boot-system with `autoboot.txt` where it is desirable to be able to have identical files installed to the boot partition for both the `A` and `B` images.
128+
129+
Example `config.txt` - select the matching root filesystem for the `A/B` boot file-system.
130+
[source,ini]
131+
----
132+
[boot_partition=1]
133+
cmdline=cmdline_rootfs_a.txt
134+
135+
[boot_partition=2]
136+
cmdline=cmdline_rootfs_b.txt
137+
----
126138

127139
=== The `[tryboot]` filter
128140

0 commit comments

Comments
 (0)