[Centos-automotive-sig] Initial support for android boot in sample images

Fri Sep 2 08:48:26 UTC 2022
Alexander Larsson <alexl at redhat.com>

I just today merged[1] initial support for android boot in the sample
images. This is still somewhat experimental, but allows some level of
support for aboot.

The support has multiple parts:
* The abootimg rpm has an app that can create aboot images.
* The aboot-update rpm has integration between the kernel and aboot. It
looks
  at the /boot/aboot.cfg file for aboot options and applies them for a
kernel version
  producing a file /boot/aboot-${kernel_version}.img. It also hooks into
the kernel
  rpms to run automatically when a new kernel is installed.
* The osbuild-aboot rpm, which must be installed on the build host, adds
some
   new osbuild stages that use aboot-update. (This is in a separate copr)
* A new "abootqemu" target which is similar to the existing "qemu" target,
but using
  aboot instead of grub/efi.
* Support in runvm for --aboot, which uses a custom bios that supports
aboot. This
  allows testing of the aboot-based boot. (Only on aarch64 atm.)

A full example of testing this:

    $ sudo dnf copr enable alexl/osbuild-aboot
    $ sudo dnf install osbuild-aboot
    $ make cs9-abootqemu-minimal-regular.aarch64.qcow2
    $ make qemu-u-boot-aarch64.bin
    $ ./runvm --aboot --arch aarch64
cs9-abootqemu-minimal-regular.aarch64.qcow2

The qemu boot output:

    U-Boot 2022.07 (Aug 26 2022 - 00:00:00 +0000)
    [...]
    Device 0: 1af4 VirtIO Block Device
                Type: Hard Disk
                Capacity: 8192.0 MB = 8.0 GB (16777216 x 512)
    ... is now current device
    Found Android Boot Image

    virtio read: device 0 block # 2048, count 131072 ... 131072 blocks
read: OK
    Kernel load addr 0x50000000 size 10232 KiB
    Kernel command line: root=UUID=76a22bf4-f153-4541-b6c7-0332c0dfaeac ro
loglevel=4 efi=runtime console=ttyAMA0
    RAM disk load addr 0x11000000 size 25563 KiB
       Uncompressing Kernel Image
       Loading Ramdisk to fe709000, end fffff8c6 ... OK
       Loading Device Tree to 00000000fe606000, end 00000000fe708fff ... OK

    Starting kernel ...

    [    0.000000] ACPI: Failed to init ACPI tables

    Welcome to CentOS Stream 9 dracut-057-13.git20220816.el9 (Initramfs)!
    [...]


[1] https://gitlab.com/CentOS/automotive/sample-images/-/merge_requests/116
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                Red Hat, Inc
       alexl at redhat.com         alexander.larsson at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-automotive-sig/attachments/20220902/89796a65/attachment-0002.html>