Freescale Yocto的安装,环境Ubuntu14.04

本文提供了一步一步指导如何使用freescale提供的文档安装并编译Yocto Project,包括必备软件包的安装、镜像制作工具的准备、repo工具的下载与配置,以及如何正确设置Yocto Project的BSP和进行成像构建。重点解决了在不同Ubuntu版本中可能遇到的问题,并提供了绕过翻墙限制的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

    本文根据freescale提供的为_Project_User's_Guide.pdf文档安装并编译,解决所遇到的问题。


Host packages

    先安装必备的packages:

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat
$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \
docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \
libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc

  镜像制作的工具程序,12.04和14.04不同:

Ubuntu12.04 $ sudo apt-get install uboot-mkimage

Ubuntu14.04 $ sudo apt-get install u-boot-tools

Setting up the repo utility 

  下载repo:

  这段代码是Freescale_Yocto_Project_User's_Guide.pdf中的,但是由于有些用户并不能翻墙,所以第二条命令执行时会出错

$ mkdir ~/bin (this step may not be needed if the bin folder already exists)
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

  不能翻墙(用能翻墙的用户说也不能链接到该网址,具体情况不明,没有亲自尝试过):

$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:01:23 --:--:--     0curl: (7) couldn't connect to host


  所以本文采用的是另一个网址(不用翻墙)来下载:

curl  http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo> ~/bin/repo


  接下来更改用户目录下.bashrc文件:

+export PATH=~/bin:$PATH


Yocto Project Setup

  接下来就是下载Freescale Yocto Project Community BSP recipe layers:

$ mkdir fsl-release-bsp
$ cd fsl-release-bsp
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.28-1.0.0_ga
$ repo sync

  同理(?!)

$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.28-1.0.0_ga

  这一句也是不能顺利执行的

$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.28-1.0.0_ga  
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle  
fatal: error [Errno 101] Network is unreachable

  改为:
repo init -u  git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.28-1.0.0_ga  --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable  


Image Build

  运行fsl-release-bsp文件来配置:

$ cd ~/fsl-release-bsp
$ source setup-environment

  创建输出文件夹:

$ MACHINE=<machine name> source fsl-setup-release.sh -b <build dir> -e <backend>
但是,这条指令需要在root权限下执行,不然会报权限不足,所以改为:

# MACHINE=<machine name> source fsl-setup-release.sh -b <build dir> -e <backend>
<machine name>:
  imx6dlsabreauto
  imx6dlsabresd
  imx6qsabreauto
  imx6qsabresd
  imx6slevk
  imx6solosabreauto
  imx6solosabresd
  imx6sxsabresd
  imx6sxsabreauto
<backend>
  fb
  dfb
  wayland
  x11
  <build dir>可自行命名。


  接上一跳命令:

bitbake <parameter>
<parameter>
  core-image-minimal
  core-image-base
  core-image-sato
  fsl-image-machine-test
  fsl-image-gui
  fsl-image-qt5

  为了下文方便,将这3条命令编号:

1.$ source setup-environment
2.$ MACHINE=<machine name> source fsl-setup-release.sh -b <build dir> -e <backend>
3.$ bitbake <paramete>
  2、3都必须紧跟上一句执行,但是2执行需要root权限,3不能在root模式下执行。

  因此全程都必须在用户权限下执行,为了2能成功执行,需更改用户的权限。

# chmod 666 /etc/sudoers
# vim /etc/sudoers
+xxx	ALL=(ALL:ALL) ALL
:wq
#chmod 444 /etc/sudoers
(xxx表示用户名)
 

  光有权限还不够,还需要更改fsl-setup-release文件夹下的文件所有权:

# chown -R xxx ~/fsl-setuprelease/
# chown -R :xxx ~/fsl-setuprelease/

  完成后再执行1、2、3三条命令,等待下载编译即可。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值