Yocto: Create a New Directory in etcdir

孤人 提交于 2019-12-06 20:33:30

In addition to LetoThe2nd's answer: the ${etcdir} variable is usually empty. If you want a variable for /etc, it is ${sysconfdir}. So your files are probably installed to root directory.

Check output of bitbake -e <your_recipe> and try to find etcdir to verify.

Also drop INSANE_SKIP_${PN} += "installed-vs-shipped" which hides the error your are trying to find (you will see what is installed where but not shipped).

BTW LetoThe2nd's answer is also needed, because you are overwriting (instead of appending FILES_${PN}, otherwise it wouldn't be needed. The ${sysconfdir} is already part of FILES_${PN}.

"Not working" is a rather bad error description, but the most probable issue is that it does not get included in the image. This is because bitbakes packaging mechanisms do not know about that directory, so add it with:

FILES_${PN} += "${etcdir}/oc_certs"

If you need further assistance, please extend your question with a precise error description, respectively the corresponding log.

You are missing a / after ${D}. To create a directory say mydir in your /etc folder, just add the following code in the do_install() of your recipe.

do_install() {
    install -d ${D}/etc/mydir
 }
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!