This repository provides a Yocto build setup for Raspberry Pi 3 using a custom "cpane" distribution with systemd, networking, and useful utilities pre-configured.
git clone --recursive <your-repo-url>
cd yocto-rpi3
source setup-env
bitbake core-image-minimalgit clone --recursive <your-repo-url>
cd yocto-rpi3
./scripts/setup-build.shgit clone --recursive <your-repo-url>
cd yocto-rpi3
source setup-env my-custom-build
bitbake core-image-minimalAll approaches will automatically:
- Use the Raspberry Pi 3 machine configuration (
MACHINE = "raspberrypi3") - Apply the cpane custom distribution (
DISTRO = "cpane") - Configure all required layers (raspberrypi, openembedded, cpane)
- Set up systemd as the init system with networking features
- Include essential utilities and development tools
- Target: Raspberry Pi 3
- Init System: systemd with usrmerge
- Networking: WiFi, Ethernet, ConnMan, DHCP
- Utilities: SSH, nano, htop, wget, curl, rsync
- Image Format: SD card image (rpi-sdimg)
- Serial Console: 115200 baud on ttyAMA0
meta-cpane/: Custom layer with cpane distributionmeta-raspberrypi/: Raspberry Pi BSP layermeta-openembedded/: Additional OE layers (oe, multimedia, networking, python)poky/: Core Yocto Project reference distribution
Once the environment is set up:
# Build minimal image
bitbake core-image-minimal
# Build image with development tools
bitbake core-image-full-cmdline
# Build image with GUI (if supported)
bitbake core-image-satoImages will be created in build/tmp/deploy/images/raspberrypi3/.
The setup uses Yocto's TEMPLATECONF mechanism to automatically configure builds with the cpane distribution templates, ensuring:
- No manual editing of build configuration files
- Consistent setup across different machines
- Standard Yocto workflow compatibility
meta-cpane/conf/templates/cpane/local.conf.sample: Machine and distribution settingsmeta-cpane/conf/templates/cpane/bblayers.conf.sample: Layer configuration
To modify the distribution:
- Edit
meta-cpane/conf/distro/cpane.conffor distribution-wide changes - Update templates in
meta-cpane/conf/templates/cpane/for build defaults - Add recipes to
meta-cpane/recipes-*directories for additional software
# Set up development environment
source poky/oe-init-build-env
# Make changes to meta-cpane layer
# Build and test
bitbake core-image-minimal
# Deploy to SD card (replace /dev/sdX with your SD card)
sudo dd if=build/tmp/deploy/images/raspberrypi3/core-image-minimal-raspberrypi3.rpi-sdimg of=/dev/sdX bs=1M status=progress- Host system with Yocto Project dependencies installed
- At least 50GB free disk space
- 8GB+ RAM recommended for parallel builds