ubuntu22.04 安装 petalinux 2021.1

虚拟机环境

宿主机:win10

vmware 版本:VMware® Workstation 17 Pro

ubuntu版本 20.04 (如果用18.04的话, vscode 的remote SSH需要glibc

        的版本过低,无法使用Remote SSH 插件。。。。)

安装虚拟机分了 300G 空间,可以根据ug1144的推荐即可。

 Index of /releases/20.04.1

https://old-releases.ubuntu.com/releases/20.04.1/ubuntu-20.04-desktop-amd64.iso

虚拟机和宿主机复制粘贴(没试过传文件,都是复制文本)

虚拟机设置共享文件夹:

sudo apt install update

sudo apt install -y open-vm-tools open-vm-tools-desktop

安装好后需要 reboot 才能实现宿主机往ubuntu中拷贝

vmware 设置好共享目录后需要:

sudo vim /etc/fuse.conf

取消注释(或添加)这一行

user_allow_other

保存后(没写入fstab,所以重启后需要重新运行下面的 vmhgfs-fuse 开头的命令):

sudo mkdir -p /mnt/hgfs
sudo chmod 777 /mnt/hgfs
sudo vmhgfs-fuse .host/<share-dir>  /mnt/hgfs -o allow_other -o uid=1000 -o gid=1000

##eg:

sudo vmhgfs-fuse -o allow_other -o auto_unmount .host:/xilinx /mnt/hgfs

Petalinux 工具下载(需要登录账号):

https://china.xilinx.com/support/download/index.html/content/xilinx/zh/downloadNav/embedded-design-tools.html

安装open-vm-tools

sudo apt install -y open-vm-tools open-vm-tools-desktop

ubuntu需要安装的依赖:

https://adaptivesupport.amd.com/s/article/76526?language=en_US

sudo apt install -y  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

如果 petalinux-config 失败可能是由于没有安装 libtinfo5 没有安装

INFO] Generating Kconfig for project

package require hsi FAILED:

invalid command name "hsi::create_dt_node"

    while executing

"hsi::create_dt_node -help"

    (in namespace eval "::hsi::help" script line 6)

    invoked from within

"namespace eval ::hsi::help {

    variable version 0.1

    ::xsdb::setcmdmeta {hsi create_dt_node} categories {hsi}

    ::xsdb::setcmdmeta {hsi create..."

    (file "/opt/plx2021.1/pxl/tool/xsct/scripts/xsct/hsi/hsihelp.tcl" line 25)

    invoked from within

"source /home/g/petalinux/tools/xsct/scripts/xsct/hsi/hsihelp.tcl"

    ("package ifneeded hsi::help 0.1" script)ERROR: Failed to generate /home/aba/00-prj/15eg/build/misc/config/Kconfig.syshw

ERROR: Failed to Kconfig project

sudo apt install -y libtinfo5

### 安装 PetaLinux 2018.3 的准备工作 为了成功在 Ubuntu 22.04安装并配置 PetaLinux 2018.3,需确保操作系统满足特定条件以及完成必要的前期准备。 #### 配置网络连接 确保计算机拥有稳定的互联网连接以便下载所需的软件包和其他资源。对于KV260视觉启动套件,在烧录Ubuntu 22.04 LTS之后,按照官方指南中的说明来配置网络设置[^1]。 #### 更新系统及其库文件 建议更新现有系统的软件仓库索引,并升级已安装的应用程序至最新版本: ```bash sudo apt update && sudo apt upgrade -y ``` ### 下载与解压 PetaLinux 工具链 前往 Xilinx 官方网站获取对应版本 (2018.3) 的 PetaLinux Tools 压缩包。将其放置于合适的位置后执行如下命令进行解压缩操作: ```bash tar xf petalinux-v2018.3-final-installer.run.tar.gz chmod +x petalinux-v2018.3-final-installer.run ./petalinux-v2018.3-final-installer.run ``` 注意:由于目标平台为较新的 Linux 发行版(即 Ubuntu 22.04),可能会遇到兼容性问题;因此推荐参照官方文档或社区论坛寻找解决方案。 ### 设置开发环境变量 进入所选路径下找到 `settings.sh` 文件位置,通过终端加载此脚本来初始化工作区内的环境参数: ```bash source /opt/petalinux-v2018.3/settings.sh ``` 上述指令会临时修改当前 shell session 中的一些重要环境变量,使得后续可以顺利调用 PetaLinux 提供的各种功能模块。 ### 解决潜在依赖关系冲突 考虑到不同发行版之间的差异,可能还需要额外处理某些依赖项的问题。通常情况下可以通过以下方式解决大部分常见错误提示: ```bash sudo apt install gawk git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat cpio python wget curl libncurses5-dev \ libelf-dev zlib1g:i386 ``` 以上命令列出了部分常用的构建工具和库函数支持列表,具体需求取决于实际项目情况和个人偏好设定。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值