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

前端 未结 4 1447
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条回答
  •  轮回少年
    2021-02-05 08:54

    Take care that with a simple recursive copy, you will end up having host contamination warnings so you would need to copy with the following parameters:

    do_install() {
         [...]
         cp --preserve=mode,timestamps -R ${S}${anydir}/Data/* ${D}${anyotherdir}/Data
         [...]
    }
    

    As other recipes in poky do, or just follow the official recommendations to avoid problems with ownership and permissions.

提交回复
热议问题