Building Android kernel without having to sync AOSP

Hi,

I would like to ask if it is possible to build and flash just the kernel for DB410c without having to sync the entire AOSP tree? I am trying to enable coresight on the device.

Thank you.

Are you running Linaro AOSP snapshot?

The AOSP is responsible to generate boot-image (boot.img) from prebuilt kernel image and initrd. but if you build your own kernel/dtb [1] (follow kernel build instruction), you can inject it in the boot.img.

You can use dbootimg tool [2]:

git clone https://github.com/96boards/dt-update.git
cd dt-update && make
sudo make install

Then update the prebuilt boot-image with your newly generated kernel/dtb:

dbootimg boot.img -u kernel db410c-kernel/arch/arm64/boot/Image.gz
dbootimg boot.img -u dtb db410c-kernel/arch/arm64/boot/dts/qcom/apq8016-sbc.dtb

And flash

fastboot flash boot boot.img

[1] Building Android Open Source Project (AOSP) for Dragonboard - 96Boards
[2] https://github.com/96boards/dt-update/tree/master/tools/dbootimg

Hi,

I have tried to use this boot.img https://releases.linaro.org/96boards/dragonboard410c/qualcomm/android/16.03/boot.img.tar.xz but then it says DTB not found in boot image. Is there another boot.img that I should try or is this the wrong boot.img?

Thank you.

Ok, this build one is a third-party (Qcom) prebuilt (build is 3 years old), you can follow the third-party guide for rebuilding: https://developer.qualcomm.com/download/db410c/linux-android-software-build-and-installation-guide.pdf?referrer=node/29241

If you look at build manifest you’ll find that latest build points to git://codeaurora.org/kernel/msm-3.10 (LA.BR.1.2.7_rb1.5 tag) for kernel source. You can then certainly clone this repo separately and rebuild the kernel.

The kernel I pointed you previously was related to Linaro Android images (snapshot), generated with AOSP master: http://snapshots.linaro.org/96boards/dragonboard410c/linaro/aosp-master/latest/
Which is however maybe not as stable as Qcom image since it’s a work-in-progress project.