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 扩展单元刷机指导手册》

你可能感兴趣的:(petalinux,zynq,点滴积累)