本文记录如何正确地在 Ubuntu 18.10 上安装 PetaLinux 2018.3 工具集。Ubuntu 18.04 同样适用。
下载安装包
PetaLinux 2018.3 Installer (TAR/GZIP – 6.79 GB)
MD5 SUM Value : 254217dcb6969d4be4ffcc0278ac58bd
系统配置需求
- 至少 8GB RAM
- 主频最低为 2.0GHz 的八核心处理器
- 100GB 磁盘空间(官方文档要求,实际占用 13.8GB)
1. 更改默认 Shell 为 bash
sudo dpkg-reconfigure dash
选择“No”。
2. 安装依赖项
sudo apt install -y gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential libsdl1.2-dev libglib2.0-dev zlib1g:i386 screen pax gzip dos2unix tofrodos iproute2 gawk tftpd-hpa tftp
3. 配置 TFTP 服务器
更改 TFTP 默认路径至 /tftpboot
gedit admin:///etc/default/tftpd-hpa
将 TFTP_DIRECTORY= 后面改为
“/tftpboot”
创建 /
sudo mkdir /tftpboot
sudo chown 你的用户名 /tftpboot
启用 TFTP 服务
sudo systemctl enable tftpd-hpa
sudo systemctl restart tftpd-hpa
4. 创建 PetaLinux 安装目录
sudo mkdir -p /opt/pkg/petalinux/2018.3
sudo chown -R 你的用户名 /opt
5. 进行 PetaLinux 安装
./petalinux-v2018.3-final-installer.run /opt/pkg/petalinux/2018.3
6. 设定环境变量
source /opt/pkg/petalinux/2018.3/settings.sh