【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
相关文章
|
27天前
|
安全 Linux iOS开发
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
116 6
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
|
3月前
|
Ubuntu Linux
计算机基础知识:linux系统怎么安装?
在虚拟机软件中创建一个新的虚拟机,并选择相应操作系统类型和硬盘空间大小等参数。将下载的 ISO 镜像文件加载到虚拟机中。启动虚拟机,进入安装界面,并按照步骤进行安装。安装完成后,可以在虚拟机中使用 Linux 系统。
|
3月前
|
Ubuntu Linux
任何Ubuntu用户都应安装的四大Linux应用程序
当然,这款程序不需要太多介绍。我们面对的是网上最庞大最完整的多媒体中心,由于丰富的插件,我们能够高度细化地定制其每一项功能。这是我们的Linux发行版不可或缺的必备软件。 我们可以通过运行以下命令来轻松安装Kodi:sudo apt install kodi。
|
3月前
|
Ubuntu 物联网 Linux
从零安装一个Linux操作系统几种方法,以Ubuntu18.04为例
一切就绪后,我们就可以安装操作系统了。当系统通过优盘引导起来之后,我们就可以看到跟虚拟机中一样的安装向导了。之后,大家按照虚拟机中的顺序安装即可。 好了,今天主要介绍了Ubuntu Server版操作系统的安装过程,关于如何使用该操作系统,及操作系统更深层的原理,还请关注本号及相关圈子。
|
3月前
|
Ubuntu Linux 网络安全
Linux服务器之Ubuntu的安装与配置
Ubuntu Desktop是目前最成功、最流行的图形界面的Linux发行版;而Ubuntu Server也在服务器端市场占据了较大的份额。今天为大家详细介绍了Ubuntu Server的安装与配置,希望对你能有所帮助。关于VMware、VirtualBox等虚拟化软件的使用,朱哥还会在后续的文章中为大家详细介绍,敬请关注!
|
4月前
|
Linux 网络安全 Apache
针对在Centos/Linux安装Apache过程中出现的常见问题集锦
以上每个问题的解决方案应深入分析错误日志、系统消息和各种配置文件,以找到根本原因并加以解决。务必保持系统和Apache软件包更新到最新版本,以修复已知的bugs和安全漏洞。安装和管理Web服务器是一项需要细致关注和不断学习的任务。随着技术的发展,推荐定期查看官方文档和社区论坛,以保持知识的更新。
225 80
|
27天前
|
消息中间件 Kafka Linux
Linux下安装Kafka 3.9.1
本文介绍Kafka 3.9.1版本的安装与配置,包括通过ZooKeeper或KRaft模式启动Kafka。涵盖环境变量设置、日志路径修改、集群UUID生成、存储格式化及服务启停操作,适用于Linux环境下的部署实践。
178 0
|
3月前
|
网络协议 关系型数据库 Linux
【App Service Linux】在Linux App Service中安装 tcpdump 并抓取网络包
在App Service for Linux环境中,无法像Windows一样直接使用网络排查工具抓包。本文介绍了如何通过TCPDUMP在Linux环境下抓取网络包,包括SSH进入容器、安装tcpdump、执行抓包命令及下载分析文件的完整操作步骤。
176 6
|
3月前
|
弹性计算 安全 Linux
阿里云服务器ECS安装宝塔Linux面板、安装网站(新手图文教程)
本教程详解如何在阿里云服务器上安装宝塔Linux面板,涵盖ECS服务器手动安装步骤,包括系统准备、远程连接、安装命令执行、端口开放及LNMP环境部署,手把手引导用户快速搭建网站环境。