Hi Frieder,
On 10/29/26 5:23 PM, Frieder Schrempf wrote:
From: Frieder Schrempf <[email protected]>
The RAUC bootmeth uses any MMC device on which the boot partition of a
slot holds a filesystem and the root partition exists. This also matches
devices with a different layout, for example a single-system image or a
standard distro installed to eMMC. The bootmeth then claims such a
device and creates and saves its BOOT_ORDER and BOOT_x_LEFT variables in
the environment, which makes it difficult to run BOOTMETH_RAUC alongside
other bootmeths.
Add CONFIG_BOOTMETH_RAUC_PART_NAMES to set the expected names of the
boot and root partitions of each slot, in the same format as
CONFIG_BOOTMETH_RAUC_PARTITIONS. If set, a slot only counts if its
partitions carry these names. As only GPT provides partition names,
this also rejects MBR devices. The option is empty by default, which
keeps the current behaviour.
Assisted-by: LLM
Signed-off-by: Frieder Schrempf <[email protected]>
---
boot/Kconfig | 13 +++++++++
boot/bootmeth_rauc.c | 68 ++++++++++++++++++++++++++++++++++++++++----
doc/develop/bootstd/rauc.rst | 7 +++++
3 files changed, 82 insertions(+), 6 deletions(-)
diff --git a/boot/Kconfig b/boot/Kconfig
index 8fcdc36c931..5f89c9d86fa 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -968,6 +968,19 @@ config BOOTMETH_RAUC_PARTITIONS
The first value in pair is for the boot partition and second for the
root partition.
+config BOOTMETH_RAUC_PART_NAMES
+ string "RAUC boot and root partition names"
+ default ""
+ help
+ Sets the expected names of the boot and root partitions of each slot,
+ for example "boot_a,root_a boot_b,root_b". The format is the same as
+ for BOOTMETH_RAUC_PARTITIONS, with names instead of indexes, and each
+ pair belongs to the slot at the same position.
+
+ A device is only used if at least one slot's partitions carry these
+ names. Partition names are only available on GPT, so this rejects
+ MBR devices. Leave this empty to not check the names.
+
This feels a bit redundant to me. CONFIG_BOOTMETH_RAUC_PARTITIONS is
already a string, I think we could directly use it:
- If it contains numbers, we go with the default flow
- If it contains strings, we treat them as partition names
This would require some changes in distro_rauc_scan_parts() to iterate
over the partitions until we find the relevant partition names, but IMHO
the result would be more 'user friendly'.
Kind regards,
Bastien