系统: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
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
3.3 搭建Yocto环境:
• imx6qsabreauto
• imx6dlsabresd
• imx6dlsabreauto
• imx6solosabresd
• imx6solosabreauto
• imx6slevk
• imx6sxsabresd
• imx6sxsabreauto
-b指定编译路径
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、编译目标文件:
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>