Yocto - 变量介绍:BASE_WORKDIR、WORKDIR和D

BASE_WORKDIR

指向所有配方的工作目录根目录。默认值为"${TMPDIR}/work"。

Points to the base of the work directory for all recipes. The default value is “${TMPDIR}/work”.

$ bitbake -e <recipe-name>| grep ^BASE_WORKDIR

BASE_WORKDIR="/home/myname/imx93-yocto-bsp/build/tmp/work"

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 

TMPDIR

该变量是 OpenEmbedded 联编系统用于所有联编输出和中间文件(共享状态缓存除外)的基本目录。默认情况下,TMPDIR 变量指向构建目录中的 tmp。

如果要在默认位置之外的其他位置建立此目录,可以取消注释并编辑源代码目录中 conf/local.conf 文件中的以下语句:

This variable is the base directory the OpenEmbedded build system uses for all build output and intermediate files (other than the shared state cache). By default, the TMPDIR variable points to tmp within the Build Directory.

If you want to establish this directory in a location

ERROR: mvpu-config-1.0-r0 do_fetch: Fetcher failure for URL: 'git://../../yocto-aiv/src/multimedia/mvpu-si/mvpu.git;protocol=file'. Please set a valid SRCREV for url ['SRCREV_default_pn-mvpu-config', 'SRCREV_default', 'SRCREV_pn-mvpu-config', 'SRCREV'] (possible key names are git://../../yocto-aiv/src/multimedia/mvpu-si/mvpu.git;protocol=file, or use a ;rev=X URL parameter) ERROR: Logfile of failure stored in: /home/terry/ambolie_8136/build/tmp/work/aarch64-poky-linux/mvpu-config/1.0-r0/temp/log.do_fetch.82117 ERROR: Task (/home/terry/ambolie_8136/meta/poky/../meta-mediatek/recipes-multimedia/mvpu-si/mvpu-config.bb:do_fetch) failed with exit code '1' ERROR: linux-mtk-extension-5.10-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus,guid=0d199c4b18b164b4f9e2ed8268c432ac"; export SSH_AGENT_PID="2018"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/terry/ambolie_8136/meta/poky/scripts:/home/terry/ambolie_8136/build/tmp/work/aiv8136m1_emmc-poky-linux/linux-mtk-extension/5.10-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/terry/ambolie_8136/build/tmp/work/aiv8136m1_emmc-poky-linux/linux-mtk-extension/5.10-r0/recipe-sysroot/usr/bin/crossscripts:/home/terry/ambolie_8136/build/tmp/work/aiv8136m1_emmc-poky-linux/linux-mtk-extension/5.10-r0/recipe-sysroot-native/usr/sbin:/home/terry/ambolie_8136/build/tmp/work/aiv8136m1_emmc-poky-linux/linux-mtk-extension/5.10-r0/recipe-sysroot-native/usr/bin:/home/terry/ambolie_8136/build/tmp/work/aiv8136m1_emmc-poky-linux/linux-mtk-extension/5.10-r0/recipe-sysroot-native/sbin:/home/terry/ambolie_8136/build/tmp/work/aiv8136m1_emmc-poky-linux/linux-mtk-extension/5.10-r0/recipe-sysroot-native/bin:/home/terry/ambolie_8136/meta/poky/bitbake/bin:/home/terry/ambolie_8136/build/tmp/hosttools"; export HOME="/home/terry"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror ../../yocto-aiv/src/kernel/linux/v5.10.git /home/terry/ambolie_8136/build/../downloads/git2/.....yocto-aiv.src.kernel.linux.v5.10.git --progress failed with exit code 128, output: fatal: repository '../../yocto-aiv/src/kernel/linux/v5.10.git' does not exist ERROR: linux-mtk-extension-5.10-r0 do_fetch: Fetcher failure for URL: 'git://../../yocto-aiv/src/kernel/linux/v5.10.git;protocol=file;rev=8346487f13d675d6205a9655db9964285b757f1f;branch=aiv-release-hardknott.mp2'. Unable to fetch URL from any source. ERROR: Logfile of failure stored in: /home/terry/ambolie_8136/build/tmp/work/aiv8136m1_emmc-poky-linux/linux-mtk-extension/5.10-r0/temp/log.do_fetch.81617 ERROR: Task (/home/terry/ambolie_8136/meta/poky/../meta-mediatek-gpl/recipes-kernel/linux/linux-mtk-extension_5.10.bb:do_fetch) failed with exit code '1'
最新发布
09-16
### 解决 do_fetch 阶段 Fetcher failure 问题 #### 检查网络连接 网络问题可能导致无法从远程仓库获取代码。需要确保网络连接正常,能够访问相关的 Git 仓库。可以尝试使用 `ping` 命令测试网络连通性,例如: ```bash ping git.example.com ``` #### 检查 Git 仓库地址 确认 `mvpu-config` `linux-mtk-extension` 的 Git 仓库地址是否正确。这些地址通常在对应的 `.bb` 文件中指定。如果仓库地址有误,会出现 `git仓库不存在` 的错误。可以打开相应的 `.bb` 文件,检查 `SRC_URI` 变量的值,确保其指向正确的仓库地址。例如: ```python SRC_URI = "git://git.example.com/mvpu-config.git;protocol=ssh" ``` #### 设置有效 SRCREV `SRCREV` 用于指定要获取的代码版本。如果 `SRCREV` 指定的版本不存在或不可访问,会导致 `do_fetch` 失败。可以按照以下步骤设置有效 `SRCREV`: 1. 切换到对应的工作目录,例如 `mvpu-config` 或 `linux-mtk-extension` 的目录。 2. 使用 `git branch -a` 显示所有分支,找到合适的分支,例如 `main` 分支: ```bash cd mvpu-config git branch -a git checkout main ``` 3. 获取当前分支的 `SRCREV`: ```bash git rev-parse HEAD ``` 4. 将获取到的 `SRCREV` 值设置到对应的 `.bb` 文件中,例如: ```python SRCREV = "123456789abcdef" ``` #### 使用本地文件替代远程仓库 如果远程仓库无法访问,可以考虑使用本地文件进行 `do_fetch`。具体步骤如下: 1. 将 `mvpu-config` `linux-mtk-extension` 的代码克隆到本地。 2. 将克隆的代码文件夹放在 `.bb` 文件相同目录下用于存放文件的目录。 3. 修改 `.bb` 文件的 `SRC_URI` 变量,将其指向本地文件路径,例如: ```python SRC_URI = "file://mvpu-config" ``` ### 示例代码 以下是一个简单的 `.bb` 文件示例,展示了如何设置 `SRC_URI` `SRCREV`: ```python SUMMARY = "mvpu-config recipe" SECTION = "base" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=4d92cd3a9d52af9e76379de2b4f0639" SRC_URI = "git://git.example.com/mvpu-config.git;protocol=ssh" SRCREV = "123456789abcdef" S = "${WORKDIR}/git" ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

夜流冰

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

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

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

打赏作者

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

抵扣说明:

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

余额充值