如何使用 .bb 配方将二进制文件和其他文件添加到 yocto 中的 rootfs
how to add the binaries and other files to rootfs in yocto using .bb recipes
DESCRIPTION = "Copies hello-binaries to the image"
LICENSE = "CLOSED"
FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += "file://hello "
S = "${WORKDIR}"
do_install() {
install -d ${D}${bindir}
install -m 0777 hello ${D}${bindir}
}
#FILES_${PN} += "${bindir}"
INSANE_SKIP_${PN} = "ldflags"
INSANE_SKIP_${PN}-dev = "ldflags"
在上面的食谱中,我评论了 FILES_ 行,然后 hello 二进制文件也添加到图像中,这怎么可能?我不知道配方是如何将二进制文件复制到图像的。*
FILES_${PN}
有一个默认值,其中包括“${bindir}/*”。因此不需要附加到配方中的值。
您可以在 meta/conf/bitbake.conf 中查看默认值并检查该值以 bitbake -e <hellorecipe> | grep ^FILES_
结尾
DESCRIPTION = "Copies hello-binaries to the image"
LICENSE = "CLOSED"
FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += "file://hello "
S = "${WORKDIR}"
do_install() {
install -d ${D}${bindir}
install -m 0777 hello ${D}${bindir}
}
#FILES_${PN} += "${bindir}"
INSANE_SKIP_${PN} = "ldflags"
INSANE_SKIP_${PN}-dev = "ldflags"
在上面的食谱中,我评论了 FILES_ 行,然后 hello 二进制文件也添加到图像中,这怎么可能?我不知道配方是如何将二进制文件复制到图像的。*
FILES_${PN}
有一个默认值,其中包括“${bindir}/*”。因此不需要附加到配方中的值。
您可以在 meta/conf/bitbake.conf 中查看默认值并检查该值以 bitbake -e <hellorecipe> | grep ^FILES_