このセクションでは、FPGA マネージャーが有効のときに、XSA を利用して dtsi ファイルを生成するのではなく、すぐに使用可能な (手動で作成した) カスタム IP の dtsi ファイルで作業するのに必要なメカニズムおよびインフラストラクチャについて説明します。この手順では、dtbo および bin ファイルを生成し、rootfs /lib/firmware/xilinx ディレクトリにコピーします。
- FPGA マネージャーのテンプレートを作成します。
petalinux-create -t apps --template fpgamanager -n can-interface --enable INFO: Create apps: can-interface INFO: New apps successfully created in <plnx-proj-root>/project-spec/meta-user/recipes-apps/can-interface INFO: Enabling created component... INFO: sourcing build environment INFO: silentconfig rootfs INFO: can-interface has been enabled
- デフォルトのファイルをユーザーの dtsi ファイルで置き換えます。デバイス ツリー ジェネレーターを使用して dtsi ファイルを生成できます。
cp can.dtsi can.bit project-spec/meta-user/recipes-apps/can-interface/files/
- fpgamanager テンプレート アプリケーションの作成時に、dtsi および BIT ファイルを指定できます。次のコマンドを使用してアプリケーションを作成し、指定した .dtsi および .bit ファイルをアプリケーション ファイルのディレクトリにコピーします。
petalinux-create -t apps --template fpgamanager -n can-interface --srcuri "<path-to-dtsi>/pl.dtsi <path-to-bitfile>/system.bit" --enable INFO: Create apps: can-interface INFO: Copying source urls into the project directory INFO: New apps successfully created in <plnx-proj-root>/project-spec/meta-user/recipes-apps/can-interface1 INFO: Enabling created component... INFO: Sourcing build environment INFO: Silentconfig rootfs INFO: can-interface has been enabled
- アプリケーションをビルドします:。
petalinux-build
- dtbo および .bin ファイルのターゲットを確認します。
ls /lib/firmware/xilinx/can-interface/ pl.dtbo system.bit.bin
注記:
<project-root-dir>/project-spec/meta-user/recipes-apps/can-interface/can-interface.bb で FPGA マネージャーのテンプレート レシピを変更できます。