Differences between revisions 2 and 3
Revision 2 as of 2019-08-28 05:28:38
Size: 4285
Comment:
Revision 3 as of 2019-09-21 04:37:28
Size: 4138
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
'''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.''' '''Not to be confused with AOSP's aosp_blueline-userdebug build target, goal of this project is to run AOSP on Pixel3 device with mainline linux kernel.'''
Line 6: Line 6:
 * 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.
 * Upstream aosp_blueline-userdebug build target use Qcom prebuilt firmware and services binaries which only work with msm-android-4.9 kernel.
 * pixel3_mainline-userdebug build target use mainline linux kernel and can boot to console right now with ADB. Work is going on to enable Display panel + Mesa/Freedreno support.
Line 12: Line 12:
1. Download the AOSP source tree and blueline device config from local manifest: 1. Download the AOSP source tree and pixel3_mainline device config from local manifest:
Line 24: Line 24:
lunch linaro_blueline-userdebug lunch pixel3_mainline-userdebug
Line 45: Line 45:
--cmdline "firmware_class.path=/vendor/firmware \
androidboot.hardware=linaro_blueline init=/init \
androidboot.boot_devices=soc/1d84000.ufshc
printk.devkmsg=on buildvariant=userdebug" \
--output boot.img
--cmdline "" --output boot.img
Line 54: Line 50:
'''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 [[ https://developers.google.com/android/images#blueline | 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: '''Boot Pixel3 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 [[ https://developers.google.com/android/images#blueline | Pixel3 factory images ]], which is used to disable image verification. And then run following commands from HOST machine while Pixel3 is still booted in fastboot mode:
Line 71: Line 67:
fastboot flash system out/target/product/linaro_blueline/super.img
fastboot flash userdata out/target/product/linaro_blueline/userdata.img
fastboot flash system out/target/product/pixel3_mainline/super.img
fastboot flash userdata out/target/product/pixel3_mainline/userdata.img

AOSP on Blueline running Mainline kernel


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

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

Compile AOSP and kernel image from sources for linaro_blueline


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

   1 repo init -u https://android.googlesource.com/platform/manifest -b master
   2 git clone https://android-git.linaro.org/git/platform/manifest.git .repo/local_manifests -b db845c
   3 repo sync -j`nproc`

2. Build AOSP:

   1 . ./build/envsetup.sh
   2 lunch pixel3_mainline-userdebug
   3 make -j`nproc`

3. Build kernel image and boot.img:

Run the following commands to clone and build kernel Image:

   1 git clone https://git.linaro.org/people/amit.pundir/linux.git -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 > Image.gz-dtb

Build boot.img by running following mkbootimg command:

   1 mkbootimg --kernel Image.gz-dtb --ramdisk ramdisk.img \
   2 --base 0x00000000 --pagesize 4096 \
   3 --cmdline "" --output boot.img

4. Install:

Boot Pixel3 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 Pixel3 factory images, which is used to disable image verification. And then run following commands from HOST machine while Pixel3 is still booted in fastboot mode:

   1 # unlock bootloader
   2 fastboot oem unlock
   3 
   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
   7 
   8 # avoid a known smmu crash by turning OFF the display
   9 fastboot oem select-display-panel none; fastboot reboot bootloader
  10 
  11 # set _b as active partition since we mount system_b as super partition
  12 fastboot set_active b
  13 
  14 # flash AOSP images and reboot
  15 fastboot flash system out/target/product/pixel3_mainline/super.img
  16 fastboot flash userdata out/target/product/pixel3_mainline/userdata.img
  17 fastboot flash boot boot.img
  18 fastboot reboot
  19 
  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

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, collaborate.linaro.org and projects.linaro.org/LCG to communicate.

  • LCG's public mailing lists
  • IRC via irc.freenode.net
    • #linaro-android
    • #linaro-lmg

You can use the web or your favourite IRC client.

AOSP/blueline (last modified 2020-03-29 15:56:25)