简体   繁体   English

用于追加文件目录的Yocto / Bitbake路径变量

[英]Yocto/Bitbake Path Variable for Append File Directory

So I am using a .bbappend file in a layer I have created and in that layer I also have some additional local files that I want to install. 因此,我在已创建的层中使用了.bbappend文件,在该层中,我还需要安装一些其他本地文件。

The problem is I am not sure what the Yocto variable is that correctly represents the directory where my bbappend file is located. 问题是我不确定Yocto变量是什么能正确表示bbappend文件所在的目录。 Variables like "THISDIR" end up pointing to the original recipe directory - not the append one in my layer. 像“ THISDIR”这样的变量最终指向原始配方目录,而不是指向我的图层的追加目录。 How can I best do this without putting some type of absolute path? 我如何最好地做到这一点而无需放置某种绝对路径?

Copy your files to present dir where the .bb or .bbappend file is present. 将文件复制到存在.bb.bbappend文件的目录中。 and add follow line hello.bbappend 并添加跟随行hello.bbappend

FILESEXTRAPATHS_prepend := "${THISDIR}:"    
SRC_URI += "file://yourfile"
do_install_append(){
      install -d ${D}/some-dest-dir
      install -m 0644 ${S}/yourfile ${D}/some-dest-dir/
}

here THIS dir means you are telling to bitbake the files are present in the dir where the .bb or .bbappend file is present. 这里THIS DIR意味着你要告诉BitBake的文件存在于其中的目录.bb.bbappend文件存在。

eg: meta-hellolayer example/ 例如:meta-hellolayer示例/
|_ hello.c | _ hello.c
|_ hello.bbappend | _ hello.bbappend

Now the example dir is THIS dir in .bbappend file. 现在示例目录是.bbappend文件中的THIS目录。

Note : Make sure you need to add your layer path(meta-helolayer) to build/conf/bblayer.conf Note :确保您需要将layer path(meta-helolayer)build/conf/bblayer.conf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM