How to enable dbus-X11 in the yocto - yocto

I'm using poky and meta-openembedded(git://git.openembedded.org/meta-openembedded(branch: master)) in yocto
I want to build metacity and cyrus-sasl(2.1.26) for my SDK platform
I run the following command
I add BBCLASSEXTEND += " nativesdk" to metacity's bb
and run bitbake nativesdk-metacity
but I will get error message
ERROR: Nothing RPROVIDES 'nativesdk-dbus-x11' (but virtual:nativesdk:poky/meta/rec on or otherwise requires it)
ERROR: Nothing RPROVIDES 'nativesdk-dbus-x11' (but virtual:nativesdk:poky/meta/recipes-core/dbus/dbus-glib_0.110.bb RDEPENDS on or otherwise requires it) ERROR: Required build target 'nativesdk-metacity' has no buildable providers. Missing or unbuildable dependency chain was: ['nativesdk-metacity', 'nativesdk-libcanberra', 'nativesdk-pulseaudio', 'nativesdk-gconf', 'nativesdk-dbus-glib', 'nativesdk-dbus-x11']
ERROR: Nothing PROVIDES 'dbus-x11'. Close matches:
dbus RPROVIDES dbus-x11
I cannot find dbus-x11's bb in my all meta
and I cannot see dbus-x11 then run bitbake -s
How can I enable dbus-x11 ??
and...
I also add BBCLASSEXTEND += " nativesdk" to cyrus-sasl_2.1.26.bb
and bitbake nativesdk-cyrus-sasl
get error message
| x86_64-pokysdk-linux-gcc --sysroot=/poky/build-fw/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-cyrus-sasl/2.1.26-r0/recipe-sysroot -O2 -pipe -Wl,-O1 -o saslauthd mechanisms.o auth_dce.o auth_getpwent.o auth_krb5.o auth_krb4.o auth_pam.o auth_rimap.o auth_httpform.o auth_shadow.o auth_sia.o auth_sasldb.o lak.o auth_ldap.o cache.o cfile.o krbtf.o utils.o ipc_unix.o ipc_doors.o saslauthd-main.o md5.o -lresolv
| auth_getpwent.o: In function `auth_getpwent':
| auth_getpwent.c:(.text+0x42): undefined reference to `crypt'
| auth_shadow.o: In function `auth_shadow':
| auth_shadow.c:(.text+0x109): undefined reference to `crypt'
| collect2: error: ld returned 1 exit status
| Makefile:456: recipe for target 'saslauthd' failed
How can I add -lcrypt to cyrus-sasl_2.1.26.bb bb??
thanks a lot
John

Related

fatal error: json-c/json.h: No such file or directory

I bitbake my foo.bb
I don't know what to do to solve this problem, should I add something in RDEPENDS or DEPENDS?
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8
| gcc -std=c99 -g -D_XOPEN_SOURCE=600 -lndctl -ljson-c fis.c -o fis
| fis.c:24:10: fatal error: json-c/json.h: No such file or directory
| #include <json-c/json.h>
| ^~~~~~~~~~~~~~~
| compilation terminated.
Add these two lines to your bb file. Try to build foo
DEPENDS = "json-c"
TARGET_LDFLAGS = "-ljson-c"
<json-c/json.h> is provided by the recipe:
poky/meta/recipes-devtools/json-c
In order to make its output available to your recipe at compile time, you should specify it as compile-time dependency using DEPENDS.
foo.bb :
DEPENDS += "json-c"
For more info check here.

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"

How to use axi dma kernel module in custom application in petalinux?

I am trying to build the axidma-benchmark application with the Xilinx-axidma driver (Github repo) provided by bperez77.
I am using Petalinux 20.2 to build Linux for my custom project.
In the new version of the kernel, some functions are changed and I get some errors when running petalinux-build. I changed the driver files as mentioned here and build the kernel module successfully.
In the following, I create the custom application by running:
petalinux-create -t apps --name axidma-benchmark --enable
Then I copy the application files into the recipes-apps directory and append all C and header files to the SRC_URI List in the axidma-benchmark.bb as:
SRC_URI = "file://axidma-benchmark.c \
file://axidma_ioctl.h \
file://conversion.h \
file://libaxidma.h \
file://util.c \
file://util.h \
file://Makefile \
"
Then I add APP_OBJS += util.o to the Makefile and build the application by running:
petalinux-build -c axidma-benchmark
But I got these errors:
ERROR: axidma-benchmark-1.0-r0 do_compile: oe_runmake failed
ERROR: axidma-benchmark-1.0-r0 do_compile: Execution of '/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/temp/run.do_compile.21635' failed with exit code 1:
aarch64-xilinx-linux-gcc -march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot -o axidma-benchmark axidma-benchmark.o util.o -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: axidma-benchmark.o: in function main': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:491: undefined reference to axidma_init'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:499: undefined reference to axidma_malloc' /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:505: undefined reference to axidma_malloc'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:514: undefined reference to axidma_get_vdma_tx' /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:515: undefined reference to axidma_get_vdma_rx'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: axidma-benchmark.o: in function single_transfer_test': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:396: undefined reference to axidma_twoway_transfer'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: axidma-benchmark.o: in function main': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:558: undefined reference to axidma_free'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:560: undefined reference to axidma_free' /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:562: undefined reference to axidma_destroy'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:519: undefined reference to axidma_get_dma_tx' /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:520: undefined reference to axidma_get_dma_rx'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: axidma-benchmark.o: in function time_dma': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:426: undefined reference to axidma_twoway_transfer'
collect2: error: ld returned 1 exit status
make: *** [Makefile:12: axidma-benchmark] Error 1
WARNING: /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/temp/run.do_compile.21635:1 exit 1 from 'exit 1'
ERROR: Logfile of failure stored in: /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/temp/log.do_compile.21635
What is my mistake?
I have forgotten to add the libaxidma.c files into the file directory. By adding this file application was built successfully.
Update:
You can access the final version of my code via this link.
If you have any problems, please let me know.

didn't pass LDFLAGS? [ldflags]

I created a recipe, summary as follows:
do_install() {
install -d ${D}/GreenTea
cp ${S}/foo.sh ${D}/GreenTea
cp ${S}/foo.so ${D}/GreenTea
when bitbake this recipe, it shows: didn't pass LDFLAGS? [ldflags]
ERROR: greentea-1.0-r0 do_package_qa: QA Issue: No GNU_HASH in the ELF binary /home/tea/greentea4/build/tmp/work/corei7-64-poky-linux/greentea/1.0-r0/packages-split/greentea/GreenTea/foo.so, didn't pass LDFLAGS? [ldflags]
What can I do?
If you're compiling the source for yourself, you should not skip the LDFLAGS warning as mentioned by #jussi-kukkonen and you should add the following line in your Yocto recipe
TARGET_CC_ARCH += "${LDFLAGS}"
Ref: How to fix : ERROR: do_package_qa: QA Issue: No GNU_HASH in the elf binary
You can skip the warning:
INSANE_SKIP_${PN} += "ldflags"
This does not mean the library will actually work on target (the QA warnings are there for a reason) but it will allow packaging to continue.

mutt installaiton error on CentOS 6.7

I'm trying to install mutt on CentOS 6.7 and ./configure --prefix=$HOME/local runs fine but at make install step, I run into this error below that I don't know how to solve. I tried with mutt 1.6.1 and 1.6.0 and this same error came up so it's probably some system setting that wasn't correct. How could I fix it?
gcc -std=gnu99 -Wall -pedantic -Wno-long-long -g -O2 -o mutt addrbook.o alias.o attach.o base64.o browser.o buffy.o color.o crypt.o cryptglue.o commands.o complete.o compose.o copy.o curs_lib.o curs_main.o date.o edit.o enter.o flags.o init.o filter.o from.o getdomain.o group.o handler.o hash.o hdrline.o headers.o help.o hook.o keymap.o main.o mbox.o menu.o mh.o mx.o pager.o parse.o pattern.o postpone.o query.o recvattach.o recvcmd.o rfc822.o rfc1524.o rfc2047.o rfc2231.o rfc3676.o score.o send.o sendlib.o signal.o sort.o status.o system.o thread.o charset.o history.o lib.o muttlib.o editmsg.o mbyte.o mutt_idna.o url.o ascii.o crypt-mod.o safe_asprintf.o patchlist.o conststrings.o pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o smime.o crypt-mod-smime-classic.o resize.o -lncursesw -lidn
/opt/gnu/bin/ld: curs_lib.o: undefined reference to symbol 'wtimeout'
/lib64/libtinfo.so.5: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [mutt] Error 1
OK, I somehow fixed it.. not really understand why this fixed it.
After configure, in the Makefile, change the LDFLAGS = line to LDFLAGS = -lncurses -ltinfo, then make install and it solved the issue.
Credit to this post: http://www.pclinuxos.com/forum/index.php?topic=129566.0, Tara-Rain-9.5ß's answer