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

2024-06-09 17:28
文章标签 介绍 变量 base yocto workdir

本文主要是介绍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 other than the default, you can uncomment and edit the following statement in the conf/local.conf file in the Source Directory:

#TMPDIR = "${TOPDIR}/tmp"

这种情况下的一个使用示例是将 TMPDIR 设置为不使用 NFS 的本地磁盘,同时让构建目录使用 NFS。

TMPDIR 使用的文件系统必须具有标准的文件系统语义(即混合大小写文件是唯一的、POSIX 文件锁定和持久性 inodes)。由于 NFS 的各种问题和某些实现中的错误,NFS 无法满足这一最低要求。因此,TMPDIR 不能在 NFS 上运行。

An example use for this scenario is to set TMPDIR to a local disk, which does not use NFS, while having the Build Directory use NFS.

The filesystem used by TMPDIR must have standard filesystem semantics (i.e. mixed-case files are unique, POSIX file locking, and persistent inodes). Due to various issues with NFS and bugs in some implementations, NFS does not meet this minimum requirement. Consequently, TMPDIR cannot be on NFS.

On my machine:

$ bitbake -e kbw-mod | grep ^TMPDIR=

TMPDIR="/home/myname/imx93-yocto-bsp/build/tmp/"

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

WORKDIR

在 Yocto 中,${WORKDIR} 是一个环境变量,表示特定配方在联编过程中的工作目录。它本质上是一个临时目录,Yocto 在此解压和准备源文件、应用补丁,并执行与构建软件包或组件相关的各种任务。

${WORKDIR}: 此变量指向配方的工作目录。通常位于 Yocto 构建环境的 tmp 目录中。

In Yocto, ${WORKDIR} is an environment variable that represents the working directory of a particular recipe during the build process. It's essentially a temporary directory where Yocto unpacks and prepares source files, applies patches, and performs various tasks related to building a package or component.

${WORKDIR}: This variable points to the working directory for the recipe. It's typically located within the tmp directory of your Yocto build environment.

${WORKDIR} 的默认值定义在 bitbake 变量中。但你可以在配方中修改它。它指向 bitbake 解压软件包的目录

你可以从 bitbake 环境中获取 ${WORKDIR} 的值:

The default value of ${WORKDIR} is defined in bitbake variables. But you can change it in the recipe. It points toward the directory where bitbake unpacks the package.

You can get the value of ${WORKDIR} from the bitbake environment:

bitbake -e <recipe-name> | grep ^WORKDIR=

官方文档:

OpenEmbedded 构建系统构建配方的工作目录路径名。该目录位于 TMPDIR 目录结构中,与正在构建的配方和构建配方的系统相关。

The pathname of the work directory in which the OpenEmbedded build system builds a recipe. This directory is located within the TMPDIR directory structure and is specific to the recipe being built and the system for which it is being built.

The WORKDIR directory is defined as follows:

${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}

The actual directory depends on several things:

* TMPDIR: The top-level build output directory

* MULTIMACH_TARGET_SYS: The target system identifier

* PN: The recipe name

* EXTENDPE: The epoch — if PE is not specified, which is usually the case for most recipes, then EXTENDPE is blank.

* PV: The recipe version

* PR: The recipe revision

例如,假设源代码目录的顶级文件夹名为 poky,默认编译目录为 poky/build,目标系统为 qemux86-poky-linux。此外,假设你的配方名为 foo_1.3.0-r0.bb。在这种情况下,编译系统用来编译软件包的工作目录如下:

As an example, assume a Source Directory top-level folder name poky, a default Build Directory at poky/build, and a qemux86-poky-linux machine target system. Furthermore, suppose your recipe is named foo_1.3.0-r0.bb. In this case, the work directory the build system uses to build the package would be as follows:

poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0

On my machine:

$ bitbake -e recipe-name | grep ^WORKDIR=

WORKDIR="/home/myname/imx93-yocto-bsp/build/tmp/work/target-sys-name/recipe-name/0.1-r0"

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

D

目标目录。do_install 任务安装组件的构建目录位置。该位置默认为:

The destination directory. The location in the Build Directory where components are installed by the do_install task. This location defaults to:

${WORKDIR}/image

Example:

$ bitbake -e <recipe-name> | grep ^D=

D="/home/myname/imx93-yocto-bsp/build/tmp/work/target-sys-name/recipe-name/0.1-r0/image"

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

TOPDIR

指向构建目录。BitBake 会自动设置此变量。

Points to the build directory. BitBake automatically sets this variable.

当前最新的bitbake版本是2.8。

6 Variables Glossary — Bitbake dev documentation

参考:

12 Variables Glossary — The Yocto Project ® 5.0.1 documentation

12 Variables Glossary

这篇关于Yocto - 变量介绍:BASE_WORKDIR、WORKDIR和D的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1045820

相关文章

揭秘未来艺术:AI绘画工具全面介绍

📑前言 随着科技的飞速发展,人工智能(AI)已经逐渐渗透到我们生活的方方面面。在艺术创作领域,AI技术同样展现出了其独特的魅力。今天,我们就来一起探索这个神秘而引人入胜的领域,深入了解AI绘画工具的奥秘及其为艺术创作带来的革命性变革。 一、AI绘画工具的崛起 1.1 颠覆传统绘画模式 在过去,绘画是艺术家们通过手中的画笔,蘸取颜料,在画布上自由挥洒的创造性过程。然而,随着AI绘画工

C# 中变量未赋值能用吗,各种类型的初始值是什么

对于一个局部变量,如果未赋值,是不能使用的 对于属性,未赋值,也能使用有系统默认值,默认值如下: 对于 int 类型,默认值是 0;对于 int? 类型,默认值是 null;对于 bool 类型,默认值是 false;对于 bool? 类型,默认值是 null;对于 string 类型,默认值是 null;对于 string? 类型,哈哈,没有这种写法,会出错;对于 DateTime 类型,默

Javascript高级程序设计(第四版)--学习记录之变量、内存

原始值与引用值 原始值:简单的数据即基础数据类型,按值访问。 引用值:由多个值构成的对象即复杂数据类型,按引用访问。 动态属性 对于引用值而言,可以随时添加、修改和删除其属性和方法。 let person = new Object();person.name = 'Jason';person.age = 42;console.log(person.name,person.age);//'J

20.Spring5注解介绍

1.配置组件 Configure Components 注解名称说明@Configuration把一个类作为一个loC容 器 ,它的某个方法头上如果注册7@Bean , 就会作为这个Spring容器中的Bean@ComponentScan在配置类上添加@ComponentScan注解。该注解默认会扫描该类所在的包下所有的配置类,相当于之前的 <context:component-scan>@Sc

js小题:通过字符串执行同名变量怎么做

在JavaScript中,你不能直接使用一个字符串来直接引用一个变量,因为JavaScript是一种静态类型语言(尽管它的类型在运行时可以变化),变量的名字在编译时就被确定了。但是,有几种方法可以实现类似的功能: 使用对象(或Map)来存储变量: 你可以使用一个对象来存储你的变量,然后使用字符串作为键来访问这些变量。 let myVars = { 'var1': 'Hello', 'var

C++标准模板库STL介绍

STL的六大组成部分 STL(Standard Template Library)是 C++ 标准库中的一个重要组成部分,提供了丰富的通用数据结构和算法,使得 C++ 编程变得更加高效和方便。STL 包括了 6 大类组件,分别是算法(Algorithm)、容器(Container)、空间分配器(Allocator)、迭代器(Iterator)、函数对象(Functor)、适配器(Adapter)

一二三应用开发平台应用开发示例(4)——视图类型介绍以及新增、修改、查看视图配置

调整上级属性类型 前面为了快速展示平台的低代码配置功能,将实体文件夹的数据模型上级属性的数据类型暂时配置为文本类型,现在我们调整下,将其数据类型调整为实体,如下图所示: 数据类型需要选择实体,并在实体选择框中选择自身“文件夹” 这时候,再点击生成代码,平台会报错,提示“实体【文件夹】未设置主参照视图”。这是因为文件夹选择的功能页面,同样是基于配置产生的,因为视图我们还没有配置,所以会报错。

49-1 内网渗透 - Bypass UAC介绍

一、Bypass UAC         用户账户控制(UAC)是Windows操作系统的一种安全机制,旨在防止未经授权的应用程序自动安装并防止非授权修改系统设置。它确保应用程序和任务通常在非管理员账户的安全上下文中运行,除非明确需要管理员权限,用户才会被提示确认。         对于非RID 500的管理员用户(除了内置的Administrator账户),当他们登录时,系统会为其分配两个访

okhttp3的详细介绍

这篇文章说下OkHttp的基本用法,是最新的3哦,如果你曾经在网上搜索OkHttp怎么使用发现有些类没有了可能是因为人家说的是2。首先说下OkHttp3是Java和Android都能用,Android还有一个著名网络库叫Volley,那个只有Android能用。导入自己到入jar包,别漏了okio:okhttp-3.3.0.jarokio-1.8.0.jarmaven方式:<dependen

Retrofit详细介绍

转载请标明出处:http://blog.csdn.net/xx326664162/article/details/51910837 文章出自:薛瑄的博客 你也可以查看我的其他同类文章,也会让你有一定的收货! 一、Retrofit 是什么? Retrofit is a type-safe HTTP client for Android and java. Retrofit 是与 Web 服务器提