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