当前位置: 首页 > news >正文

网站备案收费幕布wordpress站长

网站备案收费幕布,wordpress站长,做网站中心,jsp开发网站开发源码相关文档 PetaLinux 使用技巧与缓存配置 PetaLinux 工具文档参考指南 (ug1144) 设备树配置文档 软硬件准备 分类项目说明/用途验证方法示例硬件JTAG 线JTAG 下载、调试—UART 串口线查看 zynq 启动日志—网口线用于 TFTP 下载—软件TFTP 服务器用于下载各种启动文件systemc…

相关文档 PetaLinux 使用技巧与缓存配置

PetaLinux 工具文档参考指南 (ug1144)

设备树配置文档

软硬件准备

分类项目说明/用途验证方法示例
硬件JTAG 线JTAG 下载、调试
UART 串口线查看 zynq 启动日志
网口线用于 TFTP 下载
软件TFTP 服务器用于下载各种启动文件systemctl status tftpd-hpa
Vivado (xsdb)使用 xsdb 命令通过 JTAG 下载 ELF/bitxsdb -version
PetaLinux构建和打包 Linux 镜像petalinux-create -h
mkimage 工具制作 boot.scr 文件,安装命令:sudo apt install u-boot-toolsmkimage -V

ubuntu环境变量 ~/.bashrc

alias sptl='source /opt/pkg/petalinux/2020.2/settings.sh'
alias svivado='source /opt/pkg/tools/Xilinx/Vivado/2020.2/settings64.sh'
alias svitis='source /opt/pkg/tools/Xilinx/Vitis/2020.2/settings64.sh'
alias ssdk='source  /opt/petalinux/2020.2/environment-setup-cortexa9t2hf-neon-xilinx-linux-gnueabi'
alias sclion='/opt/soft/clion-2023.3.4/bin/clion.sh'

vivado导出xsa文件给petalinux工程用

 scp system_wrapper.xsa minglie@192.168.1.104:~/petalinux/xsa_7010/

启动相关文件

文件名作用说明生成方式
system.bitFPGA 配置比特流文件,配置 PL 逻辑电路(JTAG/FSBL 下载到 FPGA)。petalinux-build
zynq_fsbl.elfFSBL(First Stage Boot Loader),初始化 PS/PL,加载 bitstream 和 U-Boot。petalinux-build
uboot.elf二级引导程序 U-Boot,可通过 SD/TFTP/Flash 加载内核和设备树。petalinux-build
uImage/zImageLinux 内核镜像petalinux-build
rootfs.cpio.gz.u-boot根文件系统(cpio+gzip 格式,适用于 initramfs)。petalinux-build
system.dtb设备树文件(Device Tree Blob),描述硬件结构,供内核识别外设。petalinux-build
boot.cmd.defaultboot.scr 的源码手写
boot.scrU-Boot 脚本文件(由 mkimage 生成),定义启动参数和加载流程。mkimage -c none -A arm -T script -d boot.cmd.default boot.scr
text.txt (xsdb 脚本)XSDB 命令脚本,定义通过 JTAG 下载 ELF/bitstream 的操作步骤。录制 petalinux-boot --jtag --prebuilt 3 --tcl test.txt

PetaLinux --prebuilt 等级对比表

预设等级加载 Bitstream加载 FSBL加载 U-Boot加载 Linux(内核 + rootfs)适用场景
--prebuilt 1✅ 是❌ 否❌ 否❌ 否只配置 PL(FPGA 逻辑),测试 FPGA
--prebuilt 2✅ 是✅ 是✅ 是❌ 否启动 U-Boot,进行手动加载或调试
--prebuilt 3✅ 是✅ 是✅ 是✅ 是一键启动 Linux 系统(推荐测试用)

操作步骤

使用 petalinux-boot 制作预建镜像

就是把 images/linux 里的文件复制到pre-built目录下,用于录制
xsdb 脚本, 后续我们从 images/linux/ 目录下载文件, 所以只制作一次

petalinux-package --prebuilt --fpga images/linux/system.bit
或
petalinux-package --prebuilt --force

录制 xsdb 脚本

执行前需重新上电,若不加 --tcl test.txt 则是jtag启动

petalinux-boot --jtag --prebuilt 3 --tcl test.txt

录制的text.txt

删除下载uImage和rootfs.cpio.gz.u-boot的部分,因为 boot.scr 通过tftp下载了
替换 /home/minglie/petalinux/antbase/pre-built/linux/images/ 为 /home/minglie/petalinux/antbase/images/linux/
这样重新build后,直接用 images/linux/里的文件

connect
puts stderr "INFO: Configuring the FPGA..."
puts stderr "INFO: Downloading bitstream: /home/minglie/petalinux/antbase/pre-built/linux/images/system.bit to the target."
fpga "/home/minglie/petalinux/antbase/pre-built/linux/images/system.bit"
after 2000
targets -set -nocase -filter {name =~ "arm*#0"}source /home/minglie/petalinux/antbase/project-spec/hw-description/ps7_init.tcl; ps7_post_config
catch {stop}
set mctrlval [string trim [lindex [split [mrd 0xF8007080] :] 1]]
puts "mctrlval=$mctrlval"
puts stderr "INFO: Downloading ELF file: /home/minglie/petalinux/antbase/pre-built/linux/images/zynq_fsbl.elf to the target."
dow  "/home/minglie/petalinux/antbase/pre-built/linux/images/zynq_fsbl.elf"
after 2000
con
after 3000; stop
targets -set -nocase -filter {name =~ "arm*#0"}
puts stderr "INFO: Downloading ELF file: /home/minglie/petalinux/antbase/pre-built/linux/images/u-boot.elf to the target."
dow  "/home/minglie/petalinux/antbase/pre-built/linux/images/u-boot.elf"
after 2000
con; after 1000; stop
targets -set -nocase -filter {name =~ "arm*#0"}
puts stderr "INFO: Loading image: /home/minglie/petalinux/antbase/pre-built/linux/images/system.dtb at 0x00100000"
dow -data  "/home/minglie/petalinux/antbase/pre-built/linux/images/system.dtb" 0x00100000
after 2000
targets -set -nocase -filter {name =~ "arm*#0"}
puts stderr "INFO: Loading image: /home/minglie/petalinux/antbase/pre-built/linux/images/uImage at 0x00200000"
dow -data  "/home/minglie/petalinux/antbase/pre-built/linux/images/uImage" 0x00200000
after 2000
targets -set -nocase -filter {name =~ "arm*#0"}
puts stderr "INFO: Loading image: /home/minglie/petalinux/antbase/pre-built/linux/images/rootfs.cpio.gz.u-boot at 0x04000000"
dow -data  "/home/minglie/petalinux/antbase/pre-built/linux/images/rootfs.cpio.gz.u-boot" 0x04000000
after 2000
targets -set -nocase -filter {name =~ "arm*#0"}
puts stderr "INFO: Loading image: /home/minglie/petalinux/antbase/pre-built/linux/images/boot.scr at 0x03000000"
dow -data  "/home/minglie/petalinux/antbase/pre-built/linux/images/boot.scr" 0x03000000
after 2000
con
exit
puts stderr "INFO: Saving XSDB commands to test.txt. You can run 'xsdb test.txt' to execute"

修改后的text.txt

connect
puts stderr "INFO: Configuring the FPGA..."
puts stderr "INFO: Downloading bitstream: /home/minglie/petalinux/antbase/images/linux/system.bit to the target."
fpga "/home/minglie/petalinux/antbase/images/linux/system.bit"
after 2000
targets -set -nocase -filter {name =~ "arm*#0"}source /home/minglie/petalinux/antbase/project-spec/hw-description/ps7_init.tcl; ps7_post_config
catch {stop}
set mctrlval [string trim [lindex [split [mrd 0xF8007080] :] 1]]
puts "mctrlval=$mctrlval"
puts stderr "INFO: Downloading ELF file: /home/minglie/petalinux/antbase/images/linux/zynq_fsbl.elf to the target."
dow  "/home/minglie/petalinux/antbase/images/linux/zynq_fsbl.elf"
after 2000
con
after 3000; stop
targets -set -nocase -filter {name =~ "arm*#0"}
puts stderr "INFO: Downloading ELF file: /home/minglie/petalinux/antbase/images/linux/u-boot.elf to the target."
dow  "/home/minglie/petalinux/antbase/images/linux/u-boot.elf"
after 2000con; after 1000; stop
targets -set -nocase -filter {name =~ "arm*#0"}
puts stderr "INFO: Loading image: /home/minglie/petalinux/antbase/images/linux/system.dtb at 0x00100000"
dow -data  "/home/minglie/petalinux/antbase/images/linux/system.dtb" 0x00100000
after 2000targets -set -nocase -filter {name =~ "arm*#0"}
puts stderr "INFO: Loading image: /home/minglie/petalinux/antbase/boot.scr at 0x03000000"
dow -data  "/home/minglie/petalinux/antbase/boot.scr" 0x03000000
after 2000
con
exit
puts stderr "INFO: Saving XSDB commands to test.txt. You can run 'xsdb test.txt' to execute"

生成自定义的boot.scr

加个echo “AAA” 确认这个boot.scr 是生效的

boot.cmd.default

echo "AAA"
setenv ipaddr   192.168.1.89
setenv serverip 192.168.1.104
pxe get
pxe boot

生成并拷贝boot.scr

mkimage -c none -A arm -T script -d boot.cmd.default boot.scr
cp boot.scr  /home/minglie/petalinux/antbase/boot.scr

xsdb执行脚本启动

xsdb text.txt

jtag 启动结束


qemu启动

petalinux-boot --qemu --kernel

u-boot 纯手动启动

>ZYNQ
tftpboot 0x00200000 zImage
tftpboot 0x00100000 system.dtb
# 加载bit文件
tftpboot 0x00800000 system.bit 
fpga load 0 0x00800000 $filesize
bootz 0x00200000 - 0x00100000

u-boot 手动执行boot.scr 启动

# 或制作ming_boot.scr
mkimage -A arm -T script -C none -n "Zynq Boot Script" -d boot.cmd ming_boot.scr
>ZYNQ
tftpboot 0x3000000 ming_boot.scr
source 0x3000000

u-boot 挂在nfs根文件系统启动

setenv ipaddr 192.168.1.89  
setenv serverip 192.168.1.104 
setenv gatewayip 192.168.1.1
setenv netmask 255.255.255.0setenv bootargs 'console=ttyPS0,115200 root=/dev/nfs rw nfsroot=192.168.1.104:/home/minglie/minglie/workspace/rootfs,nfsvers=3 ip=192.168.1.89:192.168.1.104:192.168.1.1:255.255.255.0::eth0:off'
saveenv
boot

petalinux 常用脚本

# 创建工程
petalinux-create -t project --template zynq -n antbase
cd antbase
# 导入硬件配置
petalinux-config --get-hw-description  ../xsa_7020/
petalinux-config --get-hw-description  ../xsa_7010/
# 配置 Linux 内核
petalinux-config -c kernel
# 配置 Linux 根文件系统
petalinux-config -c rootfs
# 编译
petalinux-build
petalinux-build -c device-tree -x clean
petalinux-build -c device-tree
# 制作BOOT.bin 启动文件并复制到 SD 卡
petalinux-package --boot --fsbl --fpga --u-boot --force
petalinux-package --boot  --u-boot --fsbl  --dtb no  --force
cd images/linux
cp BOOT.BIN image.ub boot.scr    /media/minglie/BOOT
# 修改xsa文件后,清理项目生成的中间文件,小改不用执行
petalinux-build -x mrproper -f
# 编译设备树
petalinux-build -c device-tree -x clean
petalinux-build -c device-tree

PetaLinux 清理命令

命令作用说明典型执行时机
petalinux-build -x clean删除临时文件和部分编译产物,保留配置文件和大部分构建结果,重新编译速度快。- 小范围修改(应用代码 / device tree / 配置等)出问题时尝试
- 编译失败怀疑是临时文件冲突时
petalinux-build -x mrproper -f删除项目生成的所有中间文件,包括内核、根文件系统的缓存和临时文件,但保留配置。相当于彻底重建。- 修改 XSA 硬件文件(新增/删除外设、更改地址映射)后必须执行
- BSP 结构发生变化
- 大规模修改导致编译异常时
petalinux-build -x distclean删除几乎所有构建产物,项目回到初始状态,仅保留工程配置文件。- 工程出现严重问题需要“重置”时
- 想把工程打包分享给别人,但不想带构建产物时

u-boot下载命令

# 从 TFTP 服务器上下载 PXE 配置文件(比如 pxelinux.cfg/default 或 pxelinux.cfg/<MAC>)
zynq>pxe get
# 在 pxe get 成功获取到 PXE 配置文件后,执行其中定义的启动流程:
## 下载内核镜像(zImage / uImage)
## 下载设备树(system.dtb)
## 下载 initrd(rootfs)
## 按配置的 bootargs 启动 Linux
zynq>pxe boot
http://www.dtcms.com/a/485047.html

相关文章:

  • 温州建设局官方网站百度推广公司电话
  • 莘县网站建设价格优质的广州微网站建设
  • 网络课程教学平台有哪些关键词优化流程
  • 建个普通网站工作计划表
  • 在网上做效果图网站关键词seo优化软件
  • 网站程序建设更换网站模板
  • 需要做网站建设和推广的行业查询企业网
  • 建网站为什么要租空间网络营销做得比较成功的企业
  • 在线原型设计网站wordpress博客页面模板
  • 驻马店网站开发公司忘记网站后台admin密码
  • 著名的办公室设计案例沈阳网络seo公司
  • 用百度地图 做gis网站抖音广告推广怎么收费
  • 网站模板 介绍工业设计服务
  • 无锡网站设计公司上海企业网站设计制作
  • 南软科技网站开发wordpress配置域名
  • 注册网站大全一个完整的网站 技术
  • 盘龙区网站建设外包涞源县住房和城乡建设局网站
  • 网站域名备案服务号重庆招考网
  • 毕节市生态文明建设网站火车头 wordpress发布
  • 关于网站建设的书籍网页建立
  • 郑州老牌做企业网站网站开发软硬件配置
  • 网站建设工单系统推广目标包括什么
  • 龙岩网站建设方案做设计的搜素材上什么网站
  • 网站推广团队创建一家公司的步骤
  • 做视频网站要什么软件有哪些网站建设公司招聘面试
  • 西安网站建设招标莱州官方网站
  • 网站运营谁都可以做吗seo引擎优化公司
  • 设计素材网站特点网站开发做前端还是后端
  • 怎样做娱乐网站wordpress网站导航子菜单
  • 课外辅导东莞网站建设技术支持国外设计师灵感网站