[ Web Proxy ]
URL:
Viewing: https://source.android.com/docs/devices/cuttlefish/bootloader-dev [Back]  [Original]

Develop Android bootloader features  |  Android Open Source Project Skip to main content
Android Open Source Project [Android Open Source Project]

Develop Android bootloader features Stay organized with collections Save and categorize content based on your preferences.

This page describes how to build, run, and develop Android bootloader features on a Cuttlefish device.

AOSP sources

To develop Android bootloader features, use the Cuttlefish configuration of U-boot with Cuttlefish in the latest release branch (android17-release) or on generic system image (GSI) branches for Android 11 or higher. The following are the sources in AOSP:

Develop a bootloader

To build, run, and develop bootloader features locally, follow these steps:

Note: Instead of building locally (to avoid downloading the U-boot source and setting up a bootloader development), you can download the relevant artifacts at ci.android.com.
  1. Clone the manifest for the Android fork of U-boot:

    $ mkdir u-boot-mainline
    $ cd u-boot-mainline
    $ repo init -u https://android.googlesource.com/kernel/manifest -b u-boot-mainline
    $ repo sync -j$(nproc) -q
  2. Build the bootloader target appropriate for your Cuttlefish architecture. For example:

    • x86_64

      $ tools/bazel run //u-boot:crosvm_x86_64_dist
    • aarch64

      $ tools/bazel run //u-boot:crosvm_aarch64_dist

    The resulting bootloader binary (u-boot.bin for arm64 and u-boot.rom for x86_64) is found in $PATH_TO_REPO/out/u-boot-mainline/dist.

  3. Launch the Cuttlefish device with the bootloader. Include the pause_in_bootloader parameter to disable autoboot and let you interact with the bootloader.

    $ launch_cvd \
        -bootloader /$PATH/$TO/u-boot-mainline/out/u-boot-mainline/dist/u-boot.rom \
        -pause_in_bootloader -console=true
    Note: If on aarch64, use u-boot.bin instead of u-boot.rom.
  4. To interact with the bootloader, connect to the bootloader console.

    $ screen ~/cuttlefish_runtime/console
  5. When done with bootloader interactions, continue the boot by typing boot into the console.

Test bootloader flow with different kernels

To test the bootloader flow with different kernels or kernel modules, pass in the target artifacts (kernel and kernel modules) using the --kernel_path and --initramfs_path arguments. The assembler repacks the boot images based on the artifacts passed in the arguments.

cvd create \
    -kernel_path=/$PATH/$TO/common-android14-6.1/out/android14-6.1/dist/bzImage \
    -initramfs_path=/$PATH/$TO/common-android14-6.1/out/android14-6.1/dist/initramfs.img

For more information, see Develop Android Kernels.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-06-17 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-17 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page