Yocto 向bitbake配方添加额外文件

Yocto 向bitbake配方添加额外文件,yocto,bitbake,Yocto,Bitbake,我正在尝试创建一个配方,将.jar添加到目标的/home/root 我的图层具有以下结构: bernardo@bernardo-ThinkCentre-Edge72:~/yocto/genericx86-64-rocko-18.0.0/build$ tree ../meta-datavision/recipes-devtools/horus/ ../meta-datavision/recipes-devtools/horus/ ├── horus-1.3 │   ├── application.

我正在尝试创建一个配方,将.jar添加到目标的/home/root

我的图层具有以下结构:

bernardo@bernardo-ThinkCentre-Edge72:~/yocto/genericx86-64-rocko-18.0.0/build$ tree ../meta-datavision/recipes-devtools/horus/
../meta-datavision/recipes-devtools/horus/
├── horus-1.3
│   ├── application.properties
│   └── horus-1.3.0.jar
└── horus_1.3.bb

1 directory, 3 files
这是我的食谱(horus_1.3.bb):

但是,当我尝试构建时,我得到一个
无此类文件或目录的错误:

bernardo@bernardo-ThinkCentre-Edge72:~/yocto/genericx86-64-rocko-18.0.0/build$ bitbake core-image-sato
WARNING: Host distribution "ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |##################################| Time: 0:00:00
Loaded 2030 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.35.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal-4.8"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "genericx86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "2.4"
TUNE_FEATURES     = "m64 core2"
TARGET_FPU        = ""
meta              
meta-poky         = "<unknown>:<unknown>"
meta-datavision   = "master:fbc80d7199bef45f87762098ae34d199bb3a9765"
meta-yocto-bsp    = "<unknown>:<unknown>"
meta-oe           = "rocko:6e3fc5b8d904d06e3aa77e9ec9968ab37a798188"

Initialising tasks: 100% |#############################| Time: 0:00:16
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: horus-1.3-r0 do_install: Function failed: do_install (log file is located at /home/bernardo/yocto/genericx86-64-rocko-18.0.0/build/tmp/work/core2-64-poky-linux/horus/1.3-r0/temp/log.do_install.8961)
ERROR: Logfile of failure stored in: /home/bernardo/yocto/genericx86-64-rocko-18.0.0/build/tmp/work/core2-64-poky-linux/horus/1.3-r0/temp/log.do_install.8961
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'virtual:native:/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot', 'virtual:native:/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta/recipes-extended/unzip/unzip_6.0.bb:do_populate_sysroot', '/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot', '/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta/recipes-devtools/gcc/gcc-cross_7.2.bb:do_populate_sysroot', '/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta/recipes-devtools/gcc/gcc-runtime_7.2.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['quilt-native', 'pseudo-native', 'unzip-native', 'glibc', 'gcc-cross-x86_64', 'gcc-runtime', 'linux-libc-headers', 'xz-native', 'binutils-cross-x86_64', 'automake-native', 'libmpc-native', 'mpfr-native', 'texinfo-dummy-native', 'zlib-native', 'libtool-native', 'gmp-native', 'autoconf-native', 'gnu-config-native', 'libgcc', 'gettext-minimal-native', 'bison-native', 'flex-native', 'm4-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| install: cannot stat ‘/home/bernardo/yocto/genericx86-64-rocko-18.0.0/build/tmp/work/core2-64-poky-linux/horus/1.3-r0/horus-1.3.0.jar’: No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_install (log file is located at /home/bernardo/yocto/genericx86-64-rocko-18.0.0/build/tmp/work/core2-64-poky-linux/horus/1.3-r0/temp/log.do_install.8961)
ERROR: Task (/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta-datavision/recipes-devtools/horus/horus_1.3.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4462 tasks of which 4461 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta-datavision/recipes-devtools/horus/horus_1.3.bb:do_install
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
bernardo@bernardo-ThinkCentre-Edge72:~/yocto/genericx86-64-rocko-18.0.0/build$bitbake核心映像佐藤
警告:主机发行版“ubuntu-14.04”尚未使用此版本的构建系统进行验证;你可能会经历意想不到的失败。建议您使用经过测试的发行版。
加载缓存:100%时间:00:00
已从依赖项缓存加载2030个条目。
注意:解决任何缺少的任务队列依赖项
生成配置:
BB_VERSION=“1.35.0”
BUILD_SYS=“x86_64-linux”
NATIVELSBSTRING=“通用-4.8”
TARGET_SYS=“x86_64-poky-linux”
MACHINE=“genericx86-64”
DISTRO=“poky”
发行版版本=“2.4”
TUNE_FEATURES=“m64 core2”
TARGET_FPU=“”
元
meta poky=“:”
meta-datavision=“主机:fbc80d7199bef45f87762098ae34d199bb3a9765”
meta yocto bsp=“:”
meta oe=“rocko:6e3fc5b8d904d06e3aa77e9ec9968ab37a798188”
初始化任务:100%时间:16:00
注意:执行SetScene任务
注意:执行运行队列任务
错误:horus-1.3-r0 do_安装:功能失败:do_安装(日志文件位于/home/bernardo/yocto/genericx86-64-rocko-18.0.0/build/tmp/work/core2-64-poky-linux/horus/1.3-r0/temp/log.do_安装.8961)
错误:故障日志文件存储在:/home/bernardo/yocto/genericx86-64-rocko-18.0.0/build/tmp/work/core2-64-poky-linux/horus/1.3-r0/temp/log.do_install.8961中
日志数据如下:
|调试:执行python函数extend\u recipe\u sysroot
|注意:直接依赖项是['/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta/recipes devtools/could/coult-native\u sysroot'.bb:do_populate\u,virtual:native:/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta/recipes devtools/pseudo/pseudo\u 1.8.2.bb:do_populated\u sysroot','virtual:native:native:/home/bernardo/yocto/generic/generic/64-rocko-18.0.0_6.0.bb:do_populate_sysroot','/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta/recipes core/glibc/glibc_2.26.bb:do_populate_sysroot','/home/bernardo/yocto/yocto/genericx86-64-rocko-18.0.0/meta/recipes devtools/gcc/gcc/gcc-cross_7.2_填充_sysroot']
|注意:已安装到sysroot:[]
|注意:跳过,因为sysroot中已经存在:['Cutter-native'、'pseudo-native'、'unzip-native'、'glibc'、'gcc-cross-x86_64'、'gcc-runtime'、'linux-libc headers'、'xz-native'、'binutils-cross-x86_64'、'automake-native'、'libmpc-native'、'mpfr-native'、'texinfo-dummy-native'、'zlibtool-native'、'gmp-native'、'“,”野牛本地“,”flex本地“,”m4本地“]
|调试:Python函数extend\u recipe\u sysroot已完成
|调试:执行shell函数do\u install
|安装:无法统计“/home/bernardo/yocto/genericx86-64-rocko-18.0.0/build/tmp/work/core2-64-poky-linux/horus/1.3-r0/horus-1.3.0.jar”:没有这样的文件或目录
|警告:从shell命令中退出代码1。
|错误:函数失败:do_安装(日志文件位于/home/bernardo/yocto/genericx86-64-rocko-18.0.0/build/tmp/work/core2-64-poky-linux/horus/1.3-r0/temp/log.do_安装.8961)
错误:任务(/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta-datavision/recipes devtools/horus/horus_1.3.bb:do_install)失败,退出代码为“1”
注意:任务摘要:尝试了4462项任务,其中4461项不需要重新运行,1项失败。
摘要:1任务失败:
/home/bernardo/yocto/genericx86-64-rocko-18.0.0/meta-datavision/recipes-devtools/horus/horus\u 1.3.bb:是否安装
摘要:显示了1条警告消息。
摘要:显示1条错误消息,返回非零退出代码。
我的食谱少了什么?? 非常感谢您的帮助。

谢谢大家的提示! 在配方上做了一些调整后,我终于让它起作用了。 添加
;unpack=0
确实有帮助

SUMMARY = "Horus Vizentec"
DESCRIPTION = "Horus Vizentec"
LICENSE = "CLOSED"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" 
FILES_${PN} += "${datadir}/java"

SRC_URI += "file://horus-1.3.0.jar;unpack=0"
SRC_URI += "file://application.properties"

do_install(){
        install -m 0755 -d ${D}/usr/share/java
        install -m 0755 ${WORKDIR}/horus-1.3.0.jar ${D}/usr/share/java
        install -m 0755 ${WORKDIR}/application.properties ${D}/usr/share/java
}

我认为jar文件将被提取,您应该尝试在
之后添加
;unpack=0
file://horus-1.3.0.jar
+1,bitbake尝试处理它看到的每个文件,例如应用.patch,使用defconfig内容为内核创建.config,或者解压存档..jar只是一个使用zip压缩的存档。
SUMMARY = "Horus Vizentec"
DESCRIPTION = "Horus Vizentec"
LICENSE = "CLOSED"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" 
FILES_${PN} += "${datadir}/java"

SRC_URI += "file://horus-1.3.0.jar;unpack=0"
SRC_URI += "file://application.properties"

do_install(){
        install -m 0755 -d ${D}/usr/share/java
        install -m 0755 ${WORKDIR}/horus-1.3.0.jar ${D}/usr/share/java
        install -m 0755 ${WORKDIR}/application.properties ${D}/usr/share/java
}