From 998a0ab57b5c268c36ca551cd3130c14290441aa Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Wed, 24 Apr 2024 15:47:13 +0100 Subject: [PATCH 1/2] docs: More accurate diagram in bootloaders documentation for aboot The android bootloader is also split into two partitions, previously that wasn't represented in the diagram. Signed-off-by: Eric Curtin --- docs/bootloaders.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/bootloaders.md b/docs/bootloaders.md index 6dd1e104ee..33ae37be9e 100644 --- a/docs/bootloaders.md +++ b/docs/bootloaders.md @@ -41,19 +41,19 @@ We have two accompanying scripts that work with this type of environment: [aboot-deploy](https://gitlab.com/CentOS/automotive/rpms/aboot-deploy) reads what the current slot is according to the `androidboot.slot_suffix=` karg, writes to the alternate boot_a or boot_b slot and sets a symlink either /ostree/root.a or /ostree/root.b so that it is known which userspace directory to boot into based on the `androidboot.slot_suffix=` karg, on subsequent boots. ``` -+-----------------------------+ +---------------------------------+ -| | +------------------+ | | -| firmware appends: | | | | | + +---------------------------------+ ++-----------------------------+ +------------------+ | | +| bootloader_a appends karg: | | | | | | +--->+ boot_a partition +--->+ | | androidboot.slot_suffix=_a | | | | /ostree/root.a | -| | +------------------+ | | -| or | | system_a partition | -| | +------------------+ | | -| androidboot.slot_suffix=_b | | | | /ostree/root.b | ++-----------------------------+ +------------------+ | | + | system partition | ++-----------------------------+ +------------------+ | | +| bootloader_b appends karg: | | | | /ostree/root.b | | +--->+ boot_b partition +--->+ | -| to cmdline | | | | | -| | +------------------+ | | -+-----------------------------+ +---------------------------------+ +| androidboot.slot_suffix=_b | | | | | ++-----------------------------+ +------------------+ | | + +---------------------------------+ ``` ## GRUB and os-prober From 9e51fb1627e2f866d94fc5adbcdf73cba43c5b6e Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Wed, 24 Apr 2024 16:15:17 +0100 Subject: [PATCH 2/2] docs: Fix spelling and grammer Make Android bootloader section clearer. Signed-off-by: Eric Curtin --- docs/bootloaders.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/bootloaders.md b/docs/bootloaders.md index 33ae37be9e..56ed9fcf19 100644 --- a/docs/bootloaders.md +++ b/docs/bootloaders.md @@ -30,9 +30,9 @@ For historical reasons, OSTree defaults to detecting the bootloader; if some GRU ## OSTree and aboot -The Android bootloader is another bootloader than may be used with ostree. It still uses the files in `/boot/loader/entries` as metadata, but the boootloader does not read these files. Android bootloaders package their kernel+initramfs+cmdline+dtb in a signed binary blob called an [Android Boot Image](https://source.android.com/docs/core/architecture/bootloader/boot-image-header). This binary blob then is written to either partition boot_a or boot_b depending on which slot is suitable. +The Android bootloader is another bootloader that may be used with ostree. It still uses the files in `/boot/loader/entries` as metadata, but the boootloader does not read these files. Android bootloaders package their kernel+initramfs+cmdline+dtb in a signed binary blob called an [Android Boot Image](https://source.android.com/docs/core/architecture/bootloader/boot-image-header). This binary blob then is written to either partition boot_a or boot_b depending on which slot is suitable. -Android bootloaders by design inject kargs into the cmdline, some patches may be required in the Android bootloader implementation to ensure that the firmware does not switch between system_a and system_b partitions by populating a `root=` karg, or that a `ro` karg that is incompatible with ostree is not inserted. Conversly leaving the `androidboot.slot_suffix=` karg injecting functionality is required but this is commonplace for any Android Bootloader that does AB updates. +Android bootloaders by design inject kargs into the cmdline, some patches may be required in the Android bootloader implementation to ensure that the firmware does not switch between system_a and system_b partitions by populating a `root=` karg, or that a `ro` karg is not inserted (this karg is incompatible with ostree). We have two accompanying scripts that work with this type of environment: