【linux】PetaLinux 2024.1安装笔记

简介: 【linux】PetaLinux 2024.1安装笔记

@[linux](PetaLinux 2024.1安装笔记)

作者使用 AMD Vitis™

系统是ubuntu 22.04.1 LTS


PetaLinux简介

PetaLinux 是一个嵌入式 Linux 软件开发工具包 (SDK),旨在为基于 FPGA 的系统芯片 (SoC) 设计或 FPGA 设计提供支持。


您需要具备以下基本技能:


Linux 基础知识:能够执行 Linux 命令。

操作系统及主机系统功能:了解操作系统版本、Linux 发行版、安全权限,以及 Yocto 的基本概念。

PetaLinux 工具包包含以下组件:


Yocto 可扩展 SDK (eSDK):用于创建和维护嵌入式 Linux 系统。

XSCT 和工具链:用于调试和交叉编译。

PetaLinux 命令行接口 (CLI) 工具:用于在命令行中管理和配置 PetaLinux 项目。


从 2024.1 版本开始,有两种方法可以构建 PetaLinux 镜像。

  • XSCT Flow
    Using the XSCT flow by providing xsa file as input to petalinux-config.
  • system-device-tree

Using system-device-tree, you can also build the images without relying on XSCT. The input to petalinux-config is system-device-tree instead of XSA

XSCT and tool chains

PetaLinux tool uses the XSCT underneath to configure and build all the embedded software applications.

  • XSCT tool chain path: $PETALINUX/components/xsct

PetaLinux Command Line Interface (CLI) tools

This contains all the PetaLinux commands that you require. The CLI command tools are:

  • petalinux-create
  • petalinux-config
  • petalinux-build
  • petalinux-util
  • petalinux-package
  • petalinux-upgrade
  • petalinux-devtool
  • petalinux-boot

设置环境

安装需求

最低系统要求:

  • 8 GB RAM
  • 2 GHz CPU clock or equivalent (minimum of eight cores)
  • 100 GB free HDD space
  • Supported OS:

Completely removed RHEL and CENTOS to align with upstream Yocto.

Ubuntu Desktop/Server 20.04.2 LTS, 20.04.3 LTS, 20.04.4 LTS, 20.04.5 LTS(64-bit),20.04.6 LTS, 22.04 LTS, 22.04.1 LTS, 22.04.2 LTS, and 22.04.3 LTS

OpenSuse Leap 15.3 and 15.4

AlmaLinux 8.7 and 9.1

  • 非root用户安装
  • PetaLinux需要在Linux主机工作站上安装标准开发工具和库。在主机Linux上安装发行说明中列出的库和工具。
  • PetaLinux工具要求你的主机系统/bin/sh是“bash”如果您使用的是Ubuntu发行版,并且/bin/sh是“dash”,使用sudo dpkg reconfigue dash命令更改默认的系统shell/bin/sh。

要查看系统的默认 /bin/sh,可以使用以下命令在终端中执行:

ls -l /bin/sh

安装

  • 创建安装目录
mkdir -p /home/<user>/petalinux/<petalinux-version>
  • 安装
    修改权限
chmod 755 ./petalinux-v<petalinux-version>-final-installer.run
petalinux-v<petalinux-version>-final-installer.run -p "aarch64"

其中 -p 指定安装架构,Vitis™是aarch64。

安装日志


PetaLinux CMD tools installer version 2024.1

============================================

[WARNING] This is not a supported OS

[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

Enter target directory for SDK (default: /home/mf/xilinx/petalinux/2024-1): 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.

安装过程遇到问题

1、缺少部分包

  • 问题描述
[WARNING] This is not a supported OS
[INFO] Checking free disk space
[INFO] Checking installed tools
[ERROR] You are missing the following system tools required by PetaLinux:

 - xterm
 - autoconf
 - libtool
 - texinfo
 - zlib1g-dev
 - gcc-multilib
Please check PetaLinux installation guide - required tools and libraries package section for detailed information

[INFO] Checking installed development libraries
[ERROR] You are missing these development libraries required by PetaLinux:

 - zlib
 - ncurses

Please install them with your operating system package manager, and try again
  • 解决方法
sudo apt-get update
sudo apt-get install xterm autoconf libtool texinfo zlib1g-dev gcc-multilib zlib1g libncurses5-dev

、安装失败

  • 问题描述
    初次安装时,安装包不在安装目录下,安装命令中使用 --dir 未生效,安装失败。
  • 解决方法
    将安装包复制到安装目录。

3、无tftp服务

  • 安装命令
sudo apt update
sudo apt install tftpd-hpa
  • 配置 TFTP 服务器
vi /etc/default/tftpd-hpa

默认配置:

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"

可以修改为:

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
  • 创建 TFTP 根目录
    创建 TFTP 根目录,并设置适当的权限
sudo mkdir -p /var/lib/tftpboot
sudo chmod -R 777 /var/lib/tftpboot
  • 重启 TFTP 服务
sudo systemctl restart tftpd-hpa
  • 检查 TFTP 服务状态
sudo systemctl status tftpd-hpa
  • 测试 TFTP 服务器
    你可以使用 TFTP 客户端来测试服务器是否可用。在另一个终端中,输入以下命令:
tftp localhost

然后尝试下载或上传文件。例如:

get a.txt
put b.txt
  • 注意事项
    确保防火墙允许 UDP 69 端口的流量。如果使用 ufw 防火墙,可以使用以下命令打开 TFTP 的端口
sudo ufw allow 69/udp
目录
打赏
0
0
0
0
13
分享
相关文章
Linux中yum、rpm、apt-get、wget的区别,yum、rpm、apt-get常用命令,CentOS、Ubuntu中安装wget
通过本文,我们详细了解了 `yum`、`rpm`、`apt-get`和 `wget`的区别、常用命令以及在CentOS和Ubuntu中安装 `wget`的方法。`yum`和 `apt-get`是高层次的包管理器,分别用于RPM系和Debian系发行版,能够自动解决依赖问题;而 `rpm`是低层次的包管理工具,适合处理单个包;`wget`则是一个功能强大的下载工具,适用于各种下载任务。在实际使用中,根据系统类型和任务需求选择合适的工具,可以大大提高工作效率和系统管理的便利性。
59 25
|
22天前
|
Linux 安装 Qualcomm ® SnapdragonTM Profiler
通过本文的详细介绍,您应该已经成功在 Linux 系统上安装并配置了 Qualcomm® Snapdragon™ Profiler,并能够连接 Android 设备进行性能分析。Snapdragon Profiler 提供了丰富的工具和功能,可以帮助开发者深入了解应用程序的性能瓶颈,从而进行优化。希望本文能对您有所帮助,让您在开发过程中更高效地使用 Snapdragon Profiler 进行性能分析和优化。
60 10
|
23天前
|
Linux安装svn并启动
Linux安装svn并启动
55 10
linux8安装oracle 11g遇到的问题记录
Oracle 11g在Linux 8上安装时会遇到link编译环节的问题。官方建议忽略安装中的链接错误,安装完成后应用DBPSU 11.2.0.4.240716补丁及一次性补丁33991024,再重新编译二进制文件,并配置监听器和数据库。但因11g已退出服务期,这些补丁需付费获取。网上信息显示22年1月的PSU补丁也可解决问题,找到该补丁后按常规方式打补丁即可。如有需求或疑问可咨询我。
83 20
os-copilot在Alibaba Cloud Linux镜像下的安装与功能测试
我顺利使用了OS Copilot的 -t -f 功能,我的疑惑是在换行的时候就直接进行提问了,每次只能写一个问题,没法连续换行更有逻辑的输入问题。 我认为 -t 管道 功能有用 ,能解决环境问题的连续性操作。 我认为 -f 管道 功能有用 ,可以单独创建可连续性提问的task问题。 我认为 | 对文件直接理解在新的服务器理解有很大的帮助。 此外,我还有建议 可以在非 co 的环境下也能进行连续性的提问。
80 7
Linux 安装python3.7.6
本教程介绍在Linux系统上安装Python 3.7.6的步骤。首先使用`yum`安装依赖环境,包括zlib、openssl等开发库。接着通过`wget`下载Python 3.7.6源码包并解压。创建目标文件夹`/usr/local/python3`后,进入解压目录执行配置、编译和安装命令。最后设置软链接,使`python3`和`pip3`命令生效。
|
3月前
|
Linux 各发行版安装 ping 命令指南
如何在不同 Linux 发行版(Ubuntu/Debian、CentOS/RHEL/Fedora、Arch Linux、openSUSE、Alpine Linux)上安装 `ping` 命令,详细列出各发行版的安装步骤和验证方法,帮助系统管理员和网络工程师快速排查网络问题。
246 20
Linux安装jdk、mysql、redis
Linux安装jdk、mysql、redis
240 7
UNIX/Linux 上的安装
UNIX/Linux 上的安装。
66 2
Linux系统之安装OneNav个人书签管理器
【10月更文挑战第19天】Linux系统之安装OneNav个人书签管理器
152 6
Linux系统之安装OneNav个人书签管理器
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等