0

我想在“/etc”中新建一个文件夹,如下

/etc
----/shared
-----------example.txt

我在自定义 yocto 层中创建了一个新配方。配方位于一个文件夹下meta-own\recipes-own\shared,其结构recipes-own为:

.
├── files
│   ├── example.txt
└── shared_configuration_1.0.bb

配方是:

DESCRIPTION = "Script for copying example configurations"
SUMMARY = "example configurations"
LICENSE = "CLOSED"

SRC_URI = "file://example.txt"

do_install_append() {
    install -dm644 ${D}${sysconfdir}/shared
    install -m 0755 ${WORKDIR}/example.txt ${D}${sysconfdir}/example.txt

FILES_${PN} = "\
    ${sysconfdir} \
"

当我将食谱添加到我的recipes-core/images/example-image.bb

IMAGE_INSTALL_append = " \
    bash \
    util-linux \
    shared_configuration \
    "

它总是输出我:

ERROR: Nothing RPROVIDES

但是如果我不将它放在示例图像中,它会运行但不会复制文件。

4

1 回答 1

3

尝试将 shared_configuration 重命名为 shared-configuration 因为下划线后面应该是配方的版本。

[编辑]

.
├── files
│   ├── example.txt
└── shared-configuration_1.0.bb

IMAGE_INSTALL_append = " \
    bash \
    util-linux \
    shared-configuration \
    "

和食谱:

DESCRIPTION = "Script for copying example configurations"
SUMMARY = "example configurations"
LICENSE = "CLOSED"

SRC_URI = "file://example.txt"

do_install_append() {
    install -d 644 ${D}${sysconfdir}
    install -m 0755 ${WORKDIR}/example.txt ${D}${sysconfdir}

FILES_${PN} = "${sysconfdir}"
于 2020-03-04T08:54:58.790 回答