Booting yocto system (and many other useful scripts)

This commit is contained in:
2025-07-31 17:44:58 +02:00
parent 3fd35d723a
commit 40ae7a8412
14 changed files with 141 additions and 77 deletions

View File

@@ -0,0 +1,19 @@
require conf/distro/poky.conf
DISTRO = "fcb-looper"
DISTRO_NAME = "FCB Looper Distribution"
DISTRO_VERSION = "1.0"
# Use busybox-mdev as device manager
VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
## Distro features for GUI, W^Fi, and systemd
#DISTRO_FEATURES:append = " wayland systemd pam usrmerge wifi opengl"
#DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
#
## Systemd configuration
#VIRTUAL-RUNTIME_init_manager = "systemd"
#VIRTUAL-RUNTIME_initscripts = ""
#
## Default target
#SYSTEMD_DEFAULT_TARGET = "graphical.target"

View File

@@ -4,12 +4,12 @@ BBPATH .= ":${LAYERDIR}"
# Layer recipes
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-fcb-looper"
BBFILE_PATTERN_meta-fcb-looper = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-fcb-looper = "10"
BBFILE_COLLECTIONS += "fcb-looper-layer"
BBFILE_PATTERN_fcb-looper-layer = "^${LAYERDIR}/"
BBFILE_PRIORITY_fcb-looper-layer = "10"
LAYERVERSION_meta-fcb-looper = "1"
LAYERSERIES_COMPAT_meta-fcb-looper = "scarthgap"
LAYERVERSION_fcb-looper-layer = "1"
LAYERSERIES_COMPAT_fcb-looper-layer = "scarthgap"
# Dependencies
LAYERDEPENDS_meta-fcb-looper = "core openembedded-layer rust-bin-layer"
LAYERDEPENDS_fcb-looper-layer = "core intel openembedded-layer rust-bin-layer"

View File

@@ -1,11 +1,14 @@
SUMMARY = "FCB1010 Looper System Image"
DESCRIPTION = "Minimal embedded Linux system with GUI for audio looper"
require recipes-core/images/core-image-base.bb
require recipes-core/images/core-image-minimal.bb
# Distro features now configured in fcb-looper distribution
# gui-app
IMAGE_INSTALL += "\
packagegroup-core-boot \
gui-app \
weston \
weston-init \
liberation-fonts \
@@ -13,12 +16,25 @@ IMAGE_INSTALL += "\
openssh \
ssh-keys \
wifi-config \
wpa-supplicant \
iw \
linux-firmware \
packagegroup-base-wifi \
pciutils \
usbutils \
linux-firmware-iwlwifi-6000g2b-6 \
kbd \
file \
util-linux \
keyboard-config \
${CORE_IMAGE_EXTRA_INSTALL} \
"
# Optimize for embedded use
IMAGE_FEATURES += "read-only-rootfs ssh-server-openssh"
SYSTEMD_DEFAULT_TARGET = "graphical.target"
# WiFi kernel features - ensure iwlwifi is built
KERNEL_FEATURES:append = " cfg/80211.scc features/iwlwifi/iwlwifi.scc"
# Image features for development and access - removed read-only for debugging
IMAGE_FEATURES += "ssh-server-openssh empty-root-password allow-empty-password debug-tweaks"
# Size optimization
IMAGE_ROOTFS_SIZE ?= "1048576"
@@ -28,6 +44,4 @@ IMAGE_OVERHEAD_FACTOR = "1.1"
IMAGE_FSTYPES += "ext4 tar.bz2 wic"
# Custom WIC file without swap
WKS_FILE = "fcb-looper-noswap.wks"
LICENSE = "MIT"
WKS_FILE = "fcb-looper-noswap.wks"

View File

@@ -0,0 +1,6 @@
# WiFi kernel configuration - built into kernel
CONFIG_CFG80211=y
CONFIG_MAC80211=y
CONFIG_IWLWIFI=y
CONFIG_IWLDVM=y
CONFIG_IWLMVM=y

View File

@@ -0,0 +1,5 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://wifi.cfg"
COMPATIBLE_MACHINE = "genericx86-64"

View File

@@ -0,0 +1,5 @@
#!/bin/sh
# Set Belgian keyboard layout
loadkeys be
# Make it persistent for systemd
localectl set-keymap be

View File

@@ -0,0 +1,41 @@
SUMMARY = "Belgian Keyboard Layout Configuration"
DESCRIPTION = "Sets up Belgian keyboard layout on boot"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://keyboard-setup.sh"
S = "${WORKDIR}"
do_install() {
# Install keyboard setup script
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/keyboard-setup.sh ${D}${bindir}/
# Create keyboard setup service
install -d ${D}${sysconfdir}/systemd/system
cat > ${D}${sysconfdir}/systemd/system/keyboard-setup.service << EOF
[Unit]
Description=Setup Belgian Keyboard Layout
DefaultDependencies=false
Before=sysinit.target
[Service]
Type=oneshot
ExecStart=${bindir}/keyboard-setup.sh
RemainAfterExit=yes
[Install]
WantedBy=sysinit.target
EOF
# Enable service
install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
ln -sf ${sysconfdir}/systemd/system/keyboard-setup.service ${D}${sysconfdir}/systemd/system/sysinit.target.wants/keyboard-setup.service
}
FILES:${PN} = "${bindir}/keyboard-setup.sh \
${sysconfdir}/systemd/system/keyboard-setup.service \
${sysconfdir}/systemd/system/sysinit.target.wants/*"
RDEPENDS:${PN} = "systemd kbd"

View File

@@ -3,4 +3,4 @@
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0"
bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0 systemd.gpt_auto=0"