Reputation: 15
I want to create a recipe for this https://github.com/kuscsik/streamfs in my new layer (meta-example) and include it to image.
My layer is added in bblayers.conf :
~/rdk/build-raspberrypi-rdk-hybrid$ bitbake-layers show-layers
**layer path priority**
**meta-example /home/xyz/rdk/build-raspberrypi-rdk-hybrid/meta-example 6**
This is my path to layer.conf and content in layer.conf:
~/rdk/build-raspberrypi-rdk-hybrid/meta-example/conf$ vi 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-*/*/*.bbapend"
BBFILE_COLLECTIONS += "example"
BBFILE_PATTERN_example = "^${LAYERDIR}/"
BBFILE_PRIORITY_example = "6"
Then i have created a directory(example) inside meta-example which contains streamfs_git.bb with contents as shown below:
~/rdk/build-raspberrypi-rdk-hybrid/meta-example/example$ vi streamfs_git.bb
DESCRIPTION = "First recipe"
HOMEPAGE = "https://github.com/kuscsik/streamfs"
LICENSE = "LGPL-2.1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fc178bcd425090939a8b634d1d6a9594"
inherit cmake pkgconfig
SRC_URI = "git://github.com/kuscsik/streamfs"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
Then i run this command :~/rdk/build-raspberrypi-rdk-hybrid/meta-example/example$ bitbake streamfs_git
It shows me this error
WARNING: No bb files matched BBFILE_PATTERN_example '^/home/xyz/rdk/build-raspberrypi-rdk-hybrid/meta-example/'
**ERROR: Nothing PROVIDES 'streamfs_git'
I have even tried bitbake streamfs_git.bb and bitbake streamfs also, all are giving same error.
How can I fix the error? Do I have to add something in my layer.conf or .bb file or is there an error in any of my steps?
Upvotes: 1
Views: 1010
Reputation: 68
I've noticed two potential errors right away within your BBFILES declaration. You have
BBFILES += "${LAYERDIR}/recipes-//.bb
${LAYERDIR}/recipes-//.bbapend"
The first issue being that BBFILES is looking for any recipes in AND ONLY in a directory called 'recipes-'. I'm assuming (I could be wrong) that your recipes directory isn't called 'recipes-'. To ensure any recipes within a folder are getting parsed, make sure your bbfiles properly points to the directory that it resides in. In this case, perhaps change 'recipes-' to 'recipes-[directory-name]', although you can also use wildcards here, so something like 'recipes-*' would work as well, giving you the ability to parse any recipes within any directory named 'recipes-[anything]'.
Additionally, you seem to have an extraneous '/' in that same line, and no declaration of your recipe name. It's generally good practice in yocto keep your recipes in a subfolder of a recipes-* directory, though it's only for organizational reasons. You're also only pointing to a recipes named '.bb'. You should have either a wildcard, or the exact recipe name here. Also, don't forget to separate your multilined variables with a \ at the end of each line. It should look something like:
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
Moving to the second line, it's the same issues with lack of wildcards/direct definitions, although there also seems to be a typo in 'bbapend', which is just in spelling, should be 'bbappend'.
Ultimately, you should end up with something like this
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
There may be more issues, though work on this stuff for now, and I'll help out more if this doesn't solve your issue.
Upvotes: 1