How do I write a yocto/bitbake recipe to copy a directory to the target root file system

前端 未结 4 1397
Happy的楠姐
Happy的楠姐 2021-02-05 08:04

I have a directory of \'binary\' (i.e. not to be compiled) files and just want them to be installed onto my target root file system.

I have looked at several articles,

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 08:36

    You just have to copy these files into your target rootfs. Do not forget to pakage them if they are not installed in standard locations.

    SRC_URI += "file://myDir"
    
    do_install() {
        install -d ${D}/path/to/dir/on/fs
        cp -r ${WORKDIR}/myDir ${D}/path/to/dir/on/fs
    }
    FILES_${PN} += "/path/to/dir/on/fs"
    

提交回复
热议问题