Building AOSP - lunch command fails

I’m trying to build AOSP for the dragonboard 410c and everything goes fine until I run lunch as detailed in https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/guides/aosp.md.html.
It throws this error:
*** Unknown ARM architecture version: armv8-a. Stop.

** Don’t have a product spec for: ‘db410c32_only’
** Do you have the right repo manifest?

I also tried using just db410c32_only, which returned another error saying that it was an invalid lunch combo. Anyone know a solution to this, or have I done something wrong?

@pundiramit i haven’t tested this yet, but is 410c still maintained? Is it building on you end?

Interesting. I didn’t see this error before. May be something new in AOSP is triggering this build failure. I’m travelling this week. I’ll get to it when I get back. Also I do expect build to fail due to recent external/bison project change, which got fixed last week but the prebuilts AOSP project (prebuilts/build-tools) need to be updated too. I’ll follow up on that too. Thanks.

Ok, I just tested this, not getting the error on my end. But the build fails while compiling mesa
https://paste.ubuntu.com/p/ygN57M7xf5/

Yeah I was talking about the same build error above. It is fixed in the bison source but the prebuilt/build-tools need to be updated too.

1 Like

did someone faced up this error during the build?
xmlpool.h:103:10: fatal error: ‘xmlpool/options.h’ file not found
build date 05/12/18/

I am wondering the same thing.
Or is there instruction to build a eariler release of AOSP.
Can we use the manifest.xml from a liarno release to download the same sources that were used to build the known working AOSP?

Hi, Happy New Year for all, folks.

Please, follow the link.

I have tried to build the latest AOSP DB 410, but still facing some troubles, and system.img is still absent from the out files…

keep us informed regarding the AOSP buld progress :wink: as we are.

Have you tried increasing the number of jobs (as this post):

Dear Danielt.
I did make j16 - successfully.
error 'xmlpool/options.h' file not found disappeared.
Thanks.

Build had taken approx 4 hours on my Lenovo laptop i7 16 GB RAM (ubuntu 16.04 LTS),
but at the end of make got the phrase:
#### make failed to build some targets (xxxx seconds) ####
Tried to flash and DB became bricked.

I’d always advise keeping build logs (adding 2>&1 | tee build.log to the build command for example) and sharing them using a pastebin or github git. There really isn’t enough info to conclude anything here.

I built the AOSP Master branch yesterday with no errors.
Originally i tried to build it on a laptop that simply did not have the power to do it.
When trying to build on the laptop i did see the xmlpool,h error.

I have access to a 24 core server with 24 gb ram now and successfully built AOSP on the server with zero errors. Used j-20.

So it seems the main issue is trying to build on a system that just cant build it.

I want to build the standalone kernel and boot.img.
The compile instructions here provides a link for the defconfig.

https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/guides/aosp.md.html

http://snapshots.linaro.org/96boards/dragonboard410c/linaro/aosp/kernel/latest/defconfig

The file is not at that link.
From here there are 4 kernel config files.
http://snapshots.linaro.org/96boards/dragonboard410c/linaro/aosp/kernel/latest/

I reviewed this thread

Finding

pundiramit

Nov '18

Also going forward, yes we do need out of tree Android config fragments to build db410c kernel for AOSP. Plan is to use qcom_defconfig as base config and enable Android config fragments https://android.googlesource.com/kernel/configs/ at build time.

So there is still no answer to what files to use for the kernel config.
I understand that fragments are going to be used now.
What all files do i need to generate the config.

The closest i can find to an answer is this post.

ndec

Apr '18

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.

So is it correct that these are the fragments.

“files we use to build are: “qcom_defconfig android-base.config android-recommended.config”
And we use scripts/kconfig/merge_config.sh to generate the defconfig ???

1 Like

Hi,

I’m lost in this intermingled thread, so excuse me if I fail to find and answer any of your questions.

Fix for “‘xmlpool/options.h’ file not found” error is submitted here for review https://android-review.googlesource.com/c/platform/external/mesa3d/+/858424

drm_hwcomposer runtime display error and temporary workaround is discussed here https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/issues/19

If you pull in these two fixes then AOSP master branch should build and boot fine for you on db410c and db820c.

To prepare db410c defconfig and build bootable kernel Image.gz-dtb run:

$ cd $KERNEL_DIR
$ cd kernel/configs/
$ ./android-fetch-configs.sh #This will fetch latest set of Android config fragments
$ cd $KERNEL_DIR
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-androidkernel- qcom_defconfig android-recommended.config android-recommended-arm64.config android-base.config
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-androidkernel- -jX
$ cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/apq8016-sbc.dtb > arch/arm64/boot/Image.gz-dtb

I applied the 2 fixes noted above to the build tree.
AOSP compiled without error and the device boots properly.
This build of AOSP says it is Oreo. I’m happy with that.

Thank You

After again sync (40GB) of repo and make -j16.
Sorry to say, but .log file is empty in some reason.

Here is the warning where i expect the crash happen and ninja failed:

>     [ 98% 68372/69740] //frameworks/base:test-api-stubs-docs Metalava
> 
>     /root/ANDROID_TOP/frameworks/base/media/java/android/media/MediaDrm.java:1207: warning: Returning unexpected constant SECURITY_LEVEL_MAX; is @SecurityLevel missing this constant? Expected one of SECURITY_LEVEL_UNKNOWN, SECURITY_LEVEL_SW_SECURE_CRYPTO, SECURITY_LEVEL_SW_SECURE_DECODE, SECURITY_LEVEL_HW_SECURE_CRYPTO, SECURITY_LEVEL_HW_SECURE_DECODE, SECURITY_LEVEL_HW_SECURE_ALL [ReturningUnexpectedConstant]
>     [ 98% 68373/69740] //frameworks/base:system-api-stubs-docs Metalava
> 
>     /root/ANDROID_TOP/frameworks/base/media/java/android/media/MediaDrm.java:1207: warning: Returning unexpected constant SECURITY_LEVEL_MAX; is @SecurityLevel missing this constant? Expected one of SECURITY_LEVEL_UNKNOWN, SECURITY_LEVEL_SW_SECURE_CRYPTO, SECURITY_LEVEL_SW_SECURE_DECODE, SECURITY_LEVEL_HW_SECURE_CRYPTO, SECURITY_LEVEL_HW_SECURE_DECODE, SECURITY_LEVEL_HW_SECURE_ALL [ReturningUnexpectedConstant]
>     [ 98% 68374/69740] //frameworks/base:hiddenapi-lists-docs Metalava
> 
>     /root/ANDROID_TOP/frameworks/base/media/java/android/media/MediaDrm.java:1207: warning: Returning unexpected constant SECURITY_LEVEL_MAX; is @SecurityLevel missing this constant? Expected one of SECURITY_LEVEL_UNKNOWN, SECURITY_LEVEL_SW_SECURE_CRYPTO, SECURITY_LEVEL_SW_SECURE_DECODE, SECURITY_LEVEL_HW_SECURE_CRYPTO, SECURITY_LEVEL_HW_SECURE_DECODE, SECURITY_LEVEL_HW_SECURE_ALL [ReturningUnexpectedConstant]
>     19:19:06 ninja failed with: exit status 1
#### failed to build some targets (03:05:30 (hh:mm:ss)) ####

I’m very new to the AOSP and Linux development. Looking Forward to hear from you.
Regards
Mikhail S.

What instructions are you following (there should be no need to sync again even if you are rebuilding from scratch).

For now just try running make again, hopefully it will still fail at the same place but without building everything else first (and remember you can scroll back in the terminal to get more than a page of output).

I built AOSP again yesterday with no errors in compilation.
There were 2 changes that needed made to the source but the change for mesa xmlpool.h has been merged now so there is only one change needed now.

drm_hwcomposer runtime display error and temporary workaround is discussed here https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/issues/19

So look at the link and make the change to external/drm_hwcomposer/drmdisplaycompositor.cpp

change “source_layers.front()) < 0;”
to “source_layers.front() + 1) < 0;”

Other than that i would look at your build environment.
You may be missing a dependency.
Make sure you have setup build environment as defined on AOSP website.

As i said i have synced the latest AOSP master branch and built it successfully.
It will boot into android. There are a couple of issues I am trying to track down.
However i feel it will be better to start a new thread for the debugging.

1 Like

Bingo! I’m confirming successful build after minor PC modification (changing the 250G SSD to 500G HDD) and re-run make j8 many times (on my i7) and after 12 hours

#### build completed successfully (12:02 (mm:ss)) ####

Thanks you all for support, Next week will try to flash the DB410.

Hello All.

Several questions:

  1. I have build the AOSP flashed it to the DB410 - Nothing. Reacting to Power button and dimming the screen and nothing more.

Decided to build and flash latest Kernel.

  1. there is no defconfig file here:
    wget http://snapshots.linaro.org/96boards/dragonboard410c/linaro/aosp/kernel/latest/defconfig -P arch/arm64/configs/

There are only:
qcom_defconfig
android-base.config
android-recommended.config

Please, give a hint which conf is right.

3)Does Kernel by default from AOSP build is workable?
4) Page not found 404 Error when goes here: https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/guides/aosp.md.html
What is the reason, is it server issue?

Thanks
Regards
Mikhail.

Please see my last post here