From ba6bb0a86798446fe37faece2cb0ca5006e5c6ef Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Mon, 8 Apr 2019 23:32:30 +0200 Subject: [PATCH] dotsplash: initial recipe --- recipes-bsp/dotsplash/dotsplash_git.bb | 34 +++++++++++++++++++ recipes-bsp/dotsplash/files/dotsplash-default | 2 ++ recipes-bsp/dotsplash/files/dotsplash-init | 17 ++++++++++ recipes-bsp/dotsplash/files/splashfuncs | 29 ++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 recipes-bsp/dotsplash/dotsplash_git.bb create mode 100644 recipes-bsp/dotsplash/files/dotsplash-default create mode 100644 recipes-bsp/dotsplash/files/dotsplash-init create mode 100644 recipes-bsp/dotsplash/files/splashfuncs diff --git a/recipes-bsp/dotsplash/dotsplash_git.bb b/recipes-bsp/dotsplash/dotsplash_git.bb new file mode 100644 index 0000000..903927c --- /dev/null +++ b/recipes-bsp/dotsplash/dotsplash_git.bb @@ -0,0 +1,34 @@ +SUMMARY = "./dotsplash - a tiny and customizable splash screen" +LICENSE = "GPLv2" +PV = "1.0+git${SRCPV}" +SRCREV = "eac58fd508efaa3215094085daa06a58d6d7a75c" + + +LIC_FILES_CHKSUM = "file://COPYING;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0" + +SRC_URI = "git://git@gitlab.kernelconcepts.de:2224/danb/mucross_psplash.git;protocol=ssh \ + file://dotsplash-default \ + file://dotsplash-init \ + file://splashfuncs" + +inherit pkgconfig update-rc.d meson + + +S = "${WORKDIR}/git" + +FILES_${PN} += "/mnt/.dotsplash/" + +PACKAGES =+ "${PN}-themes" +FILES_${PN}-themes += "${datadir}/dotsplash/themes/*" + +do_install_append() { + install -d ${D}/mnt/.dotsplash/ + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/dotsplash-init ${D}${sysconfdir}/init.d/dotsplash.sh + install -d ${D}${sysconfdir}/default/ + install -m 0644 ${WORKDIR}/dotsplash-default ${D}${sysconfdir}/default/dotsplash + install -m 0755 ${WORKDIR}/splashfuncs ${D}${sysconfdir}/default/splashfuncs +} + +INITSCRIPT_NAME = "dotsplash.sh" +INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ." diff --git a/recipes-bsp/dotsplash/files/dotsplash-default b/recipes-bsp/dotsplash/files/dotsplash-default new file mode 100644 index 0000000..0e2d8fd --- /dev/null +++ b/recipes-bsp/dotsplash/files/dotsplash-default @@ -0,0 +1,2 @@ +# Parameters to pass to dotplash +PARAMS=" -a 0 --theme mucross" diff --git a/recipes-bsp/dotsplash/files/dotsplash-init b/recipes-bsp/dotsplash/files/dotsplash-init new file mode 100644 index 0000000..28ec360 --- /dev/null +++ b/recipes-bsp/dotsplash/files/dotsplash-init @@ -0,0 +1,17 @@ +#!/bin/sh + +if grep -qE '\s?psplash=false\s?' /proc/cmdline; then + echo "Boot splashscreen disabled" + exit 0; +fi + +. /etc/init.d/functions +. /etc/default/dotplash + +export TMPDIR=/mnt/.splash +mount tmpfs -t tmpfs $TMPDIR -o,size=40k + +/usr/bin/dotsplash $PARAMS & + +# Timetrap against hanging with splash hiding console messages. +(sleep 120; dotsplash-write "QUIT") & diff --git a/recipes-bsp/dotsplash/files/splashfuncs b/recipes-bsp/dotsplash/files/splashfuncs new file mode 100644 index 0000000..ada2a96 --- /dev/null +++ b/recipes-bsp/dotsplash/files/splashfuncs @@ -0,0 +1,29 @@ +status() { + if type splash-write >/dev/null 2>&1; then + (TMPDIR="/mnt/.splash" EXQUISITE_IPC="$TMPDIR/exquisite" splash-write "$1" || true) & + fi +} + +status_position() { + status "PROGRESS $1" +} + +status_title() { + status "TITLE $1" +} + +status_text() { + if test -n "$1"; then + status "MSG $1" + else + status "CLEAR" + fi +} + +status_pulse() { + status "PULSATE" +} + +status_tick() { + status "TICK" +} -- 2.39.5