【Petalinux】制作SD卡 操作系统 启动

Vivado

添加 SD0
【Petalinux】制作SD卡 操作系统 启动_第1张图片
导出hdf

【Petalinux】制作SD卡 操作系统 启动_第2张图片

制作SD卡

https://mathd.blog.csdn.net/article/details/135217761
【Petalinux】下为空白SD卡建立BOOT,rootfs分区

Petalinux

生成 Petalinux 框架

petalinux-create --type project --template zynq --name sdtest

在这里插入图片描述
【Petalinux】制作SD卡 操作系统 启动_第3张图片

进入 sdtest 文件内

cd sdtest/

在这里插入图片描述

导入hdf

直接拷贝到目录里面
【Petalinux】制作SD卡 操作系统 启动_第4张图片

进入配置

petalinux-config --get-hw-description=.

boot image settings

  • Subsystem AUTO Hardware Settings
    • Advanced bootable images storage Settings
      • boot image settings

【Petalinux】制作SD卡 操作系统 启动_第5张图片

Kernel image Settings

  • Subsystem AUTO Hardware Settings
    • Advanced bootable images storage Settings
      • Kernel image Settings

【Petalinux】制作SD卡 操作系统 启动_第6张图片

Image Packaging Configuration

【Petalinux】制作SD卡 操作系统 启动_第7张图片

BOOT/内核/文件系统打包到BOOT中版本配置方式

-*- Subsystem AUTO Hardware Settings —>
Flash Settings —>
Primary Flash (psu_qspi_0) —>
*** partition 0 ***
(boot) name
(0x2000000) size
*** partition 1 ***
(bootenv) name
(0x2000) size

程序更新

应用程序 自动运行

petalinux-create -t apps --template install --name myapp-init --enable

【Petalinux】制作SD卡 操作系统 启动_第8张图片

myapp-init.bb

files/myapp-init文件

添加应用程序

petalinux-create -t apps --template install --name myapp --enable

在这里插入图片描述

添加驱动模块

petalinux-create -t modules -n axi //添加axi驱动模块

在这里插入图片描述
//将file文件夹、axi.bb的替换成自己的

 petalinux-config -c rootfs

【Petalinux】制作SD卡 操作系统 启动_第9张图片
【Petalinux】制作SD卡 操作系统 启动_第10张图片
【Petalinux】制作SD卡 操作系统 启动_第11张图片

修改设备树

$ cd /project-spec/meta-user/recipes-bsp/device-tree/files/
替换system-user.dtsi文件

编译操作系统

petalinux-build

打包操作系统

cd images/linux/
petalinux-package --boot --fsbl zynq_fsbl.elf --fpga system.bit --kernel --u-boot --force

复制 BOOT.BIN 和 image.ub 到 SD 卡的 boot 分区
将 rootfs.tar.gz 解压到 SD 卡 rootfs 分区 sudo tar xvf rootfs.tar.gz -C /media/rootfs

你可能感兴趣的:(FPGA,-,面向物理层基带算法工程师,Petalinux,FPGA,ARM)