Revision 1 as of 2019-07-19 13:50:43

Clear message

AOSP on Blueline running Mainline kernel

Not to be confused with AOSP's aosp_blueline build target, goal of this project is to run AOSP on blueline device with mainline linux kernel.

  • Upstream aosp_blueline build target use Qcom prebuilt firmware and services binaries which only work with msm-android-4.9 kernel.
  • linaro_blueline build target use mainline linux kernel and can boot to console right now using ADB. Work is going on to enable Display with mesa/Freedreno support.

Compile AOSP from sources for linaro_blueline

1. Download the AOSP source tree and blueline device config from local manifest:

   1 repo init -u -b master
   2 git clone .repo/local_manifests -b db845c
   3 repo sync -j`nproc`

2. Build:

   1 . ./build/
   2 lunch linaro_blueline-userdebug
   3 make -j`nproc`

3. Install:

Boot blueline in fastboot mode by powering off the device and then hold VOL down button and press/hold POWER button until bootloader (fastboot) comes up. Download and unzip vbmeta.img from blueline factory images, which is used to disable image verification. And then run following commands from HOST machine while blueline is still booted in fastboot mode:

   1 # unlock bootloader
   2 fastboot oem unlock
   4 # disable image verification if you haven't already
   5 fastboot --disable-verity --disable-verification flash vbmeta_a vbmeta.img
   6 fastboot --disable-verity --disable-verification flash vbmeta_b vbmeta.img
   8 # avoid a known smmu crash by turning OFF the display
   9 fastboot oem select-display-panel none; fastboot reboot bootloader
  11 # set _b as active partition since we mount system_b as super partition
  12 fastboot set_active b
  14 # flash AOSP images and reboot
  15 fastboot flash system out/target/product/linaro_blueline/super.img
  16 fastboot flash userdata out/target/product/linaro_blueline/userdata.img
  17 fastboot flash boot out/target/product/linaro_blueline/boot.img
  18 fastboot reboot
  20 # login to Android console
  21 adb shell

When done with testing, reboot into fastboot/bootloader mode, turn ON the display and switch OFF the device from bootloader menu :

   1 adb reboot bootloader
   2 fastboot oem select-display-panel; fastboot reboot bootloader

Building mainline kernel for blueline

Pre-built blueline kernel images are based on android-mainline-tracking tree hosted at

1. Run the following commands to clone and build kernel Image:

   1 git clone -b dragonboard-android-mainline-tracking
   2 cd linux
   3 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- blueline_defconfig
   4 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image.gz qcom/sdm845-blueline.dtb -j`nproc`
   5 cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/sdm845-blueline.dtb > arch/arm64/boot/Image.gz-dtb

2. Update kernel in the boot image:

Copy Image.gz-dtb (arch/arm64/boot/Image.gz-dtb) to the device/linaro/dragonboard-kernel directory and make the boot image again:

   1 make TARGET_PREBUILT_KERNEL=Image.gz-dtb bootimage -j`nproc`

Boot test your new kernel image by running following command:

   1 fastboot flash boot out/target/product/linaro_blueline/boot.img
   2 fastboot reboot

ToDo / Known Issues

  • fastboot boot boot.img is broken

  • Display is WIP
  • bootctrl HAL is WIP. So if you run into FAILED (remote: 'Failed to load/authenticate boot image: Load Error'), then run following command:

   1 fastboot fastboot set_active b

Need some help?

In addition to this wiki, we use various mailing lists, IRC, and to communicate.

  • LCG's public mailing lists
  • IRC via
    • #linaro-android
    • #linaro-lmg

You can use the web or your favourite IRC client.