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

网站备案账号是什么石家庄微网站建设

网站备案账号是什么,石家庄微网站建设,政务网站建设规划,胶州做淘宝的网站相关文档 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/611511.html

相关文章:

  • 营销网站和展示型网站维护一个网站
  • 西安网站建设制作专业公司创建公司为什么必须三个人
  • 广安做网站公司海口网络公司网站建设
  • 第二部分(下):套接字
  • seo网站优化培训多少价格中国建设银行app官方下载
  • 临沂网站建设那家好建设网站需要专业
  • 软考~系统规划与管理师考试——真题篇——章节——第18章 智慧城市发展规划——纯享题目版
  • 站长工具seo综合查询怎么使用的精品网站建设费用 找磐石网络一流
  • 做宣传图片的网站微信小程序开发视频完整教程
  • Linux环境变量持久化完全指南
  • 电商网站前端制作分工西宁做网站需要多少钱
  • dede鲜花网站模板下载石家庄企业网站制作哪家好
  • 织梦网站搬家教程怎么百度推广
  • Linux网络数据链路层
  • 苹果iOS测试版描述文件详细安装步骤指南
  • 百度收录好的免费网站保险查询平台
  • 莱州网站定制wordpress 粘贴表格
  • 织梦做的网站网速打开慢是怎么回事网站模板和定制的区别
  • 织梦网址导航网站模板wordpress电商
  • jQuery Accordion:高效且实用的网页交互组件
  • 找别人做网站注意什么做免费的视频网站可以赚钱吗
  • 做市场调查分析的网站网站域名怎么看
  • 一键部署MySQL全攻略
  • 搭建局域网MQTT通信
  • C++进阶 -- set、map、multiset、multimap的介绍及使用
  • 辽宁省朝阳市做网站首饰行业网站建设策划
  • 杭州网站开发工资企业网站seo营销
  • 特色的南昌网站制作做网站主题
  • 哈尔滨企业建站系统移动服务器建设的电影网站
  • 开发手机网站多少钱保定市网站建设