Reputation: 134
I am trying to add the files of a git repository inside my console-image. In this matter, I created a recipe inside a layer named meta-rpi
(a layer built by the guy that wrote this article, whose yocto image I reproduce). So inside meta-rpi
I created a recipe called recipes-web-server
, within it another folder named backend
, and finally, inside it, I put my recipe backend_git.bb
.
The backend_git.bb
file has the following content in it:
DESCRIPTION = "Backend repo"
SECTION = ""
DEPENDS = ""
LICENSE = "MIT"
// here I made sure to copy a commit SHA code from the main branch
#SRCREV = "somecode"
SRC_URI = "git://github.com/myUsername/myRepo.git;branch=main;protocol=http"
inherit npm-install-global
And then in conf/layer.conf
of meta-rpi
I have this non-modified conf:
# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have a recipes directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend ${LAYERDIR}/images/*.bb"
BBFILE_COLLECTIONS += "meta-rpi64"
BBFILE_PATTERN_meta-rpi64 := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-rpi64 = "16"
LAYERSERIES_COMPAT_meta-rpi64 = "dunfell"
So everything seems alright. The build runs fine and I was able to flash the image to an SD Card and test it on my raspberry.
After the OS was ready to use, I got inside cd /
and then ran find . -name *backend*
and other find . -name
of various folders inside my git repository but couldn't find it.
So my question is, what am I doing wrong?
Upvotes: 0
Views: 2036
Reputation: 4304
It seems your recipe is not added to the image.
Add this line to your custom image or local.conf
:
IMAGE_INSTALL_append = " backend"
This will force the recipe to be built and shipped.
Upvotes: 1