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

Vivado

添加 SD0

导出hdf

制作SD卡

https://mathd.blog.csdn.net/article/details/135217761

【Petalinux】下为空白SD卡建立BOOT,rootfs分区

Petalinux

生成 Petalinux 框架

c 复制代码
petalinux-create --type project --template zynq --name sdtest


进入 sdtest 文件内

c 复制代码
cd sdtest/

导入hdf

直接拷贝到目录里面

进入配置

c 复制代码
petalinux-config --get-hw-description=.

boot image settings

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

Kernel image Settings

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

Image Packaging Configuration

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

程序更新

应用程序 自动运行

c 复制代码
petalinux-create -t apps --template install --name myapp-init --enable

myapp-init.bb

files/myapp-init文件

添加应用程序

c 复制代码
petalinux-create -t apps --template install --name myapp --enable

添加驱动模块

c 复制代码
petalinux-create -t modules -n axi //添加axi驱动模块

//将file文件夹、axi.bb的替换成自己的

c 复制代码
 petalinux-config -c rootfs



修改设备树

$ cd /project-spec/meta-user/recipes-bsp/device-tree/files/

替换system-user.dtsi文件

编译操作系统

c 复制代码
petalinux-build

打包操作系统

c 复制代码
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

相关推荐
Stone.Wu6 天前
快速理解ARM Cortex-M流水线:指令执行过程通俗解释
arm
我在人间贩卖青春6 天前
汇编之分支跳转指令
汇编·arm·分支跳转
我在人间贩卖青春6 天前
汇编之加载存储指令
汇编·arm·寄存器加载存储
我在人间贩卖青春6 天前
汇编之状态寄存器访问指令
汇编·arm·状态寄存器
我在人间贩卖青春6 天前
汇编之软中断指令和协处理指令
汇编·arm·软中断·协处理
我在人间贩卖青春6 天前
汇编之数据处理指令
汇编·arm·数据处理指令
fly的fly9 天前
浅析 QT远程部署及debug方案
qt·物联网·arm
切糕师学AI11 天前
ARM标准汇编(armasm)中的标号(Label)
汇编·arm
算法笑匠12 天前
FPGA驱动AD9226实现65MSPS高速数据采集
fpga·adc·高速数据采集·ad9226
CHENG-JustDoIt12 天前
嵌入式开发 | ARM Cortex-M 系列中M3、M4、M23 和 M33四款处理器的深度对比分析
arm开发·单片机·嵌入式硬件·arm