1、配置环境变量

source /opt/petalinux/setting.sh

其中/opt/petalinux/setting.sh 为petalinux的安装路径

2、新建工程

对于Zynq UltraScale+MPSoc 系列,命令如下

petalinux-creat  -t project -n <PROJECT_NAME> --template zynqMP

3、导入硬件描述文件

首先cd <PROJECT_NAME> 

然后执行(其中path-to-dirextory 为.xsa 文件所在的路径)

petalinux-config --get-hw-description=<path-to-dirextory>

4、进行内核配置

petalinux-config -c kernel 

在内核配置中基本保持默认配置,重点关注自己需要的驱动

5、配置跟文件系统

配置完成后记得保存退出

petalinux-config -c rootfs

6、编译系统镜像

petalinux-build 

7、生成uImag

petalinux-package --image -c kernel --format uImage

8、生成启动镜像

petalinux-package --boot --format BIN --fsbl image/linux/zynqmp_fsb1.elf --u-boot images/linux/u-boot.elf --pmufw image/linux/pmufw.elf --fpga image /linux/*.bit

 

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐