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>
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>
相关文章推荐
- 原子操作 vs 非原子操作
- HDU 5135 Little Zu Chongzhi's Triangles (2014年广州赛区现场赛I题)
- CSS样式----图文详解(二):css属性
- 1041. 考试座位号(15)
- JNI字符串转字节数组指针方法
- 项目管理-成本管理
- Ubuntu 15.04趟坑笔记
- 解题报告 之 ZOJ 3329 One Person Game
- 字符串操作函数
- 掌握VS2010调试 -- 入门指南
- Nginx 引入线程池
- Leetcode那点事儿
- already defined in *.obj 的问题额解决方法
- Ubuntu "肉鸡" 记
- MPMoviePlayerController 电影播放器—IOS开发
- 并查集 - 1611 The Suspects
- Unity 围住神经猫
- Canon LBP 2900 Mac 10.11 驱动安装
- C# : ADO.NET 读取 Access mdb
- MySQL 调优/优化的 100 个建议