yocto构建文件系统

环境:Ubuntu18.04,硬盘空间200G,内存16G

1、修改vi /etc/hosts文件

在浏览器中输入以下三个链接获取域名对应的IP

https://github.com.ipaddress.com/

https://fastly.net.ipaddress.com/github.global.ssl.fastly.net

https://github.com.ipaddress.com/assets-cdn.github.com

将以下内容添加到hosts文件中

140.82.113.4(链接1中的IP Address) github.com 
199.232.69.194(链接2中的IP Address) github.global.ssl.fastly.net
185.199.108.153(链接3中的IP Address)  assets-cdn.github.com
185.199.109.153(链接3中的IP Address)  assets-cdn.github.com
185.199.110.153(链接3中的IP Address)  assets-cdn.github.com
185.199.111.153(链接3中的IP Address)  assets-cdn.github.com

2、安装依赖包

$ sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev curl python

3、获取repo

$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
$ chmod a+x repo
$ export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'

4、全局配置git

$ git config --global url."https://".insteadof git://
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list

5、获取yocto

$ ./repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-warrior -m imx-4.19.35-1.1.0.xml
$ ./repo sync

6、构建 Yocto 文件系统

DISTRO=fsl-imx-x11 MACHINE=imx6ull14x14evk source fsl-setup-release.sh -b build

DISTRO:发行版类型
• fsl-imx-x11 - X11 graphics are not supported on i.MX 8.
• fsl-imx-wayland - Wayland weston graphics.
• fsl-imx-xwayland - Wayland graphics and X11. X11 applications using EGL are not supported.
• fsl-imx-fb - Frame Buffer graphics - no X11 or Wayland. Frame Buffer is not supported on i.MX 8.

MACHINE:机器类型
• imx6qpsabreauto
• imx6qpsabresd
• imx6ulevk
• imx6ulz14x14evk
• imx6ull14x14evk
• imx6ull9x9evk
• imx6dlsabreauto
• imx6dlsabresd
• imx6qsabreauto
• imx6qsabresd
• imx6slevk
• imx6solosabreauto
• imx6solosabresd
• imx6sxsabresd
• imx6sxsabreauto
• imx6sllevk
• imx7dsabresd
• imx7ulpevk
• imx8qmmek
• imx8qxpmek
• imx8mqevk
• imx8mmevk
• imx8mnevk

-b:指定工程构建输出的目录

7、构建含 Qt 库的根文件系统

bitbake fsl-image-qt5

bitbake <parameter> <component>
<component>: is a desired build package.
<parameter>:
	-c fetch: Fetches if the downloads state is not marked as done.
	-c cleanall: Cleans the entire component build directory. All the changes in the build directory are lost. The rootfs and state of the component are also cleared. The component is also removed from the download directory.
	-c deploy Deploys an image or component to the rootfs.
	-k Continues building components even if a build break occurs.
	-c compile -f: It is not recommended that the source code under the tmp directory is changed directly,but if it is, the Yocto Project might not rebuild it unless this option is used. Use this option to force a recompile after the image is deployed.
	-g: Lists a dependency tree for an image or component.
	-DDD: Turns on debug 3 levels deep. Each D adds another level of debug.

编译完成后在build/tmp/deploy/images/imx6ull14x14evk目录下

8、uboot配置启动方式

请添加图片描述

9、编译失败

编译失败重新编译
$ source setup-environment <build-dir>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

u.意思

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值