我对yocto很新,我正在努力学习如何使用它。我按照大型手册部分section 5.1.9中的步骤进行操作。我跑了
yocto-layer create mylayer
并编辑了我的bblayers.conf文件:
BBLAYERS = ?" \
/usr/local/src/yocto/meta \
/usr/local/src/yocto/meta-poky \
/usr/local/src/yocto/meta-yocto-bsp \
/usr/local/src/yocto/meta-mylayer \
"
我跑source oe-init-build-env
然后bitbake core-image-sato
。构建完成后,我运行runqemu qemu86 nographics
并在登录后运行find / -name helloworld
,因为mylayer定义了构建helloworld的配方。但是,找不到该文件。
这个程序(helloworld)不应该包含在创建的图像中吗?我在这里错过了哪些步骤?
元mylayer / CONF / layer.conf:
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "mylayer"
BBFILE_PATTERN_mylayer = "^${LAYERDIR}/"
BBFILE_PRIORITY_mylayer = "6"
元mylayer / recipies-例/示例/ example_0.1.bb
#
# This file was derived from the 'Hello World!' example recipe in the
# Yocto Project Development Manual.
#
SUMMARY = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://helloworld.c"
S = "${WORKDIR}"
do_compile() {
${CC} ${LDFLAGS} helloworld.c -o helloworld
}
do_install() {
install -d ${D}${bindir}
install -m 0755 helloworld ${D}${bindir}
}
元mylayer /食谱-例/示例/实施例-0.1 / helloworld.c:
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello World!\n");
return 0;
}
答案 0 :(得分:1)
添加新图层并不会将图层中的每个配方添加到每个图像中,只是使这些配方可用于构建。
使用图像配方中的IMAGE_INSTALL在图像中添加所需的包。
http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#usingpoky-extend-customimage上的文档对此进行了介绍。