09-29-2019 04:59 PM
Hi,
I used a petalinux to build a custom design from zcu102 bsp (zcu102-dpu-trd-2019-1-190809.zip). I want to use xilinx_ai_sdk for my program. But when I run the program, it shows open(/dev/dpcma) failed. I'm wondering how to solve this problem.
10-02-2019 09:56 PM
Is this not helpful?
You can try install the dpcma.ko manually on your target side.
10-09-2019 01:39 PM
I got the following error when try to insert dpcma.ko
root@zcu102-dpu-trd-2019:~# insmod dpcma.ko
insmod: can't insert 'dpcma.ko': invalid module format
My concern is the kernel image on board is 4.19.0+ while the dpcma.ko provided is in 4.19.
10-10-2019 01:11 AM
I was able to execute the insmod command successfully.
------
root@ultra96:/media/card/xilinx_ai_sdk/samples/classification# lsmod
Tainted: G
dpcma 16384 0 - Live 0xffffff8000d49000 (O)
dpu 45056 0 - Live 0xffffff8000d38000 (O)
mali 303104 0 - Live 0xffffff8000cd8000 (O)
uio_pdrv_genirq 16384 0 - Live 0xffffff8000cb0000
root@ultra96:/media/card/xilinx_ai_sdk/samples/classification# uname -r
4.19.0-xilinx-v2019.1
------
I built a image with kernel 4.19.0 which is created by petalinux 2019.1 default.
Are you not using the default kernel? or Are you changing the kernel version with recipes-kernel?
10-10-2019 01:40 PM
Hi,
I am using petalinux 2019.1 as well, while my linux kernel is 4.19.0+ shown as follows:
root@zcu102-dpu-trd-2019:/lib/modules/4.19.0-xilinx-v2019.1/extra# uname -sr
Linux 4.19.0+
I didn't modify my recipe-kernel while my .bbapend file shows
"LINUX_VERSION_EXTENSION = "+"
SRC_URI += "file://user_2019-10-09-16-32-00.cfg"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
"
How can I compile my petalinux kernel with 4.19.0
10-10-2019 02:18 PM
An update: I modified to .bbapend file so that my LINUX_KERNEL_EXTENSION=-xilinx-v2019,1. However, it gives me a different error when I insmod dpcma.ko
[ 158.013586] dpcma: Unknown symbol kmem_cache_alloc_trace (err -2)
[ 158.019695] dpcma: Unknown symbol _mcount (err -2)
insmod: can't insert 'dpcma.ko': unknown symbol in module, or unknown parameter
10-11-2019 01:20 AM
You try to enable kernel traces function.
In Petalinux2019.1
petalinux-config -c kernel
Kernel hacking -> Tracers
-> Kernel Function Tracer
-> Kernel Function Graph Tracer
-> Scheduling Latency Tracer
I think your insmod error will be disappeared.
However , I can't execute AI SDK example..
F1011 07:55:57.536851 2618 buffer_object_fd.cpp:97] Check failed: fd > 0 (-1 vs. 0) , open(/dev/dpcma) failed.
*** Check failure stack trace: ***
Aborted
It would be difficult for me if there is no original build environment.
10-12-2019 02:52 AM
Hi all,
Please contact your local FAE. And ask them Xilinx AI BSP for ZCU102/ZCU104/Ultra96 board images with DNNDK v3.1.
Regards,
Long.
10-14-2019 02:12 AM - edited 10-14-2019 02:13 AM
A correct approach is to compile the source code of dpcma with the correct petalinux release.
1) download the source file and the readme file from this post
2) create a BSP - you might for example follow PG388, starting from page 51:
% cd $TRD_HOME/apu/dpu_petalinux_bsp
% petalinux-create -t project -s xilinx-dpu-trd-zcu102-v2019.1.bsp
% cd zcu102-dpu-trd-2019-1
% petalinux-config ––get-hw-description=$TRD_HOME/pl/pre-built --silentconfig
3) Unzip the dpcma.tar.gz to the “recipes-xxx” directory, such as
% cp dpcma.tar.gz <BSP_Path>/project-spec/meta-user/recipes-apps
% tar xzvf dpcma.tar.gz
4) update the devicetree:
add the following information to the device-tree in $TRD_HOME/apu/dpu_petalinux_bsp/zcu102-dpu-trd-2019-1/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
/ {
dpcma {
compatible = "deephi,cma";
};
};
5) run a new petalinux-build
10-14-2019 06:18 PM
By using dpcma.tar.gz , I have been able to execute AI SDK model . (test_jpeg_classification_resnet_18)
>>% cp dpcma.tar.gz <BSP_Path>/project-spec/meta-user/recipes-apps
By the way, I copied dpcma recipes to recipes-module folder instead of recipes-apps folder.
10-29-2019 02:18 AM
Hi,
I copied dpcma folder to recipes-module folder,executive command:
petalinux-build -c dpcma
[INFO] building dpcma
[INFO] sourcing bitbake
[INFO] generating user layers
INFO: bitbake dpcma
Loading cache: 100% |################################################################################| Time: 0:00:00
Loaded 3816 entries from dependency cache.
Parsing recipes: 100% |##############################################################################| Time: 0:00:02
Parsing of 2781 .bb files complete (2779 cached, 2 parsed). 3816 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###########################################################################| Time: 0:00:04
Checking sstate mirror object availability: 100% |###################################################| Time: 0:00:14
Sstate summary: Wanted 329 Found 102 Missed 454 Current 1794 (31% match, 89% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: dpcma-1.0-r0 do_compile: oe_runmake failed
ERROR: dpcma-1.0-r0 do_compile: Function failed: do_compile (log file is located at /home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work/zcu104_zynqmp-xilinx-linux/dpcma/1.0-r0/temp/log.do_compile.24729)
ERROR: Logfile of failure stored in: /home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work/zcu104_zynqmp-xilinx-linux/dpcma/1.0-r0/temp/log.do_compile.24729
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8 KERNEL_src=/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-source KERNEL_PATH=/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-source KERNEL_VERSION=4.19.0+ CC=aarch64-xilinx-linux-gcc -fuse-ld=bfd -fdebug-prefix-map=/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work/zcu104_zynqmp-xilinx-linux/dpcma/1.0-r0=/usr/src/debug/dpcma/1.0-r0 -fdebug-prefix-map=/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work/zcu104_zynqmp-xilinx-linux/dpcma/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work/zcu104_zynqmp-xilinx-linux/dpcma/1.0-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-source=/usr/src/kernel LD=aarch64-xilinx-linux-ld.bfd AR=aarch64-xilinx-linux-ar O=/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-build-artifacts KBUILD_EXTRA_SYMBOLS=
| make -C /home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-source M=/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work/zcu104_zynqmp-xilinx-linux/dpcma/1.0-r0
| make[1]: Entering directory '/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-source'
| make[2]: Entering directory '/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-build-artifacts'
|
| ERROR: Kernel configuration is invalid.
| include/generated/autoconf.h or include/config/auto.conf are missing.
| Run 'make oldconfig && make prepare' on kernel src to fix it.
|
| make[2]: *** [/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-source/Makefile:643: include/config/auto.conf] Error 1
| make[2]: Leaving directory '/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-build-artifacts'
| make[1]: *** [Makefile:146: sub-make] Error 2
| make[1]: Leaving directory '/home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work-shared/zcu104-zynqmp/kernel-source'
| make: *** [Makefile:6: all] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work/zcu104_zynqmp-xilinx-linux/dpcma/1.0-r0/temp/run.do_compile.24729:1 exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at /home/yangar/work/petalinux/zcu104_102trdbsp/build/tmp/work/zcu104_zynqmp-xilinx-linux/dpcma/1.0-r0/temp/log.do_compile.24729)
ERROR: Task (/home/yangar/work/petalinux/zcu104_102trdbsp/project-spec/meta-user/recipes-modules/dpcma/dpcma.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5570 tasks of which 5569 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/yangar/work/petalinux/zcu104_102trdbsp/project-spec/meta-user/recipes-modules/dpcma/dpcma.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build dpcma
Have you ever seen this mistake before?can you tell me why? thanks!
10-29-2019 04:05 AM
>>include/generated/autoconf.h or include/config/auto.conf are missing.
The file seems to be missing from the message.
If you clean the environment, it may succeed, so can you try it once?
https://forums.xilinx.com/t5/Embedded-Linux/petalinux2019-1-Kernel-configuration-is-invalid/td-p/1029931
11-03-2019 05:58 PM