参考
https://docs.amd.com/r/en-US/ug1165-zynq-embedded-design-tutorial
1、
打开ubuntu前,先在WSLv2下优化VHDX虚拟磁盘,在cmd中输入:
wsl --shutdown
# 清理 WSL2 缓存
sudo apt clean
rm -rf ~/.cache/
# 在 Windows 中压缩虚拟磁盘
wsl --shutdown
diskpart
# 在 diskpart 中执行:
select vdisk file="D:\ubuntu20.04.6LTS\ext4.vhdx"
compact vdisk
等待返回:
100 百分比已完成
DiskPart 已成功压缩虚拟磁盘文件。
然后打开ubuntu。
每次打开ubuntu后,先输入:
source opt/pkg/petalinux/2023.2/settings.sh
按之前的方法,安装完成petalinux后,
首先创建工程,将 BSP 用于 ZC702 等开发板
其中xilinx-zc702-v2023.2-final.bsp 是面向 ZC702 量产芯片 Rev 1.0 板的 PetaLinux BSP,我的不是官方的开发板,不知道能不能用,先不用BSP,构建空工程
系统没有libtinfo5
sudo apt-get install libtinfo5
先创建空项目,有两种方法可以生成 petalinux 项目。将 BSP 用于 ZC702 等开发板,或者如果用户有自定义板,则用户可以使用模板。
# Using the BSP
petalinux-create -t project -s <path to the xilinx-zc702-v2023.2-final.bsp>
# Using the template for custom boards
petalinux-create -t project --name xilinx_project_002 --template zynq