Petalinux2019.1的安装问题

Petalinux2019.1的安装与之前大体类似,但是有几个小坑,再次记录一下。

安装依赖

ug1144中提供了快速安装依赖的脚本,

sudo apt-get 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 -dev zlib1g:i386 screen pax gzip

这里边有很多错误,比如build-essential -dev,没有安装gawk,没有安装gawk就运行.run文件就会出现如下报错

awk: read error (Bad address)

Please refer to the PetaLinux Tools Installation Guide.

Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:
   /media/Document/Xilinx/Petalinux/petalinux_installation_log

./petalinux-v2019.1-final-installer.run: line 140: /tmp/tmp.Yb9CRyCRaW/petalinux-env-check: No such file or directory
ERROR: Failed to extract Petalinux installer...

亲测可用的安装依赖脚本如下

sudo dpkg --add-architecture i386
sudo apt update -y
sudo apt install --no-install-recommends -y gawk gcc make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev wget gcc-4.8 zlib1g:i386 python vim tofrodos iproute2 xvfb  build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev git make net-tools flex bison libselinux1 gnupg diffstat chrpath socat xterm autoconf libtool tar unzip texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev screen pax gzip language-pack-en libtool-bin cpio lib32z1 lsb-release vim-common libgtk2.0-dev libstdc++6:i386 libc6:i386 expect file less rsync

更改语言设置

在网上看到一些反馈,说petalinux build的时候要求语言环境为en_US.UTF-8,否则会报错,本人也遇到了类似的问题,在此记录一下解决办法

sudo apt-get install locales
sudo dpkg-reconfigure locales 
sudo locale-gen en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
echo "export LANG=en_US.UTF-8" >> ~/.bashrc

安装

sudo mkdir -p /opt/pkg/petalinux/2019.1
sudo chown -R $(whoami):$(whoami) /opt/pkg/petalinux/2019.1/
./petalinux-v2019.1-final-installer.run /opt/pkg/petalinux/2019.1

Docker

Petalinux对运行环境要求较高,有时候更新了python的一些设置就跑不起来了,因此推荐把Petalinux2019.1装进docker中,各位可以参照前面的教程https://blog.csdn.net/lulugay/article/details/84932265。上面提供的脚本在docker下亲测可用,也可以直接pull我做好的docker

sudo docker pull jiangwx/petalinux:2019.1
sudo docker run -it -v `pwd`:/home/plnx/2019.1 --user=plnx petalinux:2019.1
  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值