From 3dfa1ebfe66410249b600612beee5ffdb05e212c Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Sun, 30 Mar 2025 20:38:47 +0200 Subject: [PATCH] bls: describe optional linux-appendroot key The linux-appendroot key is an extension[1] to the bootloader specification implemented by barebox since 2015[2]. When set, it instructs barebox to generate a suitable root= command-line: - If global.bootm.root_dev is set to a partition known to barebox, barebox will detect the file system on it and generate the suitable root command-line argument - If global.bootm.root_dev is not set, barebox will use the file system containing the bootloader specification entries as the Linux rootfs. The former is useful in A/B setups, where bootloader spec entries are shipped as part of an immutable partition image, which is at odds with customizing the root= option according to whether the A or B system is used. The latter is especially useful for remote file systems like NFS or 9P: By placing bootloader specification entries directly into the rootfs, these file systems can be booted remotely by just pointing barebox at their remote path. Describe this key in the specification with the same boolean syntax that loader.conf is using for its boolean keys. [1]: End of https://www.barebox.org/doc/latest/user/booting-linux.html#boot-loader-specification [2]: https://github.com/barebox/barebox/commit/716fdbf18ca12feb81e26df729a5b8969e394e96 Signed-off-by: Ahmad Fatoum --- specs/boot_loader_specification.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specs/boot_loader_specification.md b/specs/boot_loader_specification.md index 15f55492..c290b369 100644 --- a/specs/boot_loader_specification.md +++ b/specs/boot_loader_specification.md @@ -285,6 +285,12 @@ The following keys are recognized: Example: `options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2 quiet` +* `linux-appendroot` is a boolean option that, if set to `yes`, instructs the + boot loader to generate a suitable `root=` parameter and add it to the + Linux kernel command-line prior to any kernel parameters indicated by + the `options` key. + This key is optional and its absence is treated as `no`. + * `devicetree` refers to the binary device tree to use when executing the kernel. This key is optional. @@ -305,6 +311,9 @@ The following keys are recognized: Example: `architecture aa64` +Boolean arguments may be written as `yes`/`y`/`true`/`t`/`on`/`1` +or `no`/`n`/`false`/`f`/`off`/`0`. + Each boot loader menu entry drop-in snippet must include at least a `linux` or an `efi` key. Here is an example for a complete drop-in file: