Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootloader: Add an aboot (Android) bootloader backend #2793

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

ericcurtin
Copy link
Collaborator

aboot is special in that it packages kernel, initrd, cmdline dtb and signature one combined image (similar to upcoming unified kernel images). This is then loaded as an image into an aboot partition.

This image is signed by the OS vendor and covers everything in the image. So locally on the deployed system it should not be possible to boot an unsigned image (unless signature checking is turned off).

We call a shell script aboot-deploy when it is required to write a new image to the aboot partition (a file typically starting with aboot and ending in .img extension). This shell script may also read some configurations from a .cfg file.

Signed-off-by: Eric Curtin ecurtin@redhat.com

@openshift-ci
Copy link

openshift-ci bot commented Dec 13, 2022

Hi @ericcurtin. Thanks for your PR.

I'm waiting for a ostreedev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ericcurtin ericcurtin changed the title bootloader: Add a aboot (Android) bootloader backend bootloader: Add an aboot (Android) bootloader backend Dec 13, 2022
@ericcurtin
Copy link
Collaborator Author

Related one-liner PR:

osbuild/osbuild#1204

@ericcurtin
Copy link
Collaborator Author

@ericcurtin
Copy link
Collaborator Author

Related PR for aboot-update:

https://gitlab.com/CentOS/automotive/rpms/aboot-update/-/merge_requests/1

which creates the image file to be written to the boot partition.

aboot is special in that it packages kernel, initrd, cmdline, dtb and
signature one combined image (similar to upcoming unified kernel
images). This is then loaded as an image into an aboot partition.

This image is signed by the OS vendor and covers everything in the
image. So locally on the deployed system it should not be possible to
boot an unsigned image (unless signature checking is turned off).

We call a shell script aboot-deploy when it is required to write a new
image to the aboot partition (a file typically starting with aboot and
ending in .img extension). This shell script may also read some
configurations from a .cfg file.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it'd make sense to just call the thing to be booted vmlinuz or so? But I guess there's probably precedent behind this aboot.img thing.

@cgwalters cgwalters merged commit 15a7ed5 into ostreedev:main Jan 5, 2023
@ericcurtin
Copy link
Collaborator Author

Thanks for looking at this @cgwalters we boot from an Android boot partition (which is unrecognizable in a normal Linux userspace, it's just data in a a partition), which is where the aboot.img file essentially gets written to. U-boot actually has some nice documentation on how it works, I test using that... Although this will really be loaded from the Qualcomm Android Bootloader in real life. u-boot has some documentation on this:

https://u-boot.readthedocs.io/en/latest/android/boot-image.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants