簡體   English   中英

Yocto 圖像未將文件添加到 rootfs

[英]Yocto image is not adding the files to rootfs

我想在“/etc”中創建一個新文件夾,如下

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

我在自定義 yocto 層中創建了一個新配方。 配方在文件夾meta-own\\recipes-own\\sharedrecipes-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

但是如果我不把它放在示例圖像中,它會運行但文件不會被復制。

嘗試將 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}"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM