How to install recursively my directories and files in BitBake recipe

无人久伴 提交于 2019-11-28 07:59:57

问题


I would like to install/copy all my directories and files recursively from working directory to my target package rootfs on yocto build system. I tried the solution provided by Tobias Bystricky in

How to install directory structure recursively in OpenEmbedded BitBake recipe?

but I faced "No such file or directory" error

I did ,

install -d ${D}${sysconfdir}/xxx/
install -d ${D}${sysconfdir}/xxx/yyy
install -d ${D}${sysconfdir}/xxx/yyy/zzz
install -d ${D}${sysconfdir}/xxx/yyy/zzz/kkk
find ${WORKDIR}/xxx/yyy/zzz/kkk/ -type f -exec 'install -m 0755 "{}" ${D}${sysconfdir}/xxx/yyy/zzz/kkk/' \; 

Error message is ,

find: `install -m 0755 / "Path to working dir" /xxx/yyy/zzz/kkk/test_file.txt / "Path to all packages" / "MyPackage" /image/etc/xxx/yyy/zzz/kkk/': No such file or directory

I checked & confirmed that exact working directory path & Package directory paths are present. please let me know if i am missing any.

please suggest if any other way.


回答1:


cp -r

is known to leak user information. In the OE repos, the canonical form is

cp -R --no-dereference --preserve=mode,links -v SOURCE DESTINATION

see also corresponding OE patch




回答2:


i also tried as below , did not work.

install -m 0755 ${WORKDIR}/xxx/yyy/zzz/kkk/* ${D}${sysconfdir}/xxx/yyy/zzz/kkk

and just tried simple cp -r in do_install(), it works

cp -r ${WORKDIR}/xxx/yyy/zzz ${D}${sysconfdir}/xxx/yyy


来源:https://stackoverflow.com/questions/39980145/how-to-install-recursively-my-directories-and-files-in-bitbake-recipe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!