blob: b2661d18da46a745d4fc6eb65e45d1202f2e2a21 [file] [log] [blame]
Martin Schwanefba80d2025-06-04 14:15:30 +02001.. SPDX-License-Identifier: GPL-2.0+:
2
3RAUC Bootmeth
4=============
5
6This bootmeth provides a way to locate and run an A/B system with RAUC as its
7update client. The booted distro must supply a script on an MMC device
8containing the final boot instructions necessary.
9
10This bootmeth assumes a symmetric A/B partition layout, with a separate boot
11partition containing the kernel image and another partition for the root
12filesystem each. The partition numbers must be specified with
13``CONFIG_BOOTMETH_RAUC_PARTITIONS``. The content must be a list of pairs, with
14the following syntax: ``1,2 3,4``, where 1 and 3 are the slots' boot partition
15and 2 and 4 the slots' root partition.
16
17Each pair of boot and rootfs partition form a "slot". The default order in which
18available slots are tried is set through ``CONFIG_BOOTMETH_RAUC_BOOT_ORDER``,
19with the left one tried first.
20
21The default number of boot tries of each slot is set by
22``CONFIG_BOOTMETH_RAUC_DEFAULT_TRIES``.
23
24In case no valid slot can be found and/or all slots have zero tries left, the
25boot order and slot tries are reset to their default values, if
26``CONFIG_BOOTMETH_RAUC_RESET_ALL_ZERO_TRIES`` is enabled. This prevents a system
27from locking up in the bootloader and tries booting again after a specified
28number of tries.
29
30The boot script must be located in each boot partition. The bootmeth searches
31for "boot.scr.uimg" first, then "boot.scr" if not found.
32
33When the bootflow is booted, the bootmeth sets these environment variables:
34
35devtype
36 device type (e.g. "mmc")
37
38devnum
39 device number, corresponding to the device 'sequence' number
40 ``dev_seq(dev)``
41
42distro_bootpart
43 partition number of the boot partition on the device (numbered from 1)
44
45distro_rootpart
46 partition number of the rootfs partition on the device (numbered from 1)
47
48raucargs
49 kernel command line arguments needed for RAUC to detect the currently booted
50 slot
51
52The script file must be a FIT or a legacy uImage. It is loaded into memory and
53executed.
54
55The compatible string "u-boot,distro-rauc" is used for the driver. It is present
56if ``CONFIG_BOOTMETH_RAUC`` is enabled.