Automotive Image Builder tool
Automotive Image Builder tool¶
Automotive image builder is a tool used to create operating system (OS) images. It relies on the capabilities of OSBuild underneath it. Because OSBuild uses files called manifests as input to define how to build the image, that terminology extends to the input files used by automotive-image-builder as well.
The automotive image builder manifests are YAML files that define the content and configuration of the OS image. A manifest file can be as simple as the following minimal manifest example:
```console title="Minimal AIB manifest" --8<-- "demos/minimal/minimal.aib.yml"
To review available manifest options and configurations, see:
[Automotive Image Builder manifest format](https://centos.gitlab.io/automotive/src/automotive-image-builder/simple_manifest.html)
## Options and mechanics
The OS image that you deploy on the target hardware consists of AutoSD packages that you assemble into an OS image by using the AutoSD image build
tool, `automotive-image-builder`.
The Automotive SIG stores source files in public Git repositories, including all of the CentOS Stream or AutoSD source code, `SPEC`
files, and patches used to build AutoSD. The [RPM Package Manager](../features-and-concepts/con_rpm-packages-and-the-rpm-package-manager.md)
references this repository to compile AutoSD RPM packages.
Red Hat engineering teams build those RPM packages into an OS image by using
[`automotive-image-builder`](https://gitlab.com/CentOS/automotive/src/automotive-image-builder), which composes a build configuration
specification, called a manifest. The compose operation takes a YAML-based automotive image manifest and a set of options that affect the compose
and resolves the manifest into an OSBuild JSON file. The JSON file is a precise build instruction for how to build an image with OSBuild with the
very specific software, such as selected packages and container images, listed in the compose.
When you build an image with `automotive-image-builder`, you must specify some options in the build command:
```console
$ sudo automotive-image-builder build --mode <package-or-image> --target <target> \
--export <export-format> <path-to-manifest>.mpp.yml <my-image>.qcow2
Architecture¶
--arch
: The hardware architecture to build for (x86_64 or aarch64). If unspecified, the native
architecture is used.
Note
You can compose
an image for any architecture, but you can only build
for the native architecture.
Distributions¶
--distro
: Define the package repositories for the distribution you intend to use. The default is "cs9". View available distributions with the
automotive-image-builder list-dist
command. Available distributions include:
- autosd or autosd9
- cs9
- eln
- f40
To extend the list-dist
with custom distributions, add an ipp.yml
in a directory called /some/dir/distro
and pass
--include /some/dir
to the argument list.
Modes¶
--mode
: Set the value to package
or image
. The default value is image
.
- Use
package
to build a package-based OS image, which is useful for development and testing. - Use
image
to build an OSTree image for use in production.
Targets¶
--target
: The physical or virtual deployment target for your image. The default value is qemu
.
View the available targets with the automotive-image-builder list-targets
command. Available targets include:
- QEMU with aboot or grub
- KVM
- TI AM62, AM69, BeaglePlay, J784S4 EVM, and TDA4
- AWS
- Qualcomm QDrive3 and RideSX4
- ccimx93
- Windows PC
- Renesas R-Car
- Raspberry Pi 4
- NXP S32G2-VNP-RDB3
Export formats¶
--export
: The image file type that you want to build. View the available export formats with the automotive-image-builder list-exports
command.
Export formats available as of October 2024 include:
- image: A raw disk image with partitions
- qcow2: A qcow2 format disk image with partitions
- ext4: An ext4 filesystem containing just the rootfs partition (i.e., no boot partitions)
- aboot: An android boot system partition image and a boot partition
- container: A container image you can run with podman or docker
- tar: A tar file containing the basic rootfs files
- ostree-commit: An ostree repo with the commit built from the image
- ostree-oci-image: An oci image wrapping the ostree commit from ostree-commit
- rpmlist: A json file listing all the RPMs used in the image
Additional resources
- For more information about how to build automotive images, see automotive-image-builder.
Next steps
For more information about using the automotive-image-builder
tool with build options and manifests
to provision your hardware, see the flashing guide specific to your target hardware: