【发布时间】:2021-05-07 08:54:24
【问题描述】:
我正在尝试使用 bperez77 提供的 Xilinx-axidma 驱动程序 (Github repo) 构建 axidma-benchmark 应用程序。
我正在使用 Petalinux 20.2 为我的自定义项目构建 Linux。
在新版本的内核中,一些功能发生了变化,运行petalinux-build时出现一些错误。我修改了here提到的驱动文件,并成功构建了内核模块。
在下面,我通过运行来创建自定义应用程序:
petalinux-create -t apps --name axidma-benchmark --enable
然后我将应用程序文件复制到 recipes-apps 目录,并将所有 C 和头文件附加到 axidma-benchmark.bb 中的 SRC_URI 列表中:
SRC_URI = "file://axidma-benchmark.c \
file://axidma_ioctl.h \
file://conversion.h \
file://libaxidma.h \
file://util.c \
file://util.h \
file://Makefile \
"
然后我将 APP_OBJS += util.o 添加到 Makefile 并通过运行构建应用程序:
petalinux-build -c axidma-benchmark
但我收到了这些错误:
错误:axidma-benchmark-1.0-r0 do_compile:oe_runmake 失败 错误:axidma-benchmark-1.0-r0 do_compile:执行'/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/temp /run.do_compile.21635' 失败,退出代码为 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,--按需 -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:在函数
main': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:491: undefined reference toaxidma_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: 未定义对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 toaxidma_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: 未定义对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 toaxidma_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:在函数single_transfer_test': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:396: undefined reference toaxidma_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:在函数main': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:558: undefined reference toaxidma_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: 未定义对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 toaxidma_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: 未定义对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 toaxidma_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:在函数time_dma': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:426: undefined reference toaxidma_twoway_transfer' collect2:错误:ld 返回 1 个退出状态 make: *** [Makefile:12: axidma-benchmark] 错误 1 警告:/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 '出口 1' 错误:故障日志文件存储在:/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/temp/log.do_compile.21635
我的错误是什么?
【问题讨论】:
标签: yocto xilinx vivado zynq petalinux