如何在 yocto 配方中嵌入文件

How to embed files in yocto recipe

我想知道如何将文件嵌入到yocto recipe 中,以便我可以在嵌入式端找到它们(部署在嵌入式平台上的yocto 映像)。我实际上是用 .bb 文件中的 SRC_URI += 指令来做的,但是在我的 yocto 映像上启动后,我找不到任何我想要的文件。谢谢。

如果我没理解错的话,您希望在图像中实现 svn / png 文件。您可以简单地将它们安装在您的 rootfs 中(在像 /home/root/images 这样的文件夹中),方法如下:

SUMMARY = "Simple recipe"
DESCRIPTION = "simple file deployment"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
SRC_URI = "file://your.png file://COPYING"
S = "${WORKDIR}"

do_install(){
        install -d ${D}/home/root/images
        install -m WXYZ your.png ${D}/home/root/images
}
FILES_${PN} += "/home/root/images/your.png"

注意WXYZ是权限。