Creating a Custom Yocto Layer for Raspberry Pi Zero 2W

A step-by-step guide to creating and integrating a custom meta-layer to manage your own recipes and configurations in a Yocto build for the Raspberry Pi Zero 2W
February 2, 2026

Creating a Custom Yocto Layer for Raspberry Pi Zero 2W

I'm planning to create my own E-paper device based on the Raspberry Pi Zero 2W.
In a previous post, I downloaded the existing Yocto source to create a base image for my own Raspberry Pi image.
To start creating a truly custom image, I'll add my own Meta Layer.
While you could modify existing layers like Poky, meta-raspberrypi, or other meta-* layers, doing so makes future maintenance difficult.
Therefore, I've created my own manageable layer to house all modifications. This way, simply adding this meta-layer to the existing Poky setup will result in my custom image.

1. Adding a Skeleton Layer

Bitbake has a command called create-layer.
Using this command, you can easily create a skeleton layer.
Add a skeleton layer
shell
If you check rpi-build, you'll see that meta-jooojub-rpi has been created.
First, I'll perform a git init on the newly created state to prepare the base.
Since layers are typically managed according to the Yocto version, I usually use the Yocto version name for the branch name.
create base git project
shell

2. Using Layers in the Build

Next, you need to add your custom layer to the build.
Since the current meta-layer is located inside build, I'll delete the created meta-jooojub-rpi and clone it again inside poky for consistency.
clone in poky
shell
Now that meta-jooojub-rpi has been moved to poky, I'll add the layer using add-layer.
You can verify that the layer was added correctly by checking build/conf/bblayers.conf.
build/conf/bblayers.conf
shell

3. Build Test

Even though meta-jooojub-rpi is currently empty, I'll perform a build test to ensure it's integrated properly.
If it builds without any issues, it's a success.

4. Next Steps

Next, I'll apply the necessary modifications from local.conf and bblayers.conf to meta-jooojub-rpi, making it buildable immediately without manual configuration.
Jooojub
System S/W engineer
Explore Tags
Series
    Recent Post
    © 2026. jooojub. All right reserved.