How can I add a lot of files to an image with a BitBake recipe?
The pattern that I follow to add files to an image is the following:
SRC_URI += "file://bar"
do_install () {
install -m 0775 ${S}/bar/baz/foo.txt ${D}${prefix}/test
}
FILES_${PN} += "${prefix}"
FILES_${PN} += "${prefix}test"
FILES_${PN} += "${prefix}test/foo.txt"
Which works great for a few files. However, this can be really tedious for large amounts of files. The problem seems to be that I need to specify each file that I want to package. Is there some way to avoid this?
If all the files are in a single directory you can just put the directory in FILES
and it will recurse for you. So if you had another 100 files in ${prefix}/test
then FILES_${PN} = "${prefix}/test"
would package them all in $PN
.