Build kernel image for dragon board

Can any one please guide me where I am doing wrong ?

Did you install the 18.01 release or are you running with an older
version?

Thanks danielt for the reply

I hope you are talking about the ubuntu version , Please find the below details about my ubuntu machine
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
x86_64 bit machine

FYI : I am trying to replace the kernel on the DB_410C which is running with Android[5.1.1] on it.

Thanks

I think you need to update the bootloader (LK), the one you have does not support the appended DTB. I would suggest to download the rescue files [1] and flash LK bootloader with fastboot:

fastboot flash aboot emmc_appsboot.mbn

[1] http://snapshots.linaro.org/96boards/dragonboard410c/linaro/rescue/latest/dragonboard-410c-bootloader-sd-linux-99.zip

EDIT: This comment is not relevant if you’re platform is running Android, cf Daniel’s comment below.

Afraid not, I was asking what you were running on the Dragonboard …

… thankfully you told us that too.

I’m afraid the guide you are following is for people running Debian GNU/Linux on their Dragonboard. The instructions will not work for AOSP (it may boot but it will break Android features since they expect a different kernel).

As far as I know there are no kernel build instructions for AOSP+DB410C but the full build guide will result in the kernel being recompiled along with everything else:

HI danielt ,

Thanks for the reply.
Is there any repository where dedicated Kernel source for AOSP is maintained?
Because it will consume more time to Download the AOSP code (As its pretty huge ~60GB)
Please let me know if you have any other alternative ?

the kernel used for the Linaro AOSP project on Dragonboard is this one:

https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/log/?h=release/android/qcomlt-4.14

e.g. branch name is release/android/qcomlt-4.14, and the defconfig files we use to build are: “qcom_defconfig android-base.config android-recommended.config”

We publish the kernel and boot image here:
http://snapshots.linaro.org/96boards/dragonboard410c/linaro/aosp/kernel/latest/

The binaries there are generated from this Jenkins job:
https://git.linaro.org/ci/job/configs.git/tree/lt-qcom-linux-aosp.yaml

If you unroll all scripts you will be able to find the instructions we use to build.

Thanks ndec. its very helpful.

@shan2911: From the version number you quoted it looks to me like you are running the Qualcomm port of AOSP, not the Linaro port. Thus I think you might encounter also problems with release/android/qcomlt-4.14 , the Qualcomm port of AOSP will not expect this kernel.

The Linaro port is still a work-in-progress and has little in the way of documentation, although there is a build guide:
https://www.96boards.org/documentation/consumer/dragonboard410c/guides/aosp.md.html

I appreciate the support :slight_smile:

HI ,

I followed the steps mentioned in the below link
https://www.96boards.org/documentation/consumer/dragonboard410c/guides/aosp.md.html

But there is no success , I am getting the same result.[FAILED (remote: dtb not found)]

I order to make sure I built the entire AOSP , then try to boot with only boot image (fastboot boot boot.img) , for this step also I am getting the same result [[FAILED (remote: dtb not found)]

I am not sure where I am doing wrong ?
is there any other methods we can get rid of this error ? meaning building the boot image with dtb.

Reverts are much appreciated.

Note :The version of Kernel currently DB_410C board is running “Linux version 3.10.49”

The steps use appended DTB as well:

cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/apq8016-sbc.dtb > db410c-qcomlt-4.14.gz-dtb

This requires an up-to-date bootloader. Like I said, I suggest you to update LK (aboot partition).

You can also use rescue procedure to update firmware/bootloader:

Just to confirm did you follow the whole guide or just the kernel build?

(following the whole guide won’t update your boot firmware… you still need to do that but it will ensure you have a userspace that matches the kernel).

Hi Loic ,

Thanks for the support ,

update of LK(aboot partition ) is applicable to system running with Android also ?

Note : I flashed the aboot partition as mentioned , after the reboot my adb connection is not establishing .Looks like it got brick.

Hi Danielt ,

First I tried with only the kernel build , but failed to update the kernel
Then I tried to build the complete AOSP and tried to boot with the boot image part of this build , here also I failed.
I am totally blank , Can please some one guide me what is the reason for this fail (Eventhough we merge the dtb with the regular kernel build (Image.gz)?

First I tried with only the kernel build , but failed to update the kernel
Then I tried to build the complete AOSP and tried to boot with the boot image part of this build , here also I failed.
I am totally blank , Can please some one guide me what is the reason for this fail (Eventhough we merge the dtb with the regular kernel build (Image.gz)?

It’s what Loic said. You need a bootloader that supports this type of
kernel image.

Hi @shan2911

It is confusing, so I will try to clarify. When the 410E boots it goes through about 5 stages, where each stage is fetching more code off the eMMC. You need to use versions of each stage that are compatible with each other, and compatible with the AOSP you are building. You have older versions of the stages and this why the kernel you built won’t boot.

The kernel you are building needs the latest versions of all of the stages, and the correct partition table. The easiest way to get all of the right versions and partition table is to build an install SDCard with the latest Debian release and load the eMMC from the SDCard. Once you have done this (and tested that it correctly boots from eMMC after removing the SDCard), then you can use fastboot to install the new AOSP kernel (boot) and user file system (rootfs) that you have built.

Hope this helps.

Full Disclosure: I am currently an employee of Qualcomm Canada and any opinions I may have left in this or any other post do not necessarily match the opinions of my employer. As of May 22nd/2018 I will no longer be employed by Qualcomm Canada. Currently looking for new opportunities, you can contact my personal email through the forums at 96Boards.

1 Like

Thanks for the reply .
Is there any ways I can prepare the SD card directly with the latest Android [7.0.0] images ?
Meaning build the AOSP and prepare the SD card on my own ?

Thanks for the reply ,

How can I get such bootloader ?
Is there a way I can build this kind of bootloader?

Follow @ljking’s advice above. It is good, mostly because the Linaro AOSP port probably has more in common with the Linaro Debian images than with the Qualcomm AOSP builds.

Only the final stage bootloader (called LittleKernel) is open source. Instructions to rebuild that are found in the release notes for the Debian releases (scroll down):
http://releases.linaro.org/96boards/dragonboard410c/linaro/debian/latest/

HI ljking
From your comment below is my understanding

  1. Prepared a uSD card with latest Debian images and load the eMMC with this debain image.Make sure its working fine.
    2.Build the latest AOSP (Definately appropriate to the DB board)
    3.Place the board in fastboot mode and flash the images built in the previous step.

Please correct me if I m doing anywhere wrong.