From a4d023f976f006ec260c7f5185f64da205fb34e2 Mon Sep 17 00:00:00 2001 From: Timo Date: Wed, 11 Feb 2026 23:08:38 +0100 Subject: [PATCH] added custom distro --- .../meta-devdistro/conf/distro/devdistro.conf | 33 +++++++++++++++++++ layers/meta-devdistro/conf/layer.conf | 16 +++++++++ .../recipes-core/images/dev-image-dev.bb | 9 +++++ .../recipes-core/images/dev-image-full.bb | 15 +++++++++ .../recipes-core/images/dev-image-minimal.bb | 10 ++++++ .../recipes-core/images/dev-image-net.bb | 10 ++++++ 6 files changed, 93 insertions(+) create mode 100644 layers/meta-devdistro/conf/distro/devdistro.conf create mode 100644 layers/meta-devdistro/conf/layer.conf create mode 100644 layers/meta-devdistro/recipes-core/images/dev-image-dev.bb create mode 100644 layers/meta-devdistro/recipes-core/images/dev-image-full.bb create mode 100644 layers/meta-devdistro/recipes-core/images/dev-image-minimal.bb create mode 100644 layers/meta-devdistro/recipes-core/images/dev-image-net.bb diff --git a/layers/meta-devdistro/conf/distro/devdistro.conf b/layers/meta-devdistro/conf/distro/devdistro.conf new file mode 100644 index 0000000..f33eeb3 --- /dev/null +++ b/layers/meta-devdistro/conf/distro/devdistro.conf @@ -0,0 +1,33 @@ +DISTRO = "devdistro" +DISTRO_NAME = "Custom Headless Distro for development" +DISTRO_VERSION = "1.0" + +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" + +# Use systemd (recommended for networking & ssh) +DISTRO_FEATURES:append = "\ + systemd \ + usrmerge \ + ipv4 \ + ipv6 \ +" + +VIRTUAL-RUNTIME_init_manager = "systemd" +VIRTUAL-RUNTIME_initscripts = "" +DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" + +# Explicitly remove graphics +DISTRO_FEATURES:remove = "\ + x11 \ + wayland \ + opengl \ + directfb \ +" + +# No display-related features +DISTRO_FEATURES_BACKFILL_CONSIDERED += "\ + x11 wayland opengl directfb \ +" + +# Avoid pulling graphics via dependencies +PACKAGECONFIG:remove:pn-qemu-system-native = "sdl gtk" diff --git a/layers/meta-devdistro/conf/layer.conf b/layers/meta-devdistro/conf/layer.conf new file mode 100644 index 0000000..11509ea --- /dev/null +++ b/layers/meta-devdistro/conf/layer.conf @@ -0,0 +1,16 @@ +# Add layer to BitBake search path +BBPATH .= ":${LAYERDIR}" + +# Where recipes live +BBFILES += "\ + ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend \ +" + +# Layer identification (REQUIRED) +BBFILE_COLLECTIONS += "devdistro" +BBFILE_PATTERN_devdistro = "^${LAYERDIR}/" +BBFILE_PRIORITY_devdistro = "8" + +# Yocto release compatibility (REQUIRED, else warning) +LAYERSERIES_COMPAT_devdistro = "scarthgap" diff --git a/layers/meta-devdistro/recipes-core/images/dev-image-dev.bb b/layers/meta-devdistro/recipes-core/images/dev-image-dev.bb new file mode 100644 index 0000000..713a74e --- /dev/null +++ b/layers/meta-devdistro/recipes-core/images/dev-image-dev.bb @@ -0,0 +1,9 @@ +DESCRIPTION = "Full headless image" + +require dev-image-full.bb + +IMAGE_INSTALL += "\ + dtc \ + gptfdisk \ + util-linux \ +" \ No newline at end of file diff --git a/layers/meta-devdistro/recipes-core/images/dev-image-full.bb b/layers/meta-devdistro/recipes-core/images/dev-image-full.bb new file mode 100644 index 0000000..1661e63 --- /dev/null +++ b/layers/meta-devdistro/recipes-core/images/dev-image-full.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Full headless development image" + +require dev-image-net.bb + +IMAGE_FEATURES += "\ + ssh-server-dropbear \ +" + +IMAGE_INSTALL += "\ + btop \ + ca-certificates \ + curl \ + htop \ + vim \ +" \ No newline at end of file diff --git a/layers/meta-devdistro/recipes-core/images/dev-image-minimal.bb b/layers/meta-devdistro/recipes-core/images/dev-image-minimal.bb new file mode 100644 index 0000000..9747530 --- /dev/null +++ b/layers/meta-devdistro/recipes-core/images/dev-image-minimal.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "Minimal headless image" +LICENSE = "MIT" + +inherit core-image + +IMAGE_INSTALL = "\ + packagegroup-core-boot \ +" + +IMAGE_INSTALL:remove = "grub grub-efi grub-pc" \ No newline at end of file diff --git a/layers/meta-devdistro/recipes-core/images/dev-image-net.bb b/layers/meta-devdistro/recipes-core/images/dev-image-net.bb new file mode 100644 index 0000000..9fa8975 --- /dev/null +++ b/layers/meta-devdistro/recipes-core/images/dev-image-net.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "Minimal image with networking" + +require dev-image-minimal.bb + +IMAGE_INSTALL += "\ + iproute2 \ + ethtool \ +" + +SYSTEMD_AUTO_ENABLE += "systemd-networkd systemd-resolved" \ No newline at end of file