mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-02-02 19:57:19 +01:00
MycroftOS: Change mycroft-splash to use psplash instead.
This commit is contained in:
parent
82c860e05e
commit
b2d7c978f6
@ -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
|
||||
|
@ -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
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 544 B |
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.8 KiB |
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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))
|
||||
|
@ -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
|
26
buildroot-external/package/mycroft-splash/psplash-colors.h
Normal file
26
buildroot-external/package/mycroft-splash/psplash-colors.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* pslash - a lightweight framebuffer splashscreen for embedded devices.
|
||||
*
|
||||
* Copyright (c) 2012 sleep(5) ltd
|
||||
* Author: Tomas Frydrych <tomas@sleepfive.com>
|
||||
*
|
||||
* 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
|
Loading…
x
Reference in New Issue
Block a user