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

前端 未结 4 1398
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:51

    For a recipe folder like this:

    .
    ├── files
    │   ├── a.txt
    │   ├── b.c
    │   └── Makefile
    └── myrecipe.bb
    

    You can use the following recipe to install it on a specific folder into your rootfs:

    SRC_URI = " file://*"
    do_install() {
        install -d ${WORKDIR}/my/dir/on/rootfs
        install -m 0755 ${S}/* ${WORKDIR}/my/dir/on/rootfs/*
    }
    FILES_${PN} = "/my/dir/on/rootfs/* "
    

提交回复
热议问题