diff --git a/buildroot-external/configs/rpi3_defconfig b/buildroot-external/configs/rpi3_defconfig index 34aeb4d6..01516930 100644 --- a/buildroot-external/configs/rpi3_defconfig +++ b/buildroot-external/configs/rpi3_defconfig @@ -123,7 +123,6 @@ BR2_PACKAGE_FBGRAB=y BR2_PACKAGE_FBSET=y BR2_PACKAGE_FBV=y BR2_PACKAGE_FREERDP=y -BR2_PACKAGE_PSPLASH=y BR2_PACKAGE_SDL2_DIRECTFB=y BR2_PACKAGE_SDL2_OPENGLES=y BR2_PACKAGE_SDL2_GFX=y diff --git a/buildroot-external/package/mycroft-splash/Config.in b/buildroot-external/package/mycroft-splash/Config.in index 7817135b..468d1ef8 100644 --- a/buildroot-external/package/mycroft-splash/Config.in +++ b/buildroot-external/package/mycroft-splash/Config.in @@ -1,6 +1,34 @@ config BR2_PACKAGE_MYCROFT_SPLASH bool "mycroft-splash" + depends on BR2_USE_WCHAR help - Show Mycroft A.I. branded splash screens on boot/halt. + Show Mycroft A.I. branded splash screens during + boot/halt process based on psplash. - https://mycroft.ai/ https://www.j1nx.nl + PSplash is a userspace graphical boot splash screen for + mainly embedded Linux devices supporting a 16bpp or 32bpp + framebuffer. It has few dependencies (just libc), supports + basic images and text and handles rotation. Its visual look + is configurable by basic source changes. + + Also included is a 'client' command utility for sending + information to psplash such as boot progress information. + + Start the drawing process with 'psplash -n&' as early as + possible. Note: psplash creates a FIFO in /tmp for + communication with psplash-write. + + Usage: + * Set progress bar to 50 percent: + psplash-write "PROGRESS 50" + + * Display message "foobar" above progress bar: + psplash-write "MSG foobar" + + * Terminate psplash: + psplash-write "QUIT" + + http://git.yoctoproject.org/cgit/cgit.cgi/psplash/ + +comment "mycroft-splash needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/buildroot-external/package/mycroft-splash/base-images/psplash-bar.png b/buildroot-external/package/mycroft-splash/base-images/psplash-bar.png new file mode 100644 index 00000000..56e1d86c Binary files /dev/null and b/buildroot-external/package/mycroft-splash/base-images/psplash-bar.png differ diff --git a/buildroot-external/package/mycroft-splash/base-images/psplash-hand.png b/buildroot-external/package/mycroft-splash/base-images/psplash-hand.png new file mode 100644 index 00000000..35498d3b Binary files /dev/null and b/buildroot-external/package/mycroft-splash/base-images/psplash-hand.png differ diff --git a/buildroot-external/package/mycroft-splash/base-images/psplash-poky.png b/buildroot-external/package/mycroft-splash/base-images/psplash-poky.png new file mode 100644 index 00000000..72750920 Binary files /dev/null and b/buildroot-external/package/mycroft-splash/base-images/psplash-poky.png differ diff --git a/buildroot-external/package/mycroft-splash/boot-splashscreen.service b/buildroot-external/package/mycroft-splash/boot-splashscreen.service deleted file mode 100644 index f424c898..00000000 --- a/buildroot-external/package/mycroft-splash/boot-splashscreen.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Mycroft AI boot splash screen - -[Service] -ExecStart=fbv -f -d 1 /opt/mycroft/splash/boot.png > /dev/null 2>&1 - -[Install] -WantedBy=basic.target diff --git a/buildroot-external/package/mycroft-splash/halt-splashscreen.service b/buildroot-external/package/mycroft-splash/halt-splashscreen.service deleted file mode 100644 index c4af7fd3..00000000 --- a/buildroot-external/package/mycroft-splash/halt-splashscreen.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Mycroft AI halt splash screen -DefaultDependencies=no -Before=halt.target - -[Service] -ExecStart=fbv -f -d 1 /opt/mycroft/splash/down.png > /dev/null 2>&1 -Type=oneshot - -[Install] -WantedBy=halt.target poweroff.target diff --git a/buildroot-external/package/mycroft-splash/mycroft-splash-quit.service b/buildroot-external/package/mycroft-splash/mycroft-splash-quit.service new file mode 100644 index 00000000..572ce4ec --- /dev/null +++ b/buildroot-external/package/mycroft-splash/mycroft-splash-quit.service @@ -0,0 +1,11 @@ +[Unit] +Description=Terminate Mycroft splash boot Screen +After=psplash-start.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/psplash-write QUIT +TimeoutSec=20 + +[Install] +WantedBy=multi-user.target diff --git a/buildroot-external/package/mycroft-splash/mycroft-splash-start.service b/buildroot-external/package/mycroft-splash/mycroft-splash-start.service new file mode 100644 index 00000000..c2a4c9c9 --- /dev/null +++ b/buildroot-external/package/mycroft-splash/mycroft-splash-start.service @@ -0,0 +1,11 @@ +[Unit] +Description=Starts Mycroft splash boot screen +Wants=systemd-vconsole-setup.service +After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service +DefaultDependencies=no + +[Service] +ExecStart=/usr/bin/psplash -n + +[Install] +WantedBy=sysinit.target diff --git a/buildroot-external/package/mycroft-splash/mycroft-splash.mk b/buildroot-external/package/mycroft-splash/mycroft-splash.mk index b4b41397..d2aa88d7 100644 --- a/buildroot-external/package/mycroft-splash/mycroft-splash.mk +++ b/buildroot-external/package/mycroft-splash/mycroft-splash.mk @@ -4,33 +4,31 @@ # ################################################################################ -MYCROFT_SPLASH_VERSION = 0.1.0 -MYCROFT_SPLASH_SITE = $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/mycroft-splash -MYCROFT_SPLASH_SITE_METHOD = local -MYCROFT_SPLASH_LICENSE = Apache License 2.0 -MYCROFT_SPLASH_LICENSE_FILES = LICENSE +MYCROFT_SPLASH_SOURCE = psplash-0a902f7cd875ccf018456451be369f05fa55f962.tar.gz +MYCROFT_SPLASH_SITE = http://git.yoctoproject.org/cgit/cgit.cgi/psplash/snapshot +MYCROFT_SPLASH_LICENSE = GPL-2.0+ +MYCROFT_SPLASH_LICENSE_FILES = COPYING +MYCROFT_SPLASH_AUTORECONF = YES -define MYCROFT_SPLASH_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 644 $(@D)/boot-splashscreen.service \ - $(TARGET_DIR)/usr/lib/systemd/system/boot-splashscreen.service - mkdir -p $(TARGET_DIR)/etc/systemd/system/basic.target.wants - ln -fs ../../../../usr/lib/systemd/system/boot-splashscreen.service \ - $(TARGET_DIR)/etc/systemd/system/basic.target.wants/boot-splashscreen.service +define MYCROFT_SPLASH_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/mycroft-splash/mycroft-splash-start.service \ + $(TARGET_DIR)/usr/lib/systemd/system/mycroft-splash-start.service + $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants + ln -sf ../../../../usr/lib/systemd/system/mycroft-splash-start.service \ + $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/ - $(INSTALL) -D -m 644 $(@D)/halt-splashscreen.service \ - $(TARGET_DIR)/usr/lib/systemd/system/halt-splashscreen.service - mkdir -p $(TARGET_DIR)/etc/systemd/system/halt.target.wants - ln -fs ../../../../usr/lib/systemd/system/halt-splashscreen.service \ - $(TARGET_DIR)/etc/systemd/system/halt.target.wants/halt-splashscreen.service - mkdir -p $(TARGET_DIR)/etc/systemd/system/poweroff.target.wants - ln -fs ../../../../usr/lib/systemd/system/halt-splashscreen.service \ - $(TARGET_DIR)/etc/systemd/system/poweroff.target.wants/halt-splashscreen.service - - $(INSTALL) -D -m 644 $(@D)/off-splashscreen.service \ - $(TARGET_DIR)/usr/lib/systemd/system/off-splashscreen.service - mkdir -p $(TARGET_DIR)/etc/systemd/system/shutdown.target.wants - ln -fs ../../../../usr/lib/systemd/system/off-splashscreen.service \ - $(TARGET_DIR)/etc/systemd/system/shutdown.target.wants/off-splashscreen.service + $(INSTALL) -D -m 644 $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/mycroft-splash/mycroft-splash-quit.service \ + $(TARGET_DIR)/usr/lib/systemd/system/mycroft-splash-quit.service + $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/mycroft-splash-quit.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ endef -$(eval $(generic-package)) +define MYCROFT_SPLASH_CHANGE_IMAGE + cp $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/mycroft-splash/psplash-colors.h $(@D) + cp $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/mycroft-splash/base-images/* $(@D)/base-images/ +endef + +MYCROFT_SPLASH_PRE_CONFIGURE_HOOKS += MYCROFT_SPLASH_CHANGE_IMAGE + +$(eval $(autotools-package)) diff --git a/buildroot-external/package/mycroft-splash/off-splashscreen.service b/buildroot-external/package/mycroft-splash/off-splashscreen.service deleted file mode 100644 index 63b3cb88..00000000 --- a/buildroot-external/package/mycroft-splash/off-splashscreen.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Mycroft AI safe power off splash screen -DefaultDependencies=no -After=umount.target -Before=final.target - -[Service] -ExecStart=fbv -f -d 1 /opt/mycroft/splash/off.png > /dev/null 2>&1 -Type=oneshot - -[Install] -WantedBy=shutdown.target diff --git a/buildroot-external/package/mycroft-splash/psplash-colors.h b/buildroot-external/package/mycroft-splash/psplash-colors.h new file mode 100644 index 00000000..98006ecb --- /dev/null +++ b/buildroot-external/package/mycroft-splash/psplash-colors.h @@ -0,0 +1,26 @@ +/* + * pslash - a lightweight framebuffer splashscreen for embedded devices. + * + * Copyright (c) 2012 sleep(5) ltd + * Author: Tomas Frydrych + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + */ + +#ifndef _HAVE_PSPLASH_COLORS_H +#define _HAVE_PSPLASH_COLORS_H + +/* This is the overall background color */ +#define PSPLASH_BACKGROUND_COLOR 0x22,0xa7,0xf0 + +/* This is the color of any text output */ +#define PSPLASH_TEXT_COLOR 0xff,0xff,0xff + +/* This is the color of the progress bar indicator */ +#define PSPLASH_BAR_COLOR 0x2c,0x3e,0x50 + +/* This is the color of the progress bar background */ +#define PSPLASH_BAR_BACKGROUND_COLOR 0x22,0xa7,0xf0 + +#endif