【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
相关文章
|
21天前
|
安全 关系型数据库 MySQL
Linux(CentOS6)安装MySQL5.6
Linux(CentOS 6)系统上安装MySQL 5.6版本的详细步骤,包括准备数据存放目录、创建用户、下载安装包、初始化数据库、配置服务脚本、设置环境变量等操作。
55 1
|
9天前
|
NoSQL 关系型数据库 Redis
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
mall在linux环境下的部署(基于Docker容器),docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongodb、minio详细教程,拉取镜像、运行容器
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
|
19天前
|
缓存 NoSQL Linux
【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
|
8天前
|
Ubuntu Linux Shell
Linux系统命令 安装和文件相关命令
本文档详细介绍了Linux系统中的常用命令,包括软件安装卸载命令如`dpkg`和`apt-get`,压缩与解压命令如`gzip`、`bzip2`和`xz`,以及`tar`命令用于打包和解包。此外还介绍了文件分割命令`split`,文件操作命令如`cat`、`head`、`tail`、`more`、`less`等,管道命令和`wc`、`grep`、`find`、`cut`、`sort`、`uniq`、`diff`等实用工具。最后,文档还讲解了文件属性相关的命令如`chmod`、`chown`、`chgrp`以及创建硬链接和软链接的`ln`命令。
|
20天前
|
关系型数据库 MySQL Linux
在Linux中,新安装mysql后怎样提升mysql的安全级别?
在Linux中,新安装mysql后怎样提升mysql的安全级别?
|
14天前
|
Linux TensorFlow 算法框架/工具
在Linux上安装其他版本的cmake 或 升级cmake
在Linux上安装其他版本的cmake 或 升级cmake
23 2
|
14天前
|
人工智能 Linux 开发工具
Linux安装Taiyi stable-diffusion-webui
Linux安装Taiyi stable-diffusion-webui
|
15天前
|
Ubuntu Linux 虚拟化
安装Windows Linux 子系统的方法:适用于windows 11 版本
本文提供了在Windows 11系统上安装Linux子系统(WSL)的详细步骤,包括启用子系统和虚拟化功能、从Microsoft Store安装Linux发行版、设置WSL默认版本、安装WSL2补丁,以及完成Ubuntu的首次安装设置。
51 2
|
20天前
|
Ubuntu Linux 开发工具
【事件中心 Azure Event Hub】在Linux环境中(Ubuntu)安装Logstash的简易步骤及配置连接到Event Hub
【事件中心 Azure Event Hub】在Linux环境中(Ubuntu)安装Logstash的简易步骤及配置连接到Event Hub
|
19天前
|
关系型数据库 MySQL Linux
Linux环境安装MySQL8.0.36使用rpm包安装,安装顺序是什么?
【8月更文挑战第23天】Linux环境安装MySQL8.0.36使用rpm包安装,安装顺序是什么?
97 1