0

bperez77が提供する Xilinx-axidma ドライバー(Github リポジトリ)を使用して axidma-benchmark アプリケーションをビルドしようとしています。

Petalinux 20.2 を使用してカスタム プロジェクト用の Linux をビルドしています。カーネルの新しいバージョンでは、一部の機能が変更され、実行時にいくつかのエラーが発生しますpetalinux-buildここで説明したようにドライバー ファイルを変更し、カーネル モジュールを正常にビルドしました。

以下では、次のコマンドを実行してカスタム アプリケーションを作成します。

petalinux-create -t apps --name axidma-benchmark --enable 

次に、アプリケーション ファイルをレシピ アプリ ディレクトリにコピーし、すべての 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,--as-必要 -fstack-protector-strong -Wl,-z,relro,-z,現在 /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 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: axidma_malloc への未定義の参照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 ' /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 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: 関数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: 関数内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: axidma_destroy への未定義の参照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 ' /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 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: 関数time_dma': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:426: undefined reference to 内 axidma_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 'exit 1' エラー: 失敗のログファイルは次の場所に保存されています: /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64- xilinx-linux/axidma-benchmark/1.0-r0/temp/log.do_compile.21635

私の間違いは何ですか?

4

1 に答える 1

0

libaxidma.cファイルをファイル ディレクトリに追加するのを忘れていました。このファイルを追加することで、アプリケーションは正常にビルドされました。

更新:このリンクから私のコードの最終バージョンにアクセスできます。ご不明な点がございましたら、お気軽にお問い合わせください。

于 2021-02-11T06:48:49.187 に答える