# Ensure Docker is installed and configured.
# Create project directory
mkdir -p ~/yocto-rpi4
cd ~/yocto-rpi4
# Clone required repositories
git clone -b scarthgap git://git.yoctoproject.org/poky
git clone -b scarthgap git://git.openembedded.org/meta-openembedded
git clone -b scarthgap git://git.yoctoproject.org/meta-raspberrypi
# Start Docker container with appropriate resources
# I have a build server and set the memory to 32g and cpus to 14
docker run --rm -it \
--memory 8g \
--cpus 4 \
-v "$(pwd)":/workdir \
ghcr.io/crops/poky:ubuntu-22.04 \
--workdir=/workdir
# Initialize build environment
source poky/oe-init-build-env build
# Add required layers
bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-openembedded/meta-python
bitbake-layers add-layer ../meta-openembedded/meta-networking
bitbake-layers add-layer ../meta-raspberrypi
# Verify layers
bitbake-layers show-layers
Edit conf/local.conf
:
# Machine Selection
MACHINE = "raspberrypi3-64"
# Raspberry Pi Specific
ENABLE_UART = "1"
# https://meta-raspberrypi.readthedocs.io/en/latest/ipcompliance.html
LICENSE_FLAGS_ACCEPTED = "synaptics-killswitch"
# Clean any previous builds (optional)
bitbake -c clean core-image-base
# Build image
bitbake core-image-base
# Flash with Balena Etcher. On a recent test I used `core-image-base-raspberrypi3-64.rootfs.wic.bz2`