diff options
Diffstat (limited to 'meta-unit-core')
9 files changed, 101 insertions, 2 deletions
diff --git a/meta-unit-core/dynamic-layers/raspberrypi/recipes-unit/images/core-image-unit-initramfs.bbappend b/meta-unit-core/dynamic-layers/raspberrypi/recipes-unit/images/core-image-unit-initramfs.bbappend new file mode 100644 index 0000000..20c3d3b --- /dev/null +++ b/meta-unit-core/dynamic-layers/raspberrypi/recipes-unit/images/core-image-unit-initramfs.bbappend @@ -0,0 +1,16 @@ +INITRAMFS_SCRIPTS:append:raspberrypi3-64 = " initramfs-module-backlight" + +PACKAGE_INSTALL:append:raspberrypi3-64 = " \ + initramfs-graphics-modules \ + kernel-module-rpi-panel-attiny-regulator \ + kernel-module-i2c-mux-pinctrl \ + kernel-module-edt-ft5x06 \ + kernel-module-panel-raspberrypi-touchscreen \ + kernel-module-tc358762 \ + kernel-module-v3d \ + kernel-module-raspberrypi-gpiomem \ + kernel-module-snd-bcm2835 \ + kernel-module-rpi-backlight \ + kernel-module-backlight \ + kernel-module-panel-simple \ +" diff --git a/meta-unit-core/dynamic-layers/unit-graphics-layer/recipes-unit/images/core-image-unit-initramfs.bbappend b/meta-unit-core/dynamic-layers/unit-graphics-layer/recipes-unit/images/core-image-unit-initramfs.bbappend new file mode 100644 index 0000000..80a5993 --- /dev/null +++ b/meta-unit-core/dynamic-layers/unit-graphics-layer/recipes-unit/images/core-image-unit-initramfs.bbappend @@ -0,0 +1 @@ +INITRAMFS_SCRIPTS:append = " initramfs-module-plymouth" diff --git a/meta-unit-core/dynamic-layers/unit-graphics-layer/recipes-unit/images/core-image-unit.bbappend b/meta-unit-core/dynamic-layers/unit-graphics-layer/recipes-unit/images/core-image-unit.bbappend index e46a10d..5cedc57 100644 --- a/meta-unit-core/dynamic-layers/unit-graphics-layer/recipes-unit/images/core-image-unit.bbappend +++ b/meta-unit-core/dynamic-layers/unit-graphics-layer/recipes-unit/images/core-image-unit.bbappend @@ -1,8 +1,9 @@ inherit fix-kiosk-home-dir-ownership +inherit mask-tty1-getty IMAGE_FEATURES:append = " hwcodecs" IMAGE_INSTALL:append = " packagegroup-unit-kiosk" +IMAGE_INSTALL:append = " packagegroup-unit-splash" -IMAGE_INSTALL:append:raspberrypi3-64 = " u-boot-splash" -IMAGE_BOOT_FILES:append:raspberrypi3-64 = " yocto_project_logo_white_800x480_24bpp.bmp.gz" +IMAGE_BOOT_FILES:append = " yocto_project_logo_white_800x480_24bpp.bmp.gz" diff --git a/meta-unit-core/recipes-core/initrdscripts/initramfs-module-kmod.bb b/meta-unit-core/recipes-core/initrdscripts/initramfs-module-kmod.bb new file mode 100644 index 0000000..dc0fab0 --- /dev/null +++ b/meta-unit-core/recipes-core/initrdscripts/initramfs-module-kmod.bb @@ -0,0 +1,16 @@ +SUMMARY = "Initramfs module for loading kernel modules" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${UNIT_CORE_LAYERDIR}/LICENSE;md5=38bf13be5d6979b28bd8adddb2f2f9b3" + +RDEPENDS:${PN} = "initramfs-framework-base" + +SRC_URI = "file://kmod" + +S = "${UNPACKDIR}" + +do_install() { + install -d ${D}/init.d + install -m 0755 ${UNPACKDIR}/kmod ${D}/init.d/01-kmod +} + +FILES:${PN} = "/init.d/01-kmod" diff --git a/meta-unit-core/recipes-core/initrdscripts/initramfs-module-kmod/kmod b/meta-unit-core/recipes-core/initrdscripts/initramfs-module-kmod/kmod new file mode 100644 index 0000000..34a08fd --- /dev/null +++ b/meta-unit-core/recipes-core/initrdscripts/initramfs-module-kmod/kmod @@ -0,0 +1,15 @@ +#!/bin/sh + +kmod_enabled() { + return 0 +} + +kmod_run() { + for c in /etc/modules-load.d/??-*.conf; do + [ ! -f "$c" ] && continue + for m in $(cat $c); do + modprobe "$m" + echo "Kernel module loaded from ramdisk: $m - result: $?" > /dev/kmsg + done + done +} diff --git a/meta-unit-core/recipes-core/plymouth/plymouth/plymouthd.conf b/meta-unit-core/recipes-core/plymouth/plymouth/plymouthd.conf new file mode 100644 index 0000000..eaa41c6 --- /dev/null +++ b/meta-unit-core/recipes-core/plymouth/plymouth/plymouthd.conf @@ -0,0 +1,4 @@ +[Daemon] +Theme=spin +ShowDelay=0 +DeviceTimeout=8 diff --git a/meta-unit-core/recipes-core/plymouth/plymouth_%.bbappend b/meta-unit-core/recipes-core/plymouth/plymouth_%.bbappend new file mode 100644 index 0000000..458711f --- /dev/null +++ b/meta-unit-core/recipes-core/plymouth/plymouth_%.bbappend @@ -0,0 +1,13 @@ +# Using yocto's initramfs framework to generate initramfs instead +RDEPENDS:${PN}-initrd:remove = "dracut" + +PACKAGECONFIG:append = " drm" + +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append = " file://plymouthd.conf" + +do_install:append() { + install -d ${D}${sysconfdir}/plymouth + install -m 0644 ${UNPACKDIR}/plymouthd.conf ${D}${sysconfdir}/plymouth/ +} diff --git a/meta-unit-core/recipes-unit/images/core-image-unit-initramfs.bb b/meta-unit-core/recipes-unit/images/core-image-unit-initramfs.bb new file mode 100644 index 0000000..7c664aa --- /dev/null +++ b/meta-unit-core/recipes-unit/images/core-image-unit-initramfs.bb @@ -0,0 +1,31 @@ +SUMMARY = "Initramfs to boot a fully-featured rootfs" +DESCRIPTION = "Small initramfs that contains udev and init to find the real rootfs" +LICENSE = "MIT" + +inherit image + +INITRAMFS_SCRIPTS ?= "\ + initramfs-module-debug \ + initramfs-module-udev \ + initramfs-module-kmod \ +" + +PACKAGE_INSTALL = "\ + ${INITRAMFS_SCRIPTS} \ + ${VIRTUAL-RUNTIME_base-utils} \ + base-passwd \ +" + +# Ensure the initramfs only contains the bare minimum +IMAGE_FEATURES = "" +IMAGE_LINGUAS = "" + +# Don't allow the initramfs to contain a kernel, as kernel modules will depend +# on the kernel image. +PACKAGE_EXCLUDE = "kernel-image-*" + +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" +IMAGE_FSTYPES:remove:rpi = "wic.zst" +IMAGE_NAME_SUFFIX ?= "" +IMAGE_ROOTFS_SIZE = "24576" +IMAGE_ROOTFS_EXTRA_SPACE = "0" diff --git a/meta-unit-core/recipes-unit/images/unit-image-base.inc b/meta-unit-core/recipes-unit/images/unit-image-base.inc index 23dd8c7..8b8d481 100644 --- a/meta-unit-core/recipes-unit/images/unit-image-base.inc +++ b/meta-unit-core/recipes-unit/images/unit-image-base.inc @@ -9,3 +9,5 @@ IMAGE_INSTALL:append = " packagegroup-unit-utils" # Allow for 4GB of extra space for misc. purposes (ex. container image storage) IMAGE_ROOTFS_EXTRA_SPACE = "4194304" + +IMAGE_FEATURES:append = " splash" |
