0
votes

How do I add my custom directory entirely to the rootfs of the yocto project?

I want to add a non-empty directory to Yocto rootfs

I proceeded by writing the do_install statement, but it was not possible to copy an entire non-empty folder to rootfs with "install -m".

 do_install() {
    install -m 0755 /MYDirectory ${D}/MyDirectory
}

This seems to fail because you can only copy a single file

What can I try?

1

1 Answers

0
votes

see https://stackoverflow.com/a/47084404/3151114

and don't forget to add the directory to FILES, e.g.

FILES_${PN} += "/MyDirectory"

(just as https://stackoverflow.com/a/54311741/3151114)