summaryrefslogtreecommitdiff
path: root/meta-unit-graphics/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta-unit-graphics/recipes-core')
-rw-r--r--meta-unit-graphics/recipes-core/initrdscripts/initramfs-graphics-modules.bb30
-rw-r--r--meta-unit-graphics/recipes-core/initrdscripts/initramfs-graphics-modules/raspberrypi3-64/early-graphics.conf11
-rw-r--r--meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-backlight.bb18
-rw-r--r--meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-backlight/backlight20
-rw-r--r--meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-plymouth.bb21
-rw-r--r--meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-plymouth/plymouth18
-rw-r--r--meta-unit-graphics/recipes-core/packagegroups/packagegroup-unit-splash.bb6
-rw-r--r--meta-unit-graphics/recipes-core/plymouth-quit-conf/files/weston.conf3
-rw-r--r--meta-unit-graphics/recipes-core/plymouth-quit-conf/plymouth-quit-conf.bb23
-rw-r--r--meta-unit-graphics/recipes-core/plymouth-themes/plymouth-themes_git.bb37
-rw-r--r--meta-unit-graphics/recipes-core/systemd/systemd-weston-signal.bb26
-rw-r--r--meta-unit-graphics/recipes-core/systemd/systemd-weston-signal/weston-ready.service16
12 files changed, 229 insertions, 0 deletions
diff --git a/meta-unit-graphics/recipes-core/initrdscripts/initramfs-graphics-modules.bb b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-graphics-modules.bb
new file mode 100644
index 0000000..668fab4
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-graphics-modules.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Graphics modules to load in initramfs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${UNIT_GRAPHICS_LAYERDIR}/LICENSE;md5=a77c12e0c0e8a14cebb1494195720ccc"
+
+SRC_URI:append:raspberrypi3-64 = " file://early-graphics.conf"
+
+RDEPENDS:${PN}:append:raspberrypi3-64 = " \
+ 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 \
+"
+
+S = "${UNPACKDIR}"
+
+# Source configuration file for modules to load must be provided by machine specific overrides
+
+do_install() {
+ install -d ${D}${sysconfdir}/modules-load.d
+ install -m 0644 ${S}/early-graphics.conf ${D}${sysconfdir}/modules-load.d/01-early-graphics.conf
+}
+
+FILES:${PN} = "${sysconfdir}/modules-load.d/01-early-graphics.conf"
diff --git a/meta-unit-graphics/recipes-core/initrdscripts/initramfs-graphics-modules/raspberrypi3-64/early-graphics.conf b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-graphics-modules/raspberrypi3-64/early-graphics.conf
new file mode 100644
index 0000000..8009015
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-graphics-modules/raspberrypi3-64/early-graphics.conf
@@ -0,0 +1,11 @@
+i2c_mux_pinctrl
+rpi_panel_attiny_regulator
+backlight
+rpi_backlight
+edt_ft5x06
+panel_simple
+panel_raspberrypi_touchscreen
+tc358762
+raspberrypi_gpiomem
+snd_bcm2835
+v3d
diff --git a/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-backlight.bb b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-backlight.bb
new file mode 100644
index 0000000..ee7d267
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-backlight.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Initramfs module for setting backlight"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${UNIT_CORE_LAYERDIR}/LICENSE;md5=38bf13be5d6979b28bd8adddb2f2f9b3"
+
+RDEPENDS:${PN} = "\
+ initramfs-framework-base \
+"
+
+SRC_URI = "file://backlight"
+
+S = "${UNPACKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${UNPACKDIR}/backlight ${D}/init.d/02-backlight
+}
+
+FILES:${PN} = "/init.d/02-backlight"
diff --git a/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-backlight/backlight b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-backlight/backlight
new file mode 100644
index 0000000..c4b9865
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-backlight/backlight
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+backlight_enabled() {
+ return 0
+}
+
+backlight_run() {
+ msg "Setting up display backlight..."
+
+ for dev in /sys/class/backlight/*; do
+ if [ -e "$dev/brightness" ]; then
+ echo "Found backlight on $i: $dev" > /dev/kmsg
+ echo 255 > "$dev/brightness"
+ echo "Backlight set to 255" > /dev/kmsg
+ return 0
+ fi
+ done
+
+ echo "No backlight device found" > /dev/kmsg
+}
diff --git a/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-plymouth.bb b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-plymouth.bb
new file mode 100644
index 0000000..04e1ec2
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-plymouth.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Initramfs module for Plymouth boot splash"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${UNIT_CORE_LAYERDIR}/LICENSE;md5=38bf13be5d6979b28bd8adddb2f2f9b3"
+
+RDEPENDS:${PN} = "\
+ plymouth \
+ plymouth-initrd \
+ plymouth-themes \
+ initramfs-framework-base \
+"
+
+SRC_URI = "file://plymouth"
+
+S = "${UNPACKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${UNPACKDIR}/plymouth ${D}/init.d/03-plymouth
+}
+
+FILES:${PN} = "/init.d/03-plymouth"
diff --git a/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-plymouth/plymouth b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-plymouth/plymouth
new file mode 100644
index 0000000..6036319
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/initrdscripts/initramfs-module-plymouth/plymouth
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+plymouth_enabled() {
+ return 0
+}
+
+plymouth_run() {
+ msg "Starting Plymouth boot splash..."
+
+ echo "Starting plymouthd..." > /dev/kmsg
+ PLYMOUTH_ARGS="--mode=boot --pid-file=/run/plymouth/pid --ignore-serial-consoles"
+ mkdir -p /dev/pts
+ mount -t devpts devpts /dev/pts 2>/dev/null || true
+ /usr/sbin/plymouthd ${PLYMOUTH_ARGS}
+
+ echo "Showing splash..." > /dev/kmsg
+ /usr/bin/plymouth show-splash
+}
diff --git a/meta-unit-graphics/recipes-core/packagegroups/packagegroup-unit-splash.bb b/meta-unit-graphics/recipes-core/packagegroups/packagegroup-unit-splash.bb
new file mode 100644
index 0000000..833cb21
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/packagegroups/packagegroup-unit-splash.bb
@@ -0,0 +1,6 @@
+SUMMARY = "Unit kiosk"
+
+inherit packagegroup
+
+RDEPENDS:${PN}:append = " u-boot-splash"
+RDEPENDS:${PN}:append = " plymouth-quit-conf"
diff --git a/meta-unit-graphics/recipes-core/plymouth-quit-conf/files/weston.conf b/meta-unit-graphics/recipes-core/plymouth-quit-conf/files/weston.conf
new file mode 100644
index 0000000..b158d66
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/plymouth-quit-conf/files/weston.conf
@@ -0,0 +1,3 @@
+[Unit]
+After=weston-ready.service
+Requires=weston-ready.service
diff --git a/meta-unit-graphics/recipes-core/plymouth-quit-conf/plymouth-quit-conf.bb b/meta-unit-graphics/recipes-core/plymouth-quit-conf/plymouth-quit-conf.bb
new file mode 100644
index 0000000..f6e8cb2
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/plymouth-quit-conf/plymouth-quit-conf.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Plymouth drop-in service configuration"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${UNIT_CORE_LAYERDIR}/LICENSE;md5=38bf13be5d6979b28bd8adddb2f2f9b3"
+
+RDEPENDS:${PN} = "\
+ plymouth \
+ systemd-weston-signal \
+"
+
+SRC_URI = "\
+ file://weston.conf \
+"
+
+S = "${UNPACKDIR}"
+
+do_install() {
+ install -d ${D}${systemd_system_unitdir}/plymouth-quit.service.d
+ install -m 0644 ${S}/weston.conf ${D}${systemd_system_unitdir}/plymouth-quit.service.d/weston.conf
+}
+
+FILES:${PN} = "\
+ ${systemd_system_unitdir}/plymouth-quit.service.d/weston.conf \
+"
diff --git a/meta-unit-graphics/recipes-core/plymouth-themes/plymouth-themes_git.bb b/meta-unit-graphics/recipes-core/plymouth-themes/plymouth-themes_git.bb
new file mode 100644
index 0000000..cbf3d83
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/plymouth-themes/plymouth-themes_git.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Plymouth theme collection"
+DESCRIPTION = "A huge collection (80+) of plymouth themes ported from android bootanimations"
+LICENSE = "GPL-3.0-only"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464"
+
+SRC_URI = "\
+ git://github.com/adi1090x/plymouth-themes;branch=master;protocol=https \
+"
+
+SRCREV = "5d8817458d764bff4ff9daae94cf1bbaabf16ede"
+
+PV = "1.0"
+
+RDEPENDS:${PN}:append = " plymouth"
+
+S = "${UNPACKDIR}/${PN}-${PV}"
+
+PLYMOUTH_THEMES ??= "pack_1/circuit pack_2/darth_vader pack_3/pixels pack_4/spin"
+
+do_install() {
+ install -d ${D}${datadir}/plymouth/themes/pixels
+
+ for theme_path in ${PLYMOUTH_THEMES}; do
+ # Drop pack from the path
+ theme_name=$(basename ${theme_path})
+
+ # Create theme destination directory
+ install -d ${D}${datadir}/plymouth/themes/${theme_name}
+
+ # Copy theme files
+ cp -r ${S}/${theme_path}/* ${D}${datadir}/plymouth/themes/${theme_name}/
+ done
+}
+
+FILES:${PN} = "\
+ ${datadir}/plymouth/themes/* \
+"
diff --git a/meta-unit-graphics/recipes-core/systemd/systemd-weston-signal.bb b/meta-unit-graphics/recipes-core/systemd/systemd-weston-signal.bb
new file mode 100644
index 0000000..8690db9
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/systemd/systemd-weston-signal.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Systemd service for notifying kiosk user that weston is ready"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${UNIT_GRAPHICS_LAYERDIR}/LICENSE;md5=a77c12e0c0e8a14cebb1494195720ccc"
+
+SYSTEMD_SERVICE:${PN} = "weston-ready.service"
+
+SRC_URI = "\
+ file://weston-ready.service \
+"
+
+RDEPENDS:${PN} = "\
+ add-user-kiosk \
+ weston \
+"
+
+S = "${UNPACKDIR}"
+
+do_install() {
+ install -D -p -m0644 ${S}/weston-ready.service ${D}${systemd_system_unitdir}/weston-ready.service
+}
+
+inherit systemd
+
+FILES:${PN} = "\
+ ${systemd_system_unitdir}/weston-ready.service \
+"
diff --git a/meta-unit-graphics/recipes-core/systemd/systemd-weston-signal/weston-ready.service b/meta-unit-graphics/recipes-core/systemd/systemd-weston-signal/weston-ready.service
new file mode 100644
index 0000000..e4670a6
--- /dev/null
+++ b/meta-unit-graphics/recipes-core/systemd/systemd-weston-signal/weston-ready.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Create Weston Ready Signal File For Kiosk User
+After=weston.socket
+BindsTo=weston.socket
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStartPre=/bin/sh -c 'rm -f /home/kiosk/.local/share/weston/weston-ready-signal'
+ExecStartPre=/bin/sh -c 'mkdir -p /home/kiosk/.local/share/weston'
+ExecStartPre=/bin/sh -c 'chown kiosk:kiosk /home/kiosk/.local/share/weston'
+ExecStart=/bin/sh -c 'touch /home/kiosk/.local/share/weston/weston-ready-signal && chmod 644 /home/kiosk/.local/share/weston/weston-ready-signal && chown kiosk:kiosk /home/kiosk/.local/share/weston/weston-ready-signal'
+ExecStopPost=/bin/sh -c 'rm -f /home/kiosk/.local/share/weston/weston-ready-signal'
+
+[Install]
+WantedBy=multi-user.target