【问题标题】:Yocto image is not adding the files to rootfsYocto 映像未将文件添加到 rootfs
【发布时间】:2020-03-04 17:18:28
【问题描述】:

我想在“/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

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

【问题讨论】:

    标签: embedded-linux yocto


    【解决方案1】:

    尝试将 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}"
    

    【讨论】:

    • 这是菜谱的命名。使用破折号代替下划线。谢谢。
    猜你喜欢
    • 2018-06-28
    • 1970-01-01
    • 2021-10-31
    • 2018-02-07
    • 2018-09-05
    • 1970-01-01
    • 1970-01-01
    • 2020-06-22
    • 2022-01-21
    相关资源
    最近更新 更多