Freescale Yocto的安装,环境Ubuntu14.04

来源:互联网 发布:淘宝如何不显示会员名 编辑:程序博客网 时间:2024/05/23 19:13

    本文根据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-mkimageUbuntu14.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-environment2.$ 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+xxxALL=(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三条命令,等待下载编译即可。

0 0
原创粉丝点击