linux - Bitbake/Yocto 如何使用旧版本的旧版本下载来减少 Linux 构建时间
问题描述
嗨,我正在使用 yacto/bitbake 为 rasberry pi3 构建 Linux,有没有办法重新使用为先前构建下载的源代码/代码以减少整体下载时间,以便在我们创建新构建目录时不会再次获取它们。我知道有一个SSTATE_DIR
变量local.conf
可以根据先前构建的输出加速构建,但如果可能的话,我正在寻找减少下载时间的方法。
解决方案
与 for几乎相同SSTATE_DIR
- 您需要在. 以下是一些文档:local.conf
local.conf
#
# Where to place downloads
#
# During a first build the system will download many different source code tarballs
# from various upstream projects. This can take a while, particularly if your network
# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
# can preserve this directory to speed up this part of subsequent builds. This directory
# is safe to share between multiple builds on the same machine too.
#
# The default is a 'downloads' directory under TOPDIR which is the build directory.
#
DL_DIR = .....
您可以使用其他 Yocto 全局变量,DL_DIR
例如TOPDIR。我的DL_DIR
长相是这样的
DL_DIR = "${TOPDIR}/../downloads"
所以目录downloads
位于build
目录旁边。
更重要的是,如果您在同一台 PC 上有多个 Yocto 项目的克隆,您可以DL_DIR
在它们之间共享。指定一些符号链接的路径DL_DIR
也可以稳定工作......以防万一)
推荐阅读
- javascript - 如何重命名猫鼬中的字段?
- php - 非法偏移类型(查看:/code/resources/views/emergencia/nuevo.blade.php)
- python - “将数据聚合到每周级别,以便每个产品周组合有一行”是什么意思,我如何使用 python(熊猫)来做到这一点
- mosquitto - mosquitto_pub 配置文件格式
- python - 使用正则表达式的 Python Glob 原始目录
- flutter - Flutter 中的 StatefulBuilder VS StatefulWidget - 性能
- python - 如何在字节字符串中的表达式'\ xb'之后提取数值
- flutter - 如何最好地在 for-in 循环中进行空检查?
- python - 寻找大型稀疏矩阵的最小特征向量,在 SciPy 中比在 Octave 中慢 100 倍以上
- google-cloud-platform - 在 Windows 10 上安装 Google Cloud SDK 失败