I downloaded meta-raspberrypi layer and checked for the scarthgap branch (the LTS version).
meta-raspberrypi(folder)$git branch -r
...
origin/scarthgap
...
meta-raspberrypi(folder)$git checkout -b scarthgap //set branch scarthgap
and followed the "Quick Start" instruction: https://git.yoctoproject.org/meta-raspberrypi/about/
Downloaded yocto poky and checked out the branch scarthgap and init the build environment with:
poky(folder)$ source oe-init-build-env ../rpi-build
../rpi-build$
If I now try to add the meta-raspberrypi layer it fails :
rpi-build$ bitbake-layers add-layer ~/workspace/yocto/meta-raspberrypi/
NOTE: Starting bitbake server...
ERROR: Layer raspberrypi is not compatible with the core layer which only supports these series: scarthgap (layer is compatible with walnascar styhead)
ERROR: Parse failure with the specified layer added, exiting.
I am new to Yocto, so the question is, am i doing something wrong? Or how to build a BSP for raspberry with yocto scarthgap?
UPDATE1: Tried to update the bblayers.conf manually but than it fails during "bitbake core-image-minimal" with :
Parsing of 958 .bb files complete (0 cached, 958 parsed). 1914 targets, 72 skipped, 0 masked, 0 errors.
ERROR: No recipes in default available for:
/home/daniel/workspace/yocto/meta-raspberrypi/recipes-graphics/mesa/mesa-gl.bbappend
/home/daniel/workspace/yocto/meta-raspberrypi/recipes-graphics/mesa/mesa.bbappend
When encountering the error Layer foo is not compatible with the core layer ...
, first check the compatibility options for each layer. The option is normally located in meta-foo/conf/layer.conf and named LAYERSERIES_COMPAT_foo
.
For this specific question, let's try to reproduce the behavior:
git clone git://git.yoctoproject.org/meta-raspberrypi
cd meta-raspberrypi/
git checkout -b scarthgap
# fatal: A branch named 'scarthgap' already exists.
git checkout scarthgap
# Switched to branch 'scarthgap'
grep "LAYERSERIES_COMPAT" conf/layer.conf
# LAYERSERIES_COMPAT_raspberrypi = "nanbield scarthgap"
The variable tells the range of releases compatible. To find out if yours is included, use the releases page on the Yocto wiki.
For this question, meta-raspberrypi is compatible with scarthgap
release. As I got an error on git checkout -b
, I assume actual issue was checking out the branch in git. Due to the many git repositories involved, this is a common problem with Yocto projects. Yocto cooker is a tool to prevent git checkout issues. It has menu.json
files to explicitly define which layer revision is checked out. They have an example menu.json
for raspberry pi already.
If LAYERSERIES_COMPAT
is not present in the current layer.conf
file, I recommend to search the whole project. This is just to catch any non-standard file locations and doesn't take long with grep:
grep -r "LAYERSERIES" your/project/root
In rare cases the LAYERSERIES_COPMAT
variable is set to the wrong releases. I only expect this for self-written or unpopular layers. Try to manually change the compatibility and fix any errors that occur.