使用Yocto构建i.MX8 MM

主机需求

因为在Ycoto构建的过程中需要从网络上下载资源包,需要占用大量的磁盘。亲测构建带有Qt5的文件系统需要占用120G+的容量,建议使用有200G以上空闲区域的硬盘。

需要安装的必备软件

sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat desktop-file-utils libgl1-mesa-dev
sudo apt-get install libsdl1.2-dev u-boot-tools libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc
sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++

安装 repo

要是没有配置gti相关的环境,需要先配置git相关的环境。

mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

要是使用上面链接现在失败,请在后文中给出的链接下载。
添加环境变量,只是将环境变量添加到当前目录了。

export PATH=~/bin:$PATH

获取Yocto项目

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.123-2.3.0-8mm_ga.xml
repo sync 

构建Yocto项目

编译配置

DISTRO=<distro name> MACHINE=<machine name> source fsl-setup-release.sh -b <build dir>
  • DISTOM 在 “meta-fsl-bap-release/imx/meta-sdk/conf/distro” 目录下;
  • MACHINE 在 “sources/meta-fsl-bsp-release/imx/meta-bsp/conf/machine” 目录下;
  • -b 参数跟 编译目录。

运行脚本后会跳转到 -b 指定的目录。

相关发布信息在 “/conf/bblayers.conf”文件中。

选择镜像需要构建的镜像

下图是i.MX Yocto 的镜像:
在这里插入图片描述
因为博主需要用到Qt5,这里选择带有Qt5的镜像构建。

bitbake fsl-image-qt5-validation-imx

到此,Yocto开始构建,Yocto构建过程需要在网络上下载大量的资源,这里非常的慢。具体要看自己的电脑配置和网络环境了。

发布了7 篇原创文章 · 获赞 0 · 访问量 93

猜你喜欢

转载自blog.csdn.net/linxuew/article/details/104823001
mm