petalinux-build: command not found

前言

在利用 petalinux 工具开发 Zynq的时候,先前已经安装、配置好相关的环境和工作目录,但是之后执行 petalinux 命令报错命令没找到的错误。


解决方案

  1. 安装 Petalinux 要考虑安装位置,对于 Petalinux 这种体积庞大的工具,笔者的安装路径如下:
zzz@ubuntu-GCP1820-SS:xilinx$ cd /home/zzz/opt/pkg/petalinux/2019.2/
zzz@ubuntu-GCP1820-SS:2019.2$ ls
components  doc  etc  settings.csh  settings.sh  tools
zzz@ubuntu-GCP1820-SS:2019.2$ 
  1. 出现 petalinux 命令找不到的错误,就需要执行上面的 settings.sh脚本,笔者使用别名简记 “执行setting.sh脚本”:
zzz@ubuntu-GCP1820-SS:2019.2$ 
zzz@ubuntu-GCP1820-SS:2019.2$ tail ~/.bashrc 
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
alias sptl='source /home/zzz/opt/pkg/petalinux/2019.2/settings.sh'
export PATH=$PATH:/home/zzz/xilinx/xilinx_petalinux/gcc-arm-linux/gcc-arm-none-eabi-8-2019-q3-update//bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/zzz/xilinx/xilinx_petalinux/gcc-arm-linux/gcc-arm-none-eabi-8-2019-q3-update/lib
zzz@ubuntu-GCP1820-SS:2019.2$ 
  1. 进入到笔者的 petalinux 工程路径下,在这里先执行 settings.sh脚本,之后就可以使用 petalinux-build 编译整个 Petalinux 工程了:
zzz@ubuntu-GCP1820-SS:xilinx$ cd /home/zzz/petalinux/xilinx
zzz@ubuntu-GCP1820-SS:xilinx$ ls
build  components  config.project  images  project-spec
zzz@ubuntu-GCP1820-SS:xilinx$ 
zzz@ubuntu-GCP1820-SS:xilinx$ sptl
PetaLinux environment set to '/home/zzz/opt/pkg/petalinux/2019.2'
WARNING: /bin/sh is not bash! 
bash is PetaLinux recommended shell. Please set your default shell to bash.
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 "PetaLinux SDK Installation Guide" for its impact and solution
zzz@ubuntu-GCP1820-SS:xilinx$ petalinux-build 
[INFO] building project
[INFO] sourcing bitbake
[INFO] generating user layers
[INFO] generating workspace directory
INFO: bitbake petalinux-user-image
Loading cache: 100% |###########################################################################################################################################################| Time: 0:00:00
Loaded 3987 entries from dependency cache.
Parsing recipes: 100% |#########################################################################################################################################################| Time: 0:00:04
Parsing of 2901 .bb files complete (2899 cached, 2 parsed). 3988 targets, 155 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |######################################################################################################################################################| Time: 0:00:02
Checking sstate mirror object availability: 100% |##############################################################################################################################| Time: 0:00:00
Sstate summary: Wanted 124 Found 22 Missed 204 Current 856 (17% match, 89% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 3462 tasks of which 3454 didn't need to be rerun and all succeeded.
INFO: Copying Images from deploy to images
[Errno 13] Permission denied: '/tftpboot/Image'
NOTE: Successfully copied built images to tftp dir: /tftpboot
[INFO] successfully built project
zzz@ubuntu-GCP1820-SS:xilinx$ 
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值