]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
doc: mention that extlinux.conf can use environment in "append"
authorFiona Klute <fiona.klute@gmx.de>
Mon, 23 Jun 2025 11:38:01 +0000 (13:38 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 28 Jun 2025 11:03:19 +0000 (13:03 +0200)
This option is very useful for A/B boot setups with read-only
filesystems: Letting U-Boot fill in the rootfs (and possibly related
parameters) allows keeping all boot parameters except the actual slot
selection in the extlinux.conf file, where they can be updated easily.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Cc: Tom Rini <trini@konsulko.com>
doc/README.pxe
doc/develop/distro.rst

index 9fff2cd5ae9be5107b5d164b206e0470aa9db3f2..ba189080e8c7720a27fd6f6e7ee89e0603205c36 100644 (file)
@@ -178,7 +178,8 @@ devicetree-overlay <path> [...] - if this label is chosen, use tftp to retrieve
 kaslrseed           - set this label to request random number from hwrng as kaslr seed.
 
 append <string>            - use <string> as the kernel command line when booting this
-                     label.
+                     label. Environment variable references like ${var} are
+                     substituted before boot.
 
 initrd <path>      - if this label is chosen, use tftp to retrieve the initrd
                      at <path>. it will be stored at the address indicated in
index 1d2f9c4c32bca67717da433984ddd3f9e0e65866..01efce40a292c3b6c64c05565a90d53c5efaebb6 100644 (file)
@@ -92,6 +92,13 @@ That said, we have some differences to these documents, namely:
 * If ``-`` is passed as fdt argument and ``CONFIG_SUPPORT_PASSING_ATAGS`` is
   enabled, then no device tree will be used (legacy booting / pre-dtb kernel).
 
+* The ``append`` string may use environment variables. For example, an
+  A/B boot setup could use ``append root=PARTLABEL=root_${bootslot}``
+  to set the root filesystem to the right one for the selected slot,
+  assuming the ``bootslot`` environment variable is set before the
+  extlinux.conf file is processed, and the partition is labeled to
+  match.
+
 See also doc/README.pxe under 'pxe file format'.
 
 One example extlinux.conf generated by the Fedora installer is::