简体   繁体   English

Yocto - 如何将 blkid.h 文件添加到 rootfs

[英]Yocto - how to add blkid.h file to rootfs

I would like to add to some Yocto Linux distribution my own application that includes blkid.h file.我想将我自己的包含 blkid.h 文件的应用程序添加到一些 Yocto Linux 分发中。 In the.manifest file I found libblkid1 library and util-linux-blkid package but in the rootfs I have no such a file.在 .manifest 文件中,我找到libblkid1库和util-linux-blkid package 但在 rootfs 中我没有这样的文件。 Which package or library I should add to the image to get blkid.h file?我应该将哪个 package 或库添加到图像中以获取 blkid.h 文件?

Thank you in advance for any help.预先感谢您的任何帮助。

liblkid1 is a package from util-linux recipe ( util-linux-libblkid ). liblkid1是来自util-linux配方 ( util-linux-libblkid ) 的 package。 If you want to have the headers, you probably need to add the development package of util-linux-libblkid :如果你想拥有头文件,你可能需要添加util-linux-libblkid

IMAGE_INSTALL += "util-linux-libblkid-dev"

But I don't understand why you need the headers, are you compiling on the target?但我不明白你为什么需要标题,你是在目标上编译吗? Because if you use Yocto to compile your application, the header will be on the host side during the image generation, and will not be necessary on the target.因为如果您使用 Yocto 编译您的应用程序,header 将在图像生成期间位于主机端,而在目标端则不需要。 Or if you compile with the SDK, you also don't need the headers on the target.或者,如果您使用 SDK 进行编译,您也不需要目标上的标头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM