Is the AOSP master supported?

Oh, you’re going to need a lot more storage space than that. Figure on around 100 GB.

Can someone please help with the kernel source and buuild instructions for the prebuilt kernel available?It seems to be based on the Linux kernel version 5.2 ?

Not if you don’t give us the relevant part of the error, which could be a few hundred lines above the part you copied out.

One spot it will probably fail on you is trying to copy the prebuilt kernel, for which you will need to get the appropriate dragonboard-kernel repository.

That looks like the typical type of transient errors that crop up in Master while features are in the process of being uploaded. I’d try a repo sync and build again.

FYI: I ran a 410c build on my device and kernel repo starting yesterday, and the build completed successfully. I haven’t booted it, so I can’t say that it actually works, although I suspect it will. I strongly recommend that you start with that; AOSP-Automotive · GitLab

Pay attention to the “pinned manifests” repository.

You don’t have an 820c. You have a 410c. I’m not going to connect every dot for you, if you can’t go part way yourself then what you really need is to find someone to generate and install the builds for you, and that isn’t me or anyone else on this forum.

The last hint I have time to give you today is don’t build the kernel — that’s for the 820c. Use the prebuilt one for the 410c.

And look, I don’t even know if it will boot when you install it. I haven’t tried. The only thing I’ve done is checked that it actually compiles through successfully.

EDIT:
I had the opportunity this morning to test it on an actual 410c and it DID NOT BOOT. However, I added a commit that fixed the issue (not copying the fstab to the correct location, and thus not mounting the userdata partition) and it now boots. Just do a “repo sync” and build it again – don’t “make clean” it, just do a quick build to get the fixed vendor.img (fastboot flash it to the cache partition, which is repurposed as vendor). There is a recurring crash in the logcat related to media swcodec, that I (or you) may work out later, but you now have a known good starting point to work from.

https://android-git.linaro.org/device/linaro/dragonboard410c-kernel.git/commit/?h=dragonboard-kernels

Here you go linaro/dragonboard410c-kernel.git - [no description]

1 Like

I fixed this issue by updating the fstab location in the init.common.rc file, and point to the fstab file in /vendor/etc/init

on fs
mount_all /vendor/etc/init/fstab.${ro.hardware}
swapon_all /vendor/etc/init/fstab.${ro.hardware}
setprop ro.crypto.fuse_sdcard false

I’m attempting to build Android AOSP for the DragonBoard 410c using Ubuntu 20.

I had previously pulled the Android AOSP source while following the 96Boards procedure for the DragonBoard 410c however I found that lunch no longer had an entry for db410c.

Then I found your procedure. I removed the existing device/linaro/dragonboard directory tree as that seems to be only for the DragonBoard 820c. I then did the git clone to pull the DragonBoard 410c changes replacing the DragonBoard 820c version of the directory.

Then did the source and followed by lunch db410c which seemed to work.

I then did make -j2 per @doitright post and I am seeing the following error message.

[ 95% 415/436] including system/sepolicy/Android.mk …
system/sepolicy/Android.mk:57: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead…
system/sepolicy/Android.mk:62: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead…
FAILED: ninja: ‘device/linaro/dragonboard-kernel/db410c-amt-5.2.gz-dtb’, needed by ‘out/target/product/db410c/kernel’, missing and no known rule to make it
23:50:30 ninja failed with: exit status 1

Looking further at the link you provided, Missing defconfig for Linaro's AOSP port for db410c - #7 by BigCountry907 , it appears that there is an additional step or two needed to set up the proper environment.

Copy Device tree and kernel to AOSP TREE
cd /root/DB-KERNEL/db410c-kernel
cat /root/DB-KERNEL/db410c-kernel/arch/arm64/boot/Image.gz /root/DB-KERNEL/db410c-kernel/arch/arm64/boot/dts/qcom/apq8016-sbc.dtb > db410c-qcomlt-4.14.gz-dtb
cp /root/AOSP/device/linaro/dragonboard-kernels/db410c-qcomlt-4.14.gz-dtb /root/AOSP/device/linaro/dragonboard-kernels/db410c-qcomlt-4.14.gz-dtb-old
rm -rf /root/AOSP/device/linaro/dragonboard-kernels/db410c-qcomlt-4.14.gz-dtb
cp db410c-qcomlt-4.14.gz-dtb /root/AOSP-DB/device/linaro/dragonboard-kernels/

In that same discussion, @BigCountry907 mentions something similar.

However there appears to be a difference in the file name which I assume has to do with the Linux kernel version?

What am I missing in order to complete this build?

Try adding the prebuilt kernels from here:
https://android-git.linaro.org/device/linaro/dragonboard410c-kernel.git/tree/?h=dragonboard-kernels

@doitright Thank you. I can navigate using a browser to that URL and I can see that the file db410c-amt-5.2.gz-dtb is there along with others. I suppose those are a set of different prebuilt Linux kernels.

Using a terminal window, I have navigated to device/linaro/dragonboard-kernel and can see that the only thing there is a directory, android-5.4, which contains a number of files with a file extension of .ko along with a couple of others with a .prop extension. There is also a file named Image.gz.

However from your reply, what I need to do is to access the URL you provided and pull the missing file, db410c-amt-5.2.gz-dtb, from that remote directory into device/linaro/dragonboard-kernel.

What is the command to do so? Is that done using git clone or curl or what?

Sorry to be a bother about this however this is an area with which I’m unfamiliar.

Thank you for your help.

I am now seeing a different error message after updating the directory device/linaro/dragonboard-kernel with the prebuilt kernel per @doitright posting above.

To fetch the kernel, I used the wget command as in

wget https://android-git.linaro.org/device/linaro/dragonboard410c-kernel.git/tree/db410c-amt-5.2.gz-dtb?h=dragonboard-kernels

I moved the file to the device/linaro/dragonboard-kernel directory.

I then did

source build/envsetup.sh
make clobber
lunch db410c
make -j2

I see the following initial output when I do the make-j2

rick@rick-MS-7B98:~/Documents/Android_aosp$ make -j2
build/make/core/soong_config.mk:179: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead..
build/make/core/soong_config.mk:180: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead..
============================================
PLATFORM_VERSION_CODENAME=S
PLATFORM_VERSION=S
TARGET_PRODUCT=db410c
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-52-generic-x86_64-Ubuntu-20.04.1-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=AOSP.MASTER
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=external/mesa3d
============================================

I saw the following error messages

checkvintf I 11-12 20:08:05    23    23 HostFileSystem.cpp:43] Fetch 'out/target/product/db410c/vendor/etc/vintf/manifest/manifest.xml': OK
checkvintf E 11-12 20:08:05    23    23 VintfObject.cpp:67] getDeviceHalManifest: status from fetching VINTF information: -2147483648
checkvintf E 11-12 20:08:05    23    23 VintfObject.cpp:68] getDeviceHalManifest: -2147483648 VINTF parse error: Cannot add manifest fragment /vendor/etc/vintf/manifest/manifest.xml: HAL "android.hardware.wifi.supplicant" has a conflict: Conflicting major version: 1.2 (from /vendor/etc/vintf/manifest.xml) vs. 1.3 (from /vendor/etc/vintf/manifest/manifest.xml). Check whether or not multiple modules providing the same HAL are installed.
checkvintf E 11-12 20:08:05    23    23 check_vintf.cpp:464] Cannot fetch vendor manifest.
checkvintf I 11-12 20:08:05    23    23 check_vintf.cpp:467] Checking vendor matrix.
checkvintf I 11-12 20:08:05    23    23 VintfObject.cpp:57] getDeviceCompatibilityMatrix: Reading VINTF information.
checkvintf I 11-12 20:08:05    23    23 HostFileSystem.cpp:43] Fetch 'out/target/product/db410c/vendor/etc/vintf/compatibility_matrix.xml': OK
checkvintf I 11-12 20:08:05    23    23 VintfObject.cpp:63] getDeviceCompatibilityMatrix: Successfully processed VINTF information
20:08:05 ninja failed with: exit status 1

#### failed to build some targets (01:10 (mm:ss)) ####

looking for manifest files, I did the following command with the following output.

rick@rick-MS-7B98:~/Documents/Android_aosp/device/linaro$ find . -name "manifes*.*" -print
./dragonboard-kernel/android-5.4/manifest_6924402.xml
./poplar/manifest.xml
./dragonboard/manifest.xml
./hikey/manifest.xml
./hikey/vr/manifest.xml
./hikey/sensorhal/manifest.xml

From a previous post I saw something about having multiple and conflicting manifests which is what appears to be happening here.

What is the problem and what actions should I take to correct it?

Just to cause nothing but confusion, the “conflicting” type of manifest you read about has nothing to do with those manifest files, rather those would be the ones that inform the repo command where to find all of the repositories you are looking for.

Building aosp can be something of a challenge when nobody has already adapted the device repository you’re working with to the current version.

As a guess, you’re trying to build AOSP master with this device repository, right?
https://android-git.linaro.org/device/linaro/dragonboard410c.git/log/?h=db410c

If you look in there, the most recent commit is from way back in APRIL, long before Android 11 was dropped in, so there’s no surprise that its not working for you – some changes will be needed.

Take a look at the most recent few commits I’ve added for my work on the db820c here; Commits · wip-automotive-11 · AOSP-Automotive / dragonboard · GitLab – maybe it will give you an idea what you need to do to get it working for 410c.

@doitright it is obvious that I have insufficient knowledge to move forward with this build of Android AOSP, which has Android 11 materials in it.

From what I’ve read, there was a version of Android AOSP which did have the DragonBoard 410c materials and was building correctly with a functioning Android image.

What was that Android version and how can I pull a copy of that source to do a build?

My impression is that would be Android 9. And it looks like Android 9 used Linux version 4.1 kernel.

What I think I will do is to do an rm on the Android_asop directory tree to remove the entire build materials and start over again with a functioning version of the Android AOSP source for the DragonBoard 410c.

I’m beginning to grasp some of the basics of obtaining the Android AOSP materials.

This article, Downloading the Source  |  Android Open Source Project , has the repo init command to get a particular build number. The list of Android builds is here, Codenames, Tags, and Build Numbers  |  Android Open Source Project , and combining the two documents I should use a repo init command as follows for Android 9 (Pie).

repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r61

After doing the repo init I next need to update the manifest in order to have the device specific materials needed for a build of Android 9 for the DragonBoard 410c. I picked this need up from step 4 of this tutorial from Sony which is for Sony devices and not the DragonBoard 410c however it seems logical the same step is needed. https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-android-p-9-0-0-2#tutorial-step-4

Once I have the repo initialized properly then I can use the other repo commands to pull the source, repo sync, and then do the build:

source build/envsetup.sh
lunch
make -j2

After the build is done, I can then do the flashing of my DragonBoard 410c.

The question seems to be what are the DragonBoard 410c specific materials or hardware specific software components needed to be added to Android AOSP for Android 9 Pie and where are those located?

Can you help me with that question? And let me know what I’ve gotten wrong in the above.

Master branch until the moment that 11 was merged.

Master branch is a moving target. You can’t just pull the source from a past moment in time unless you know the commit ID for every package (hundreds).