[

https://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html

](https://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html)![image.png](https://cdn.nlark.com/yuque/0/2021/png/2793138/1635649807945-5d9953bf-5cc6-40ef-91fb-dec07cdf37d8.png#clientId=u85cc0089-3e42-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=768&id=ufd73e44e&margin=%5Bobject%20Object%5D&name=image.png&originHeight=768&originWidth=1563&originalType=binary&ratio=1&rotation=0&showTitle=false&size=109293&status=done&style=none&taskId=ub64537b0-bceb-4242-a39e-ebc4b31b9b0&title=&width=1563)[

](https://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html)

环境配置

说明:
当我们从google网站上下载到最新的repo脚本文件后,运行repo init来初始化一个仓库,需要添加一些额外的参数例如,-u 指定从哪个仓库下载,-b指定分支,-m指定manifest文件名称,-g指定项目组。

1.安装repo

2.安装toradex-manifest
imx8 更新5.4最新版本
repo init -u https://git.toradex.com/toradex-manifest.git -b refs/tags/5.4.0-devel-202109 -m tdxref/default.xml
repo在~/bin/repo
~/bin/repo init -u https://git.toradex.com/toradex-manifest.git -b refs/tags/5.4.0-devel-202109 -m tdxref/default.xml
3.同步信息
repo sync
或 repo sync -j4 —fail-fast

https://git.toradex.com/cgit/toradex-manifest.git/refs/tags

oe
http://cgit.openembedded.org/meta-openembedded/refs/heads

编译优化

build/conf/local.conf
ACCEPT_FSL_EULA = “1”

LICENSE_FLAGS_WHITELIST = “commercial”
# 指定多核编译下载
BB_NUMBER_THREADS = ‘7’
PARALLEL_MAKE = ‘-j 7’
#check connectivity using google
CONNECTIVITY_CHECK_URIS = “https://www.google.com/
#skip connectivity checks
CONNECTIVITY_CHECK_URIS = “”
# 自定义安装到文件系统的工具
#MAGE_INSTALL_append = “ gdb”

相关链接

版本更新对比
https://developer.toradex.cn/software/linux/linux-software/release-details#roadmap-1

toradex 更新版本
https://git.toradex.com/cgit/toradex-manifest.git/refs/tags

环境构建
https://developer.toradex.com/knowledge-base/board-support-package/openembedded-core

目标板型号
https://developer.toradex.com/products/apalis-som-family/modules/apalis-imx8

toradex 产品选型
https://developer.toradex.com/products
image.png
yocto 参考
https://www.yoctoproject.org/
https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html

bianyi uboot & kernel
https://developer.toradex.cn/knowledge-base/build-u-boot-and-linux-kernel-from-source-code#tab-64-bit-arm

问题

Git Repo 镜像使用帮助

https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/

repo init -u git@git.iris-view.com:systems/project/iris/manifest.git -b develop
Command ‘repo’ not found, but can be installed with:
sudo apt install repo

解决:/.bashrc 配置文件有问题
export PATH=/home/username:$PATH

repo下载
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo
repo更新
repo的运行过程中会尝试访问官方的git源更新自己,如果想使用tuna的镜像源进行更新,可以将如下内容复制到你的~/.bashrc里 或 sudo vim ~/.zshrc

export REPO_URL=’https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/‘
export PATH=/home/username:$PATH

并重启终端模拟器。

下载代码
mkdir aaa
cd aaa
repo init -u git@git.xxxxxxxxx.com:systems/project/aaa/manifest.git -b develop
之后在aaa文件夹里:repo sync 就把代码下来了。


repo init -u http://git.toradex.com/toradex-bsp-platform.git -b LinuxImageV2.8
Downloading Repo source from https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/

fatal: Cannot get https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/clone.bundle

fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)
fatal: cloning the git-repo repository failed, will remove ‘.repo/repo’

Cannot get clone.bundle 错误解决
使用repo时,由于**会出现下面错误
fatal: Cannot get
换成清华和中科大的源都没有这个,此时最简单的办法其实是在使用的加上—no-clone-bundle,比如:
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest —no-clone-bundle
因为我们自己知道repo是最新的。

yocto增加多线程加快下载速度

修改build-dir/conf/local.conf配置文件
BB_NUMBER_THREADS =’8’ (修改编译线程的数量,改为多线程)
PARALLEL_MAKE =’-j 8’(修改cpu核的数量,根据实际情况修改,不宜超过电脑cpu核数量)

yocto编译do fetch fail

image.png

image.png
1、找到do_fetch失败安装包对应的xx.bb文件,根据bb文件找到下载地址 https://github.com/ssvb/cpuburn-arm。直接去github网站下载对应的开发包
2、在xx.bb文件的同级目录下创建files目录;
3、把下载得到的文件拷贝到files目录下解压;
4、修改bb文件,SRC_URI值为

SRC_URI = “file://cpuburn-arm”
#SRCREV = “c604fa0965c73e430eebd5fa780180beb9a71b44”
#PV = “1.2.0”
S = “${WORKDIR}/cpuburn-arm”

bitbake cpuburn-a53 -c compile

repo init 错误SyntaxError:invalid syntax

image.png
mkdir ~/bin ~~
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
PATH=${PATH}:~/bin~~
python3 ~/bin/repo init -u git@xxx/xxx.git[

](https://blog.csdn.net/amd1217/article/details/107565466)

Sometimes BitBake fails because it can’t find https://www.example.com.
This URL is used to run the network connectivity sanity test against http, https and git sources for Poky derived distributions.
This is the typical error

ERROR: OE-core’s config sanity checker detected a potential misconfiguration.

Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: Fetcher failure for URL: ‘https://www.example.com/‘. URL https://www.example.com/ doesn’t work. Please ensure your host’s network is configured correctly, or set BB_NO_NETWORK = “1” to disable network access if all required sources are on local disk.
Is it possible to solve this issue adding the following line in local.conf
#skip connectivity checks CONNECTIVITY_CHECK_URIS = “”
or replacing the default URL using google.com
#check connectivity using google CONNECTIVITY_CHECK_URIS = “https://www.google.com/
image.png

ERROR: Task do_fetchall does not exist for target tdx-reference-minimal-image (tdx-reference-minimal-image.bb:do_fetchall). Close matches:

do_fetch
ERROR: Command execution failed: 1

There was a change on the latest Poky releases where the way the commands are handled.
$ bitbake –c fetchall
Was deprecated in favor of:
$ bitbake —runall=fetch
So please try using this command instead.[

](https://blog.csdn.net/amd1217/article/details/107565466)