GKI 1.0: Compatibility Testing

This page describes how to obtain boot images with kernel build artifacts for compatibility testing.

Obtain boot images

In AOSP, you can obtain prebuilt boot images from ci.android.com. The boot images are contained within the aosp_arm64-img-*.zip archive in the aosp_arm64 build target, as follows:

Both signed and unsigned boot images come in the following kernel compression options:

  • boot-5.4.img is an uncompressed kernel.
  • boot-5.4-gz is a gzip compressed kernel.
  • boot-5.4-lz4 is an lz4 compressed kernel.

For development purposes, you can use kernel prebuilts and GKI boot images that export all symbols in the kernel (the symbols are untrimmed). Untrimmed kernel prebuilts are generated in the kernel_debug_aarch64 target for a particular kernel build on ci.android.com. Untrimmed GKI boot images are generated in userdebug builds alongside the normal trimmed GKI boot images and have filenames that end with -allsyms.img.

Obtain kernel build artifacts

When debugging issues in a GKI boot.img file, it's useful to also have the build artifacts associated with the kernel in that file. For example, you can use the unstripped vmlinux for debugging and the manifest for reproducing the GKI kernel build locally. To obtain build artifacts:

  1. Locate the build number for the kernel prebuilt that was used to create the GKI boot.img. The build number appears at the end of the kernel version, preceded by the letters ab. The following example shows the build number in bold:

    [ 0.000000] Linux version 5.4.49-00947-g9d21bcd4897b-ab6638796

    You can also determine the build number of the kernel by using grep to find a boot image containing an uncompressed kernel:

    grep -a "Linux version " boot-5.4.img
    
  2. Open the kernel prebuilt build by using the build number in the following URL: https://ci.android.com/builds/submitted/<number>/kernel_aarch64/latest

    For example, using the build number from step 1, the URL is as follows: https://ci.android.com/builds/submitted/6638796/kernel_aarch64/latest

    When using an untrimmed build, replace kernel_aarch64 in the link with kernel_debug_aarch64.