您的位置:首页 > 其它

Freescale Yocto Project搭建

2015-10-05 01:09 288 查看
系统:ubuntu-14.04.2

1、建立主机需要的包:

A Freescale Yocto Project Community BSP build requires that some packages be installed for the build that are documented
under the Yocto Project.
You can go to
Yocto Project Quick Start and check for the packages that must be installed for your build machine.
Essential Yocto Project host packages:
$ sudo apt-get install wget git-core unzip texinfo libsdl1.2-dev \
gawk diffstat build-essential chrpath
i.MX layers host packages for a Ubuntu 12.04 host setup:
$ sudo apt-get install sed cvs subversion coreutils texi2htmldocbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utilslibgl1-mesa-dev libglu1-mesa-dev
mercurial autoconf automake groff curl lzop asciidoc xterm

2、建立repo环境:

Repo is a tool built on top of Git that makes it easier to manage projects that contain multiple repositories, which do not need
to be on the same server. Repo complements very well the layered nature of the Yocto Project, making it easier for customers
to add their own layers to the BSP.
To install the “repo” utility, perform these steps:
2.1. Create a bin folder in the home directory.
$ 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

官网给出的地址需要翻墙才能下载,所以换个地址:

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

$
chmod a+x ~/bin/repo
2.2. Add the following line to the.bashrcfile to ensure that the~/binfolder
is in your PATH variable.
export PATH=~/bin:$PATH

3、建立Yocto工程环境:
A Yocto Project directory contains a "sources" directory, which contains the recipes used to build, one or more build
directories, and a set of scripts used to set up the environment.
The recipes used to build the project come from both the community and Freescale. The following commands are used to
download the Freescale Yocto Project Community BSP recipe layers. The Yocto Project layers are downloaded and placed in
the "sources" directory. This sets up the recipes that are used to build the project.
For this example, a directory called "fsl-release-bsp" is created for the project.
$ mkdir fsl-release-bsp
$ cd fsl-release-bsp
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.10.17-1.0.0_ga
$ repo sync
同步Yocto文件:此步奏过后需要等一段时间,多长时间由网上决定
3.1 使用root用户创建编译路径,执行fsl-setup-release.sh的时候需要在指定文件创建文件,但非root用户没有权限,所以在root用户模式中修改Yocto整个目录权限:chmod
777 ../fsl-release-bsp -R(递归)
3.2 切换用户到非root用户,su ***
3.3 搭建Yocto环境:
$ MACHINE=< machine name> source fsl-setup-release.sh -b <build directory> -e <backend fb,dfb, wayland, x11>
需要在fsl-setup-release.sh文件所在目录执行以上语句
MACHINE--指定板子型号:
• imx6qsabresd
• imx6qsabreauto
• imx6dlsabresd
• imx6dlsabreauto
• imx6solosabresd
• imx6solosabreauto
• imx6slevk
• imx6sxsabresd
• imx6sxsabreauto

-b指定编译路径
-e指定编译参数

When this process is completed, the source code is checked out atfsl-release-bsp/sources.
You can perform repo synchronization, with the commandrepo sync, periodically to update to the latest codes.

4、编译目标文件:

bitbake <image>

Examples:
• For building a non Qt 5 image:
bitbake fsl-image-gui
• For building a Qt 5 image for X11, Frame Buffer, and Wayland graphical backends:
bitbake fsl-image-qt5

To initialize the build environment when the session exits, run the following command in the directory above the build directory:
setup-environment <build directory>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: