Error on building Openembedded for Intel Quark - yocto

Trying to build Linux for Advantech UBC-221 that has Intel Quark processor.
The system is Debian 9, running on VMware. Was able to build poky succefully before.
Let me summarize what I was doing:
mkdir quark
cd quark
git clone git://git.yoctoproject.org/meta-intel-quark
git clone git://git.openembedded.org/openembedded-core
git clone git://git.yoctoproject.org/poky
cp -r poky/bitbake .
cd openembedded-core
source oe-init-build-env
bitbake-layers add-layer ~/quark/meta-intel-quark/
bitbake core-image-base
Error code I get:
WARNING: Layer quark-bsp should set LAYERSERIES_COMPAT_quark-bsp in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer quark-bsp should set LAYERSERIES_COMPAT_quark-bsp in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-kernel/linux/linux-yocto-quark_3.8.bb: Variable key RDEPENDS_${KERNEL_PACKAGE_NAME}-base (${KERNEL_PACKAGE_NAME}-image) replaces original key RDEPENDS_kernel-base ().
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb: Exception during build_dependencies for CFLAGS
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb: Error during finalise of /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb
ERROR: ExpansionError during parsing /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable CFLAGS, expression was -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0=/usr/src/debug/grub/0.97+gitAUTOINC+5775f32a62-r0 -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0/recipe-sysroot= -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0/recipe-sysroot-native= -Os -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused -Wno-pointer-sign -DINTEL_QUARK_TEST=${#base_contains('PACKAGECONFIG', 'grub_test', '1', '0', d)} which triggered exception NameError: name 'base_contains' is not defined
Summary: There were 5 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
I'm pretty much stuck here. Some help would be greatly appreciated!
Edit:
Tried to build on Debian 7.11 32 bit system. It went better however another error came:
bgabor#debian:~/quark/dizzy/build$ bitbake core-image-base
WARNING: Host distribution "Debian-7.11" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |####################################################################################################################################################| ETA: 00:00:00
Loaded 1292 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.24.0"
BUILD_SYS = "i686-linux"
NATIVELSBSTRING = "Debian-7.11"
TARGET_SYS = "i586-poky-linux"
MACHINE = "quark"
DISTRO = "poky"
DISTRO_VERSION = "1.7.3"
TUNE_FEATURES = "m32 i586"
TARGET_FPU = ""
meta
meta-yocto
meta-yocto-bsp = "dizzy:58863ad092c9a279e305c841dbb4353de2ecfae8"
meta-intel-quark = "master:a314f0ceea986fde42d5d9b0ea449f7a563e9351"
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Unable to install packages. Command '/home/bgabor/quark/dizzy/build/tmp/sysroots/i686-linux/usr/bin/smart --quiet --data-dir=/home/bgabor/quark/dizzy/build/tmp/work/quark-poky-linux/core-image-minimal-initramfs/1.0-r0/rootfs/var/lib/smart install -y busybox#i586 initramfs-live-install-efi#i586 run-postinsts#all initramfs-live-install#i586 udev#i586 initramfs-live-boot#quark base-passwd#i586' returned 1:
error: Can't install initramfs-live-install-1.0-r9#i586: no package provides grub
ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/bgabor/quark/dizzy/build/tmp/work/quark-poky-linux/core-image-minimal-initramfs/1.0-r0/temp/log.do_rootfs.29435
ERROR: Task 240 (/home/bgabor/quark/dizzy/meta/recipes-core/images/core-image-minimal-initramfs.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2529 tasks of which 2527 didn't need to be rerun and 1 failed.
No currently running tasks (2435 of 2531)
Summary: 1 task failed:
/home/bgabor/quark/dizzy/meta/recipes-core/images/core-image-minimal-initramfs.bb, do_rootfs
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
It does not find grub package, however I can see there are two in the recipes:
bgabor#debian:~/quark/dizzy/build$ bitbake-layers show-recipes | grep "grub" -A 3
Parsing recipes..done.
grub:
meta-intel-quark 0.97+gitAUTOINC+5775f32a62
meta 0.97
meta 2.00
--
grub-conf:
meta-intel-quark 1.0
grub-efi:
meta 2.00
gsettings-desktop-schemas:
meta 3.10.1
Tried to clean and then bitbake again but no result.
What might be the problem here?

First, Poky includes OpenEmbedded Core so you don't need to clone both, just clone Poky.
Second, the meta-intel-iot layer is pretty dead and only formally supports the Daisy release of Poky (see the README). You may have luck using newer releases, but obviously not git master (aka Thud).
https://wiki.yoctoproject.org/wiki/Releases lists the releases. Instead of checking out master of Poky, check out the relevant release branch. I suggest starting with daisy but trying something a little newer such as jethro would be a good idea.

Related

Update custom device tree on yocto

I am using the sama5d27-wlsom1-ek board for my demo and I am trying to make changes to the device tree.
So far I have compiled core-image-minimal and find my dtb files are generated in
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/build/arch/arm/boot/dts
folder.
Also I find many different dts files in
build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/arch/arm/boot/dts
But where does my machine get device tree files if they are generated inside the build folder and if I use my custom dts file how do I update them?
I want to build the image using my custom.dts file where I enable certain peripherals and disable the ones not required. (A test to customize dtb's in future).
I tried different methods found here
How to use an own device tree and modified kernel config in Yocto?
as well as
Quick rebuild of device tree only with Yocto/bitbake?
I created a new meta-local layer and added it to bblayer
followed by recipetool command to add my dts file to the new layer. Added KERNEL_DEVICETREE += "custom.dtb" to the .bbappend file generated inside meta-local and then run bitbake build image command so far
But, I seem to run into the following errors when I try to build the image.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3474 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:00
Parsing of 2309 .bb files complete (2307 cached, 2 parsed). 3476 targets, 358 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "sama5d27-wlsom1-ek-sd"
DISTRO = "poky-atmel"
DISTRO_VERSION = "3.1.7"
TUNE_FEATURES = "arm vfp cortexa5 neon vfpv4 thumb callconvention-hard"
TARGET_FPU = "hard"
meta
meta-poky
meta-yocto-bsp = "dunfell:97a9f30f1c457c55bf0c791d0466ff8620110a49"
meta-oe
meta-networking
meta-webserver
meta-python
meta-initramfs = "dunfell:2915810edbb6599051e30efb3b7f805665ddcc23"
meta-atmel = "dunfell:d6e30f2c0e3592ed11f3a4c8380a14d0a9066ba6"
meta-multimedia = "dunfell:2915810edbb6599051e30efb3b7f805665ddcc23"
meta-aws = "dunfell:2e2a1c65603dc5d11349e25dc9470a65cbeb8e65"
meta-freshair
meta-local
workspace = "dunfell:97a9f30f1c457c55bf0c791d0466ff8620110a49"
Initialising tasks: 100% |#######################################| Time: 0:00:04
Sstate summary: Wanted 294 Found 262 Missed 32 Current 2095 (89% match, 98% complete)
NOTE: Executing Tasks
ERROR: linux-at91-5.4+gitAUTOINC+3dba8c9991-r0 do_compile: oe_runmake failed
ERROR: linux-at91-5.4+gitAUTOINC+3dba8c9991-r0 do_compile: Execution of '/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/temp/run.do_compile.57871' failed with exit code 1:
GEN Makefile
CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/atomic/check-atomics.sh
CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/checksyscalls.sh
CHK include/generated/compile.h
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
make[2]: *** No rule to make target 'arch/arm/boot/dts/new_name.dtb'. Stop.
make[1]: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:1265: new_name.dtb] Error 2
make: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:179: sub-make] Error 2
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/temp/log.do_compile.57871
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: KBUILD_BUILD_TIMESTAMP: Thu Jan 14 12:54:56 UTC 2021
| NOTE: make -j 12 HOSTCC=gcc -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E HOSTCXX=g++ -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 zImage CC=arm-poky-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source=/usr/src/kernel LD=arm-poky-linux-gnueabi-ld.bfd
| GEN Makefile
| CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/atomic/check-atomics.sh
| CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/checksyscalls.sh
| CHK include/generated/compile.h
| Kernel: arch/arm/boot/Image is ready
| Kernel: arch/arm/boot/zImage is ready
| NOTE: make -j 12 HOSTCC=gcc -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E HOSTCXX=g++ -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 at91-sama5d27_wlsom1_ek.dtb CC=arm-poky-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source=/usr/src/kernel LD=arm-poky-linux-gnueabi-ld.bfd
| NOTE: make -j 12 HOSTCC=gcc -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E HOSTCXX=g++ -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 new_name.dtb CC=arm-poky-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source=/usr/src/kernel LD=arm-poky-linux-gnueabi-ld.bfd
| make[2]: *** No rule to make target 'arch/arm/boot/dts/new_name.dtb'. Stop.
| make[1]: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:1265: new_name.dtb] Error 2
| make: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:179: sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/temp/run.do_compile.57871' failed with exit code 1:
| GEN Makefile
| CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/atomic/check-atomics.sh
| CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/checksyscalls.sh
| CHK include/generated/compile.h
| Kernel: arch/arm/boot/Image is ready
| Kernel: arch/arm/boot/zImage is ready
| make[2]: *** No rule to make target 'arch/arm/boot/dts/new_name.dtb'. Stop.
| make[1]: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:1265: new_name.dtb] Error 2
| make: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:179: sub-make] Error 2
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/fakhruddin/workspace/Freshair/my_dir/poky/../meta-atmel/recipes-kernel/linux/linux-at91_5.4.81.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6463 tasks of which 6457 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/fakhruddin/workspace/Freshair/my_dir/poky/../meta-atmel/recipes-kernel/linux/linux-at91_5.4.81.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Please help and let me know if I missed any required information from my side.
Thank you and Regards,
Sohil
Linux kernel devices trees are located in :
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/git/arch/arm/boot/dts
Note that sources are in git and final build is in build.
You have to make sure that new_name.dtb present in the main Makefile:
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/git/arch/arm/boot/dts/Makfile
+dtb-$(CONFIG_SOC_AT91SAM9) += new_name.dtb
Now the new device tree must be added to the KERNEL_DEVICETREE variable and that tells Yocto what Kernel device trees to build and ship into the boot partition so that u-boot load one of them into RAM while booting the board:
KERNEL_DEVICETREE += "new_name.dtb"
Now, after you understand how device tree are placed in the kernel, you can make this automatic, you create a bbappend recipe to your linux-at91 kernel main recipe and add your custom device tree there.
meta-local/
recipes-kernel/
linux/
files/
new_custom.dts
linux-at91_%.bbappend
Now, you need to copy your new dts file before compiling the kernel (do_compile) , the best moment is after do_configure:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = " file://new_custom.dts"
do_configure_append(){
cp ${WORKDIR}/new_custom.dts ${S}/arch/arm/boot/dts
echo "dtb-$(CONFIG_SOC_AT91SAM9) += new_dts.dtb" >> ${S}/arch/arm/boot/dts/Makefile
}
Now, your new device tree will be compiled, and any compilation errors may be due to syntax error.
After knowing that the device tree is compiled and added to KERNEL_DEVICETREE, this means that it is present in the boot partition along side with all other device trees also in KERNEL_DEVICETREE variable, but u-boot loads only one of them in the RAM before loading the Linux kernel, and that device tree is set in your u-boot target defconfig file present in:
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/u-boot-.../<version>/git/configs/your_machine_defconfig
you can find your_machine_defconfig in UBOOT_CONFIG variable in your machine configuration file which is located in your board's BSP layer:
meta-<board>/conf/machine/<board>.conf
After locating the defconfig you can find a variable DEFAULT_FDT_FILE.
At first, do not change it, just build your image, and pause at uboot stage and printenv to see the fdt_file variable and set it to your new_name.dtb file and saveenv to save it for every boot.
If that is okay, you can now patch your uboot defconfig file to set the new device tree file.
Yocto tip:
${WORKDIR} in the Kernel recipe points to:
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/
${S} point to the git directory under ${WORKDIR}
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/git
that's why I copied the new device tree from ${WORKDIR}
I'd suggest using devtool modify linux-at91 to modify the linux kernel source-tree. This will create a linux-at91 folder in your ${TOPDIR}/workspace/sources/linux-at91. If you don't know your ${TOPDIR}, try to use bitbake -e <recipe-name> | grep "TOPDIR". bitbake -e will print your entire metadata for that recipe, here you can use grep to find the assignments of different variables. (like your KERNEL_DEVICETREE)
${TOPDIR}/workspace/sources/linux-at91
This will be the source tree for your linux-at91 recipe.
Copy your dts files into ${TOPDIR}/workspace/sources/linux-at91/arch/arm/boot/dts.
Modify the Makefile to include your dts, as pointed out by #BelHadjSalem TALEL (Thanks!).
Commit these changes and generate a patch.
In your own layer, under recipes-kernel/linux-at91/linux-at91 place this patch file. Add recipes-kernel/linux-at91/linux-at91.bbappend to include this patch as below:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-add-dts-file.patch"
Now to build your custom-machine, add conf/machine/custom-machine.conf and add an entry for your custom KERNEL_DEVICETREE like shown here
# This will inherit your base machine
require conf/machine/sama5d27-wlsom1-ek-sd.conf
KERNEL_DEVICETREE = "your-dts-file.dtb"
Overall, your layer will have following files:
- conf/layer.conf
- conf/machine/custom-machine.conf (Contains the above settings)
- recipes-kernel/linux-at91/linux-at91/0001-add-dts-file.patch
- recipes-kernel/linux-at91/linux-at91/linux-at91.bbappend
Just for information on great response by #BelHadjSalem: instead of manually copying dts file by 'do_configure_append', we can use subdir too.
so instead of
do_configure_append() {
cp ${WORKDIR}/new_custom.dts ${S}/arch/arm/boot/dts
}
just we need:
SRC_URI_append = " file://new_custom.dts;subdir=git/arch/arm/boot/dts"

AOSP Android 12 Beta version build fails

I've tried to compile AOSP android 12 beta branches with no success.
I cloned the repo using:
repo init -u https://android.googlesource.com/platform/manifest -b refs/tags/android-s-beta-3
repo sync
and then used:
source build/envsetup.sh
lunch aosp_blueline-userdebug
m
now when it starts to run, after a while, it fails because there's duplication at the stub libraries:
[ 95% 86/90] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
error: build/soong/java/core-libraries/Android.bp:130:1: module "legacy.core.platform.api.stubs" already defined
libcore/mmodules/core_platform_api/Android.bp:182:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:146:1: module "stable.core.platform.api.stubs" already defined
libcore/mmodules/core_platform_api/Android.bp:198:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:164:1: module "legacy-core-platform-api-stubs-system-modules" already defined
libcore/mmodules/core_platform_api/Android.bp:216:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:180:1: module "stable-core-platform-api-stubs-system-modules" already defined
libcore/mmodules/core_platform_api/Android.bp:232:1 <-- previous definition here
error: libcore/JavaLibrary.bp:994:1: module "core.current.stubs" already defined
build/soong/java/core-libraries/Android.bp:27:1 <-- previous definition here
error: libcore/JavaLibrary.bp:1015:1: module "core-current-stubs-for-system-modules" already defined
build/soong/java/core-libraries/Android.bp:48:1 <-- previous definition here
error: libcore/JavaLibrary.bp:1041:1: module "core-current-stubs-system-modules" already defined
build/soong/java/core-libraries/Android.bp:74:1 <-- previous definition here
I've also tried to change the build/soong branch to master and I've got another build faliure.
How do I compile those beta versions? what am I missing??
Moreover, all the Android 12 betas I've tried are broken. For example, another beta 1 question
Thanks!
Ok so finally I've got this beta version compiled.
The thing I've found is that beta branch/ tag is not necessarily compiling.
So what I did is looking at:
https://android.googlesource.com/platform/
and when I ran into errors I've tried to checkout a later commit for this problematic sub-module that fixes this compilation.
Doing this until finding a combination of commits that compiled together did the magic.
If someone would like to know which specific commit I've checkout in order to get Android 12 beta 2 compiled just tell me
Actual problem is that this AOSP 12 Beta 3 is not fully synced and few of the modules were mentioned on different-2 files due to that you are getting these errors. I was also getting the same errors.
To get rid of these errors by commenting these modules in these files.
error: build/soong/java/core-libraries/Android.bp:130:1: module "legacy.core.platform.api.stubs" already defined
libcore/mmodules/core_platform_api/Android.bp:182:1 <-- previous definition here
build/soong/java/core-libraries/Android.bp line 130 you can comment this module.
/*java_library {
name: "legacy.core.platform.api.stubs",
visibility: core_platform_visibility,
hostdex: true,
compile_dex: true,
sdk_version: "none",
system_modules: "none",
static_libs: [
"art.module.public.api.stubs.module_lib",
"conscrypt.module.platform.api.stubs",
"legacy.i18n.module.platform.api.stubs",
],
patch_module: "java.base",
}*/
Same you have to do with other modules too.
https://stackoverflow.com/users/4618429/omribager Have you build AOSP 12 Beta 3 successfully if yes, please mention the process because after these fixes also I am getting other modules issue.
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
error: external/rust/crates/zip/Android.bp:21:1: "libzip" depends on undefined module "libflate2"
01:00:29 soong bootstrap failed with: exit status 1
failed to build some targets (01:08 (mm:ss))

Failed do_rootfs for agl-demo-platform

I am building Yocto for AGL image (for more details: automotivelinux.org).
The below error occurred during the build progress (do_rootfs).
In packagegroup-agl-demo-platform.bb, declared packagegroup-agl-image-ivi as a runtime dependent package.
RDEPENDS_${PN} += "\
packagegroup-agl-image-ivi \
"
I can build successfully the packagegroup-agl-image-ivi separately. But when building the whole agl-demo-platform image, happened as follows:
ERROR: agl-demo-platform-1.0-r0 do_rootfs: Unable to install packages. Command '/LTSI4.9/LTSI4.4/build/tmp/work/m3ulcb-agl-linux/agl-demo-platform/1.0-r0/opkg.conf -t /LTSI4.9/build/tmp/work/m3ulcb-agl-linux/agl-demo-platform/1.0-r0/temp/ipktemp/ -o /LTSI4.9/build/tmp/work/m3ulcb-agl-linux/agl-demo-platform/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version install
run-postinsts
screen
kernel-modules
packagegroup-agl-devel
packagegroup-core-eclipse-debug
mc packagegroup-core-tools-profile
kernel-module-vsp2 kernel-module-pvrsrvkm
kernel-module-vspm-if
opkg packagegroup-core-tools-debug
psplash kernel-module-vspm
packagegroup-core-ssh-openssh
packagegroup-agl-demo-platform
omx-user-module kernel-devicetree'
returned 1:
Solver encountered 1 problem(s):
Problem 1/1:
- package packagegroup-agl-demo-platform-1.0-r0.all requires packagegroup-agl-image-ivi, but none of the providers can be installed
Solution 1:
- do not ask to install a package providing packagegroup-agl-demo-platform
ERROR: agl-demo-platform-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /LTSI4.9/build/tmp/work/m3ulcb-agl-linux/agl-demo-platform/1.0-r0/temp/log.do_rootfs.14498
ERROR: Task (/LTSI4.9/meta-agl-demo/recipes-platform/images/agl-demo-platform.bb:do_rootfs) failed with exit code '1'
Can anyone help me out in this case ?
I tried 02 ways as follows. They did work.
First method, I cleaned all relative packages and rebuild the whole image.
$ bitbake -c cleanall -c cleansstate <recipes>
recipes consisted of all dependent & runtime dependent packages. But it was a little bit confused to inexperienced users to determine which ones.
Second method, I wiped out the build/tmp/, cache/, sstate-cache/ folders, and re-build all Yocto packages.
There were nothing happening any more. It was really a bad idea if be in critical period of time, but if have free time, be helpful.

Trying to create sample linux mage with yocto prject but cause building error

I tried to create a Linux image based on "yocto project mega Manuel".But I got an error in building image step.
I followed the mega Manuel.
I'm using Ubuntu 18.04.1 LTS.
Error:
aju#aju-HP-15-Notebook-PC:~/poky/build$ bitbake core-image-sato
WARNING: Host distribution "Ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience
unexpected failures. It is recommended that you use a tested
distribution.
Parsing recipes: 100% |#########################################| Time: 00:00:49
Parsing of 899 .bb files complete (0 cached, 899 parsed). 1330 targets, 38 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration: BB_VERSION = "1.28.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-18.04" TARGET_SYS = "i586-poky-linux" MACHINE = "qemux86" DISTRO = "poky" DISTRO_VERSION = "2.0.3" TUNE_FEATURES = "m32 i586"
TARGET_FPU = "" meta meta-yocto
meta-yocto-bsp = "jethro:331275422b2c3f326f605c23ae89eedb4e222eb5"
NOTE: Preparing RunQueue NOTE: Executing SetScene Tasks NOTE:
Executing RunQueue Tasks ERROR: oe_runmake failed ERROR: Function
failed: do_compile (log file is located at
/home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/temp/log.do_compile.301)
ERROR: Logfile of failure stored in:
/home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/temp/log.do_compile.301
Log data follows: | DEBUG: Executing shell function do_compile | NOTE:
make -j 4 | : && /bin/mkdir -p doc && {
PATH='/home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/build/t/wrap:'$PATH
&& export PATH; } && /usr/bin/perl
/home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/automake-1.15/doc/help2man
--output=doc/automake-1.15.1 automake-1.15
| help2man: can't get --help' info from automake-1.15
| Try--no-discard-stderr' if option outputs to stderr
| Makefile:3687: recipe for target 'doc/automake-1.15.1' failed
| make: *** [doc/automake-1.15.1] Error 255
| WARNING: exit code 1 from a shell command.
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/temp/log.do_compile.301)
ERROR: Task 403 (virtual:native:/home/aju/poky/meta/recipes-devtools/automake/automake_1.15.bb,
do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 73 tasks of which 53 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:
Summary: 1 task failed: virtual:native:/home/aju/poky/meta/recipes-devtools/automake/automake_1.15.bb,
do_compile Summary: There was 1 WARNING message shown. Summary: There
were 2 ERROR messages shown, returning a non-zero exit code.
Is it the problem with this latest version or is it something else?
Why are you using such an old release of Yocto? 2.0.x was first released in 2015 and isn't supported on modern distributions. If you need to use 2.0.x then you can pick a patch from a recent release to fix autoconf, but I really do recommend using 2.5 (or 2.6, due to release any day now) instead.

AOSP error - FAILED: /bin/bash -c "prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++

[ 2% 247/11700] target SharedLib: lib...libart_intermediates/LINKED/libart.so)
FAILED: /bin/bash -c "prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -nostdlib -Wl,-soname,libart.so -Wl,--gc-sections -shared -Lout/target/product/generic/obj/lib out/target/product/generic/obj/lib/crtbegin_so.o out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/interpreter/mterp/out/mterp_arm.o
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin/ld: error: out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/type_lookup_table.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin/ld: error: out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates/verifier/instruction_flags.o: file is empty
art/runtime/base/scoped_flock.cc:37: error: undefined reference to 'art::OS::OpenFileWithFlags(char const*, int)'
art/runtime/check_jni.cc:3240: error: undefined reference to 'art::operator<<(std::__1::basic_ostream >&, art::Primitive::Type const&)'
art/runtime/check_jni.cc:3056: error: undefined reference to 'art::operator<<(std::__1::basic_ostream >&,
art/runtime/class_linker.cc:2166: error: undefined reference to 'art::ObjectLock::ObjectLock(art::Thread*, art::Handle)'
art/runtime/class_linker.cc:2169: error: undefined reference to 'art::ObjectLock::WaitIgnoringInterrupts()'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[ 2% 247/11700] Building with Jack: o...t_intermediates/with-local/classes.dex
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make failed to build some targets (06:55 (mm:ss))
Getting this error when i run make -j16
Help me what to do !
Seems like some of your object files have been corrupted. I suggest you either clean the dir out/target/product/generic/obj/SHARED_LIBRARIES/libart_intermediates or/and clean ccache ccache -C
First advice is not to build with make -j16 as it takes too much ram.
For example compiling on 8 cores needs 64 GB of ram (tested on my server)
Try just compiling on a single core or at most on two. Another solution would be to call the command m instead of make to let it automatically find optimal settings on your hardware.
Another thing could be that you are missing some packages. Are you sure these packages are installed?
git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig
They could have different names for your distro (for example if you use Arch).
Also to note:
Compiling should take between 2.5 to 4 hours depending on your cpu performance. - It needs 100GB for downloading the android sources and 100-150GB for compilation.
You also need at least 12 GB or more to compile on a single core.
There is some method to compile it on 8GB of RAM by using swap space but this is extremely slow so not recommended.
My personal hardware and times:
Intel xeon e5-2680v3 8 core cpu
40 GB ram
Compile time on make -j1: 2 hours