Simon Glass | 45276c1 | 2024-07-17 09:30:57 +0100 | [diff] [blame^] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
| 3 | ChromiumOS Bootmeth |
| 4 | =================== |
| 5 | |
| 6 | ChromiumOS provides a mechanism for booting its Operating System from a block |
| 7 | device, described |
| 8 | `here <https://www.chromium.org/chromium-os/chromiumos-design-docs/verified-boot/>`_. |
| 9 | |
| 10 | U-Boot includes support for reading the associated data structures from the |
| 11 | device and identifying a bootable ChromiumOS image. This structure includes the |
| 12 | kernel itself, boot arguments (kernel command line), as well as the x86 setup |
| 13 | block (for x86 only). |
| 14 | |
| 15 | When invoked on a bootdev, this bootmeth searches for kernel partitions with |
| 16 | the appropriate GUID (Globally Unique Identifier). When found, the information |
| 17 | is loaded and a bootflow is created. |
| 18 | |
| 19 | When the bootflow is booted, the bootmeth reads the kernel and boot arguments. |
| 20 | It then boots the kernel using zboot (on x86) or bootm (on ARM). The boot |
| 21 | arguments are adjusted to replace `%U` with the UUID of the selected kernel |
| 22 | partition. This results in the correct root disk being used, which is the next |
| 23 | partition after the kernel partition. |
| 24 | |
| 25 | For ARM, a :doc:`/usage/fit/index` is used. The `CONFIG_FIT_BEST_MATCH` option |
| 26 | must be enabled for U-Boot to select the correct devicetree to boot with. |
| 27 | |
| 28 | Note that a ChromiumOS image typically has two copies of the Operating System, |
| 29 | each with its own kernel and root disk. There is no initial ramdisk (initrd). |
| 30 | This means that this bootmeth typically locates two separate images. |
| 31 | |
| 32 | The compatible string "u-boot,cros" is used for the driver. It is present |
| 33 | if `CONFIG_BOOTMETH_CROS` is enabled. |