petalinux 生成板級工程流程
前提條件
1 petalinux 安裝
2 HDF文件
一 創(chuàng)建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 ②
①修改自己需要的配置舌厨,如修改并行編譯根據(jù)宿主機(jī)實(shí)際CPU個(gè)數(shù)术陶,echo $(nproc) 獲取自己CPU個(gè)數(shù)
②需要根據(jù)自己hdf目錄進(jìn)行修改
三 編譯工程
$ 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 的工程進(jìn)行創(chuàng)建
? 具體參考《EU 擴(kuò)展單元刷機(jī)指導(dǎo)手冊》
五 參考手冊
《ug1144》
《EU 擴(kuò)展單元刷機(jī)指導(dǎo)手冊》