目录:
Freescale Yocto Project
• Linux distributed build system
• Replacement for LTIB
• Higher integration with community
• Flexible release targets
安装环境:
Vmware Workstation 14 Pro
Ubuntu 16.04 LTS(注:磁盘空间不少于120G)
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev
$ 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
Ubuntu 12.04 安装uboot-mkimage:
$ sudo apt-get install uboot-mkimage
Ubuntu 14.04 安装u-boot-tools:
$ sudo apt-get install u-boot-tools
$ mkdir ~/bin
// 若已存在则无需创建
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
// 需要访问谷歌,所以需要翻墙,不能翻墙则执行这一条命令,如下:
$ curl http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo > /opt/yocto/bin/repo
$ chmod a+x ~/bin/repo
将以下指令添加到.bashrc中
确保~/bin
包含在PATH
中
export PATH=~/bin:$PATH
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list
$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml
// 需访问谷歌,改为执行这一条命令,如下:
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-4.1-krogoth --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable
// 若在repo初始化过程中发生错误,则删除.repo目录,重新执行repo初始化命令即可。
$ repo sync
命令格式:
$ DISTRO=<distro name> MACHINE=<machine name> source fsl-setup-release.sh -b <build dir>
DISTRO有四种:
• fsl-imx-x11
• fsl-imx-wayland
• fsl-imx-xwayland
• fsl-imx-fb
MACHINE有以下:
• imx6qpsabreauto
• imx6qpsabresd
• imx6ulevk
• imx6ull14x14evk
• imx6ull9x9evk
• imx6dlsabreauto
• imx6dlsabresd
• imx6qsabreauto
• imx6qsabresd
• imx6slevk
• imx6solosabreauto
• imx6solosabresd
• imx6sxsabresd
• imx6sxsabreauto
• imx6sllevk
• imx7dsabresd
• imx7ulpevk
• imx8mqevk
这里采用以下命令:
$ DISTRO=fsl-imx-fb MACHINE=imx6qsabresd source fsl-setup-release.sh -b build
$ bitbake fsl-image-qt5
编译过程很长,一天左右。若中途出错可以ctrl+c
中断后程序执行$ bitbake fsl-image-qt5
命令,
若编译过程中关掉了终端,那么重新打开终端进入fsl-release-bsp
目录后只需要执行以下命令就可以重新进入编译环境:
$ source setup-environment build
$ bitbake meta-toolchain-qt5
编译完成后会在/opt/yocto/fsl-release-bsp/build/tmp/deploy/sdk
目录下生成文件fsl-imx-fb-glibc-i686-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.0.0.sh
执行如下命令安装qt5的交叉编译工具链:
$ cd /opt/yocto/fsl-release-bsp/build/tmp/deploy/sdk
$ ./fsl-imx-fb-glibc-i686-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.0.0.sh
$ bitbake meta-toolchain
编译完成后会在/opt/yocto/fsl-release-bsp/build/tmp/deploy/sdk
目录下生成.sh
文件
同样执行.sh
文件安装gcc的交叉编译工具链。