Versal - Petalinux 2024.2(下载与安装+VD100+安装JupyterLab+SD卡分区+SDT流程)

目录

1. 简介

2. 下载与安装

2.1 下载 2024.2

2.2 参考手册

2.3 安装准备

2.4 安装过程

3. 使用示例

3.1 配置环境

3.2 减少构建时间

3.3 创建工程

3.4 导入 XSA

3.5 基本配置

3.6 额外配置

3.6.1 配置汇总

3.6.2 Image Features

3.6.3 用户名和密码

3.6.4 Package Group

3.6.5 CPU IDLE

3.7 修改设备树

3.8 构建(Build)

3.9 生成启动镜像

3.10 生成 SDK

3.11 拷贝至 SD

3.12 启动 Linux

3.13 安装 JupyterLab

3.14 安装 Conda

3.15 常用命令

4. SDT Flow

4.1 资料

4.2 输入与输出

4.3 生成方法

5. SD 卡分区

5.1 空白 SD 卡

5.2 分区一

5.3 分区二

5.4 加载磁盘

5.5 拷贝镜像

6. 其他

6.1 U-Boot 命令

6.1.1 mmc

6.2  异常汇总

6.2.1 网口连接

6.2.2 无法 ping 通

6.2.3 update 更新失败

6.2.4 仓库状态 404

7. 总结


1. 简介

本博文分享在 VD100 硬件平台上,通过 Petalinux 2024.2 构建 Linux 的过程。

包括:

  • Petalinux 2024.2 的下载与安装
  • 在 VD100 硬件平台构建 Linux 全过程
  • SDT 生成设备树的方法
  • SD 卡分区
  • 一些常见异常的汇总和分析

2. 下载与安装

2.1 下载 2024.2

PetaLinux Tools DownloadsVivado, Vitis, Vitis Embedded Platform, PetaLinux, Device modelshttps://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2024-2.htmlhttps://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2024-2.htmlhttps://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2024-2.htmlhttps://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2024-2.htmlhttps://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2024-2.htmlhttps://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2024-2.htmlhttps://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2024-2.htmlhttps://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2024-2.html
 

2.2 参考手册

《PetaLinux Tools Reference Guide (UG1144)》
《PetaLinux Tools Reference Guide (UG1144)》https://docs.amd.com/r/en-US/ug1144-petalinux-tools-reference-guidehttps://docs.amd.com/r/en-US/ug1144-petalinux-tools-reference-guidehttps://docs.amd.com/r/en-US/ug1144-petalinux-tools-reference-guidehttps://docs.amd.com/r/en-US/ug1144-petalinux-tools-reference-guidehttps://docs.amd.com/r/en-US/ug1144-petalinux-tools-reference-guidehttps://docs.amd.com/r/en-US/ug1144-petalinux-tools-reference-guidehttps://docs.amd.com/r/en-US/ug1144-petalinux-tools-reference-guidehttps://docs.amd.com/r/en-US/ug1144-petalinux-tools-reference-guide

2.3 安装准备

1)我的配置(符合要求):

  • 32 GB DDR5-5600
  • AMD 7940HS
  • Ubuntu Desktop 20.04.6 LTS

The PetaLinux tools need to be installed as non-root users.

2)依赖包

sudo apt-get install iproute2 gawk python3 python build-essential gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget git-core diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib automake zlib1g:i386 screen pax gzip cpio python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3

参考:《2024.2_PetaLinux_OS_Package_List.xlsx》

000037095 - PetaLinux 2024.2 - Product Update Release Notes and Known Issueshttps://adaptivesupport.amd.com/s/article/000037095?language=en_UShttps://adaptivesupport.amd.com/s/article/000037095?language=en_UShttps://adaptivesupport.amd.com/s/article/000037095?language=en_UShttps://adaptivesupport.amd.com/s/article/000037095?language=en_UShttps://adaptivesupport.amd.com/s/article/000037095?language=en_UShttps://adaptivesupport.amd.com/s/article/000037095?language=en_UShttps://adaptivesupport.amd.com/s/article/000037095?language=en_UShttps://adaptivesupport.amd.com/s/article/000037095?language=en_US

3)dash

Petalinux 工具要求主机系统 /bin/sh 为 bash。

# 检查 /bin/sh 指向哪个 shell:
>> ll /bin/sh
---
lrwxrwxrwx 1 root root 4 12月 20 23:02 /bin/sh -> dash*

 更改 /bin/sh:

>> sudo dpkg-reconfigure dash

在弹出的界面中选择 "No" 来将 /bin/sh 链接到 bash。

2.4 安装过程

《Reference Guide (UG1144)》:Installing the PetaLinux Tool

>> chmod 755 ./petalinux-v<petalinux-version>-final-installer.run
>> ./petalinux-v2024.2-11062026-installer.run

可以指定安装目录 :

>> mkdir -p /opt/petalinux/2024.2
>> ./petalinux-v2024.2-11062026-installer.run -d /opt/petalinux/2024.2/

注:chmod 755 使 PetaLinux 安装程序脚本变为可执行文件。

  • (7)所有者: 读、写、执行
  • (5)所属组: 读、执行
  • (5)其他用户: 读、执行

在安装过程中,会两次弹出协议,按 q 退出后,按 y 同意即可,安装成功提示如下:

>> ./petalinux-v2024.2-11062026-installer.run -d /opt/petalinux/2024.2/
---
PetaLinux CMD tools installer version 2024.2
============================================
[INFO] Checking free disk space
[INFO] Checking installed tools
[INFO] Checking installed development libraries
[INFO] Checking network and other services
[WARNING] No tftp server found - please refer to "UG1144  PetaLinux Tools Documentation Reference Guide" for its impact and solution

LICENSE AGREEMENTS

PetaLinux SDK contains software from a number of sources.  Please review
the following licenses and indicate your acceptance of each to continue.

You do not have to accept the licenses, however if you do not then you may
not use PetaLinux SDK.

Use PgUp/PgDn to navigate the license viewer, and press 'q' to close

Press Enter to display the license agreements
Do you accept Xilinx End User License Agreement? [y/N] > y
Do you accept Third Party End User License Agreement? [y/N] > y
[INFO] Installing PetaLinux SDK...done
[INFO] Setting it up...done
[INFO] Extracting xsct tarball...done
[INFO] PetaLinux SDK has been successfully set up and is ready to be used.

3. 使用示例

3.1 配置环境

>> source /opt/petalinux/2024.2/settings.sh

第一次 souring 会出现如下提示:
 

>> source /opt/petalinux/2024.2/settings.sh
---
*************************************************************************************************************************************************
The PetaLinux source code and images provided/generated are for demonstration purposes only.
Please refer to https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/2741928025/Moving+from+PetaLinux+to+Production+Deployment
 for more details
*************************************************************************************************************************************************
PetaLinux environment set to '/opt/petalinux/2024.2'
[INFO] Checking free disk space
[INFO] Checking installed tools
[INFO] Checking installed development libraries
[INFO] Checking network and other services
[WARNING] No tftp server found - please refer to "UG1144 2024.2 PetaLinux Tools Documentation Reference Guide" for its impact and solution

验证工作环境是否已设置:

>> echo $PETALINUX
---
/opt/petalinux/2024.2

3.2 减少构建时间

Petalinux 工程编译时会从网上获取大量的必要资源,编译速度依赖于网速,如果网络不稳定还有可能在等待很久之后编译失败,推荐使用离线镜像

参考一:

### PetaLinux 2022.1 版本特性 PetaLinux Tools 是 Xilinx 提供的一个用于简化嵌入式 Linux 系统开发的工具集。对于 PetaLinux 2022.1 版本,主要改进集中在增强的功能支持、性能优化以及更好的用户体验上。 #### 改进的支持架构 - 增强了对 Zynq UltraScale+ MPSoCVersal ACAP 平台的支持。 - 加入了新的硬件平台支持,包括最新的 FPGA 设备和自定义 IP 集成能力[^1]。 #### 新增功能 - **图形化配置界面**:提供了一个基于 Web 的 GUI 来帮助开发者更直观地设置项目参数。 - **自动化构建流程**:引入更加灵活高效的 CI/CD 工具链集成方案,使得持续交付变得更加容易实现。 - **安全性加强**:增加了 Secure Boot 功能选项,在启动过程中验证固件签名以防止恶意软件入侵。 ```bash petalinux-config -c rootfs ``` 这段命令可以用来进入根文件系统的定制菜单,允许用户根据需求调整内核模块和其他组件的选择。 --- ### 安装指南 为了安装 PetaLinux 2022.1,请遵循以下步骤: #### 准备工作 确保宿主机已准备好 Ubuntu 或 CentOS 操作系统,并满足最低内存要求(建议至少8GB RAM)。同时确认已经安装必要的依赖包如 Git, Python3 及其他常用库。 #### 下载并解压 访问官方网站下载最新版本的 PetaLinux Tools tarball 文件,将其放置到目标目录下并通过如下指令完成解压缩操作: ```bash tar xvzf petalinux-v2022.1-final-installer.run.tar.gz chmod +x petalinux-v2022.1-final-installer.run ./petalinux-v2022.1-final-installer.run ``` 上述脚本会引导用户通过一系列提示来完成整个安装过程,期间可以选择安装路径及其他相关设置项。 --- ### 发行说明 发行说明文档通常包含了该次发布的全部变更记录、修复过的 bug 列表以及其他值得注意的变化点。具体来说,PetaLinux 2022.1 的发布日志可能涉及但不限于以下几个方面: - 解决了之前版本中存在的若干严重缺陷; - 对某些特定芯片组提供了额外驱动程序更新; - 文档资料得到了全面修订和完善以便于新手入门学习; 更多详情可参阅随产品附带的帮助手册或在线资源中心获取最权威的信息来源。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值