Engineer999
Engineer999

Reputation: 3955

No bb files found in layer

I am new to Yocto and doing some starter projects. I have added my own layer called meta-tutorial .

I have the following recipe file inside my layer at meta-tutorial/recipe-example/hello/hello_1.0.bb

DESCRIPTION = "Simple helloworld application"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://hello.c"

S = "${WORKDIR}"

do_compile() {
        ${CC} hello.c ${LDFLAGS} -o hello
}

do_install() {
        install -d ${D}${bindir}
        install -m 0755 hello ${D}${bindir}
}

The hello.c source file is located at meta-tutorial/recipe-example/hello/files/hello.c

When I source the oe-init-build-env script , and try to build my recipe as follows bitbake hello_1.0.bb, I encounter the following issues :

WARNING: No bb files in default matched BBFILE_PATTERN_meta-tutorial '^/home/Yocto-test/poky/meta-tutorial/'
ERROR: Nothing PROVIDES 'hello_1.0.bb'

What is the problem here exactly, it's not clear?

Upvotes: 1

Views: 671

Answers (1)

Talel BELHAJSALEM
Talel BELHAJSALEM

Reputation: 4344

A Yocto layer have a configuration file that describes where to look for recipes .bb and recipes append files .bbappend:

  • meta-tutorial/conf/layer.conf:
...
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
                              ^
                              |
(Look closely)-----------------
...

so, your mistake is that you put your recipe under the path:

meta-tutorial/recipe-example/hello
                   ^
                   |
(The mistake)-------

So, your recipe should be under:

meta-tutorial/recipes-example/hello
                    ^
                    |
(Correction)---------

Upvotes: 3

Related Questions