loose11
loose11

Reputation: 627

Yocto image is not adding the files to rootfs

I want to create a new folder in "/etc", as following

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

I created a new recipe in a custom yocto layer. The recipe is under a folder meta-own\recipes-own\shared and the structure of recipes-own is:

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

and the recipe is:

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} \
"

When I add the recipe to my recipes-core/images/example-image.bb:

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

it outputs me always:

ERROR: Nothing RPROVIDES

But if I don't place it in the example-image, it is running through but the file is not copied.

Upvotes: 0

Views: 525

Answers (1)

Ninic0c0
Ninic0c0

Reputation: 126

Try to rename shared_configuration to shared-configuration because after the underscore should be the version of the recipe.

[EDIT]

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

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

And the recipe:

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}"

Upvotes: 3

Related Questions