The Yocto Project on Raspberry Pi 5 Episode 7: Create a New Layer, a New Recipe (.bb) and .bbappend @LeonAnavi
The Yocto Project on Raspberry Pi 5 Episode 7: Create a New Layer, a New Recipe (.bb) and .bbappend  @LeonAnavi
Uploaded March 2025 | Updated September 2026, 2 weeks ago
This is episode 7 of our series on the Yocto Project and OpenEmbedded for Raspberry Pi 5, where we will discuss how to create a new layer, how to create a new recipe and how to extend an existing recipe using .bbappend file. All examples are based on the Yocto LTS release Scarthgap.

* Initialize the build environment:

source oe-init-build-env

* Create a new layer:

bitbake-layers create-layer ../meta-leon

* Add the new layer to conf/bblayers.conf:

bitbake-layers add-layer ../meta-leon

* Open another terminal and enter the layer created on the previous step:

cd meta-leon

* Create a directory for the "Hello, World" recipe:

mkdir -p recipes-apps/hello/

* Create recipe recipes-apps/hello/hello_git.bb with the following content:

DESCRIPTION = "Hello World"
HOMEPAGE = "github.com/leon-anavi/hello-world"
SECTION = "console/utils"
LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://LICENSE;md5=f388cad0df1af35e3626518d587c0cb6"

SRC_URI = "git://github.com/leon-anavi/hello-world.git;branch=master;protocol=https"
SRCREV = "f66f58e7bcdcc834568d8c7c6fc51e30765befad"

S = "${WORKDIR}/git"

inherit autotools

* Create a directory in the layer to extend core-image-base:

mkdir -p recipes-core/images/

* Create file recipes-core/images/core-image-base.bbappend and add in it the following line to install the hello recipe from layer meta-leon to core-image-base:

IMAGE_INSTALL:append = " hello"

* Go back to the terminal where the build environment has been initialized and build the new image:

bitbake core-image-base

* Flash core-image-base-raspberrypi5.rootfs.wic.bz2 to a microSD card

* Boot Raspberry Pi 5 from the microSD card and execute hello to verify that the "Hello, World" application has been successfully built and included in the image.

πŸ”— Related Videos
===
Episode 1: The Yocto Project on Raspberry Pi 5: Building an Embedded GNU Linux Distribution
youtu.be/fY7u6PiV8qA?si=-DgvkJ_yTsiX05vx
Episode 2: SSH for Remote Network Access
youtu.be/ltckiBV9FXg?si=DJwsKLDhHkDIqCIn
Episode 3: Running Docker Containers
youtu.be/kQnOidK_U3M?si=5KiS1FK87OwfdQ0m
Episode 4: U-Boot Bootloader
youtu.be/9tohomiv1Ug?si=QydN1yPRJzY6zEfz
Episode 5: Modifying U-Boot Environment in Linux with fw_setenv
youtu.be/SB5NvIF1IEU?si=gW02HUr-0cfdyQLL
Episode 6: Runtime Package Management with apt and deb Packages
youtu.be/6i5UtF7fiaA?si=3n1hRSEaSfe5a92N

πŸ“š Useful Links
===
yoctoproject.org
docs.yoctoproject.org
openembedded.org/wiki/Main_Page
The Yocto Project on Raspberry Pi 5 Episode 7: Create a New Layer, a New Recipe (.bb) and .bbappendMarshall Emberton Counterfeit Bluetooth Speaker Disassembly and RepairMinnowBoard Turbot Dual-EBuild a Word Clock with XIAO ESP32-C6 | Part 1: PCB Design with KiCadPCIe to Dual M.2 HAT for Raspberry Pi 5 NVMe SSDs or Hailo and Coral AI accelerators #shorts #rpiParkside 4 Pliers #shortsTemporary Disable Built-in Battery from ThinkPad BIOS Setup Utility #thinkpadDesigning an Open-Source TPM 2.0 I2C Add-on Board for Raspberry Pi with Infineon SLB9673 in KiCadHome Assistant Green Teardown: Mini Computer with Open Source Software for Smart Home Hub #shortsUnboxing LSC Smart Dimmer Switch with Tuya support, WB3S Wi-Fi module and Beken BK7231T #shorts #lscLenovo Thinkpad T490 Storage Upgrade with 512GB Micron M.2 NVMe SSD #shorts #thinkpadOffline Speech-to-Text on Raspberry Pi 5 with Python3 and OpenAI Whisper ASR
Leon Anavi |

The Yocto Project on Raspberry Pi 5 Episode 7: Create a New Layer, a New Recipe (.bb) and .bbappend

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER