Zynq UltraScale+MPSoc 開發(二)

petalinux 生成板級工程流程

前提條件

1 petalinux 安裝

2 HDF文件

一 創建petalinux工程

 $ cd you-work-dir
 $ source /vm/petalinux/settings.sh
 $ petalinux-create --type project --template zynqMP --name plnx-proj-zymp
 •--template <PLATFORM> - The following PLATFORM types are supported:
  zynqMP (for UltraScale+ MPSoC)
  zynq (for Zynq)
  microblaze (for MicroBlaze).
  Note: The MicroBlaze option cannot be used along with Zynq or Zynq UltraScale+ designs in the Programmable Logic (PL).
 •--name <PROJECT_NAME> - The name of the project you are building.

二 配置硬件信息

$ cd you-work-dir
$ petalinux-config --help   ①
$ petalinux-config --get-hw-description=hdf-file-dir ②
①修改自己需要的配置,如修改並行編譯根據宿主機實際CPU個數,echo $(nproc) 獲取自己CPU個數
②需要根據自己hdf目錄進行修改

三 編譯工程

$ cd you-work-dir
$ petalinux-build
This step generates a device tree DTB file, a first stage bootloader (if selected), U-Boot,
the Linux kernel, and a root filesystem image. Finally, it generates the necessary boot
images.
如果要獲取u-boot源代碼需要註釋文件you-work-dir/build/conf/local.conf的#INHERIT += "rm_work" 行
生成u-boot目錄:you-work-dir/build/tmp/work/plnx_zynqmp-xilinx-linux/u-boot-xlnx/v2018.01-xilinx-v2018.3+gitAUTOINC+d8fc4b3b70-r0/git
生成kernel目錄:you-work-dir/build/tmp/work-shared/plnx-zynqmp/kernel-source
When the build finishes, the generated images will be within the you-work-dir/images and /tftpboot directories

四 生成BOOT.bin

1.通過petalinux-package --boot命令獲取BOOT.bin

$ petalinux-package --boot --fsbl <FSBL_ELF> --fpga <BITSTREAM> --u-boot --pmufw <PMUFW_ELF> --atf atf_img

2.通過軟件xsdk 的工程進行創建

具體參考《EU 擴展單元刷機指導手冊》

五 參考手冊

《ug1144》

《EU 擴展單元刷機指導手冊》

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章