为什么要搭建这个环境呢,因为它可以直接编译出嵌入式所需要的uboot kernel 文件系统等,也是NXP官方文档的做法。
注意:一定要用普通用户,不要使用root用户, 使用ubuntu14.04,我用18.04报错。注意虚拟机要至少分配100G,后面编译完后硬盘占用了76G。
在官网下载文件fsl_yocto-L4.1.15_2.0.0-ga.tar,里面有一个文件《i.MX_BSP_Porting_Guide》介绍如何一步步为IMAX6移植UBOOT,在文档的开头让查看《i.MX Yocto Project User's Guide》
1.sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat libsdl1.2-dev
2.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
3.sudo apt-get install u-boot-tools
4.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
5.Add the following line to the .bashrc file to ensure that the ~/bin folder is in your PATH variable.
export PATH=~/bin:$PATH
6. mkdir fsl-release-bsp
cd fsl-release-bsp
repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-4.1-krogoth
repo sync
7. DISTRO=fsl-imx-x11 MACHINE=imx6dlsabreauto source fsl-setup-release.sh -b ./buildDir
8. bitbake meta-toolchain-qt5
编译总共用了十多个小时,而且我在家里试过网络不好会更加的慢,真是受不了。这里说all successded应该是成功了。