FPGA マネージャーへのカスタム dtsi および BIT ファイルの追加 (Zynq 7000 デバイスおよび Zynq UltraScale+ MPSoC) - 2023.1 日本語

PetaLinux ツール資料: リファレンス ガイド (UG1144)

Document ID
UG1144
Release Date
2023-05-16
Version
2023.1 日本語
このセクションでは、FPGA マネージャーが有効のときに、XSA を利用して dtsi ファイルを生成するのではなく、すぐに使用可能な (手動で作成した) カスタム IP の dtsi ファイルで作業するのに必要なメカニズムおよびインフラストラクチャについて説明します。この手順では、dtbo および bin ファイルを生成し、rootfs /lib/firmware/xilinx ディレクトリにコピーします。
  1. 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
  2. デフォルトのファイルをユーザーの dtsi ファイルで置き換えます。デバイス ツリー ジェネレーターを使用して dtsi ファイルを生成できます。
    cp can.dtsi can.bit project-spec/meta-user/recipes-apps/can-interface/files/
  3. 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
    
  4. アプリケーションをビルドします:。
    petalinux-build
  5. 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 マネージャーのテンプレート レシピを変更できます。