Skip to content

Instantly share code, notes, and snippets.

@tomazzaman
Last active October 29, 2025 15:29
Show Gist options
  • Save tomazzaman/d9572dad4d02538d1d2cb76c0b4776bb to your computer and use it in GitHub Desktop.
Save tomazzaman/d9572dad4d02538d1d2cb76c0b4776bb to your computer and use it in GitHub Desktop.
Intro to Yocto I wish I was given | Part 1: The Basics

The files we need to build a basic root filesystem with Yocto. These are the support files for a YouTube video

header:
version: 11
machine: gateway-dk
distro: recovery
repos:
bitbake:
url: https://git.openembedded.org/bitbake
branch: "2.12"
path: sources/bitbake
layers:
.: "disabled"
openembedded-core:
url: https://git.openembedded.org/openembedded-core
branch: walnascar
path: sources/openembedded-core
layers:
meta:
meta-mono:
path: .
#@TYPE: Machine
#@NAME: Gateway Development Kit
#@DESCRIPTION: Machine configuration for Gateway Development kit, based on NXP LS1046A
require conf/machine/include/arm/armv8a/tune-cortexa72.inc
# QorIQ-specific variables
MACHINE_SOCARCH = "cortexa72"
SOC_FAMILY = "qoriq:ls1046a"
MACHINE_FEATURES = "serial"
KERNEL_IMAGETYPE = "Image"
KERNEL_DEVICETREE = ""
SERIAL_CONSOLES = "115200;ttyS0"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
IMAGE_FSTYPES = "cpio.gz"
BBPATH .= ":${LAYERDIR}"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-mono"
BBFILE_PATTERN_meta-mono = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-mono = "10"
LAYERDEPENDS_meta-mono = "core"
LAYERSERIES_COMPAT_meta-mono = "walnascar"
DISTRO = "recovery"
DISTRO_NAME = "Mono Recovery Linux"
DISTRO_VERSION = "1.0"
MAINTAINER = "Tomaz Zaman <[email protected]>"
# C library we want to use
TCLIBC = "glibc"
# Minimal features - no systemd, no GUI
DISTRO_FEATURES = ""
# Use BusyBox init instead of systemd
VIRTUAL-RUNTIME_init_manager = "busybox"
VIRTUAL-RUNTIME_initscripts = "initscripts"
# Use BusyBox for basic utilities
VIRTUAL-RUNTIME_base-utils = "busybox"
VIRTUAL-RUNTIME_login_manager = "busybox"
# Quality assurance checks
ERROR_QA:append = " textrel host-user-contaminated"
WARN_QA:append = " buildpaths ldflags"
# Build optimization, change these according to your number of cpus available.
# Run `$ nproc` to see how many you can allocate to Yocto/bitbake.
PARALLEL_MAKE = "-j 24"
BB_NUMBER_THREADS = "24"
# Shared cache locations. For reusability purposes, it's much better to have all
# the downloaded sources and state caches outside of the project directory.
# Make sure to set correct permissions on these directories.
DL_DIR = "/opt/yocto/yocto-dl"
SSTATE_DIR = "/opt/yocto/yocto-sstate"
# SDK settings
SDKMACHINE = "x86_64"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment