1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-06-05 22:19:21 +02:00

MycroftOS: Initial work on boot/halt splashes

This commit is contained in:
Peter Steenbergen
2019-02-05 12:27:37 +01:00
parent 8ebaefa427
commit 9f374a530a
14 changed files with 78 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
menu "Mycroft A.I. Personal Assistant" menu "Mycroft A.I. Personal Assistant"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/python-mycroft/Config.in" source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/python-mycroft/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/mycroft-service/Config.in" source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/mycroft-service/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/mycroft-splash/Config.in"
menu "Additional drivers, libraries and/or applications" menu "Additional drivers, libraries and/or applications"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/fann/Config.in" source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/fann/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/respeaker/Config.in" source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/respeaker/Config.in"

View File

@@ -186,6 +186,7 @@ BR2_PACKAGE_HOST_PYTHON_SIX=y
BR2_PACKAGE_HOST_PYTHON_XLRD=y BR2_PACKAGE_HOST_PYTHON_XLRD=y
BR2_PACKAGE_PYTHON_MYCROFT=y BR2_PACKAGE_PYTHON_MYCROFT=y
BR2_PACKAGE_MYCROFT_SERVICE=y BR2_PACKAGE_MYCROFT_SERVICE=y
BR2_PACKAGE_MYCROFT_SPLASH=y
BR2_PACKAGE_FANN=y BR2_PACKAGE_FANN=y
BR2_PACKAGE_RESPEAKER=y BR2_PACKAGE_RESPEAKER=y
BR2_PACKAGE_PYTHON_ADAPT_PARSER=y BR2_PACKAGE_PYTHON_ADAPT_PARSER=y

View File

@@ -83,6 +83,7 @@ export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8 export LANGUAGE=en_US.UTF-8
function init-once() { function init-once() {
fbv -f -d 1 /opt/mycroft/splash/logo.png > /dev/null 2>&1
if ($first_time) ; then if ($first_time) ; then
echo "Initializing..." echo "Initializing..."
# Check if Mycroft log folders are present and if not # Check if Mycroft log folders are present and if not

View File

@@ -99,6 +99,7 @@ case ${OPT} in
end-process audio end-process audio
end-process speech end-process speech
end-process enclosure end-process enclosure
fbv -f -d 1 /opt/mycroft/splash/background.png > /dev/null 2>&1
;; ;;
"bus") "bus")
end-process messagebus.service end-process messagebus.service
@@ -125,4 +126,4 @@ esac
# 0 if nothing changed (e.g. --help or no process was running) # 0 if nothing changed (e.g. --help or no process was running)
# 100 at least one process was stopped # 100 at least one process was stopped
# 120 if any process had to be killed # 120 if any process had to be killed
exit $result exit $result

View File

@@ -0,0 +1,6 @@
config BR2_PACKAGE_MYCROFT_SPLASH
bool "mycroft-splash"
help
Show Mycroft A.I. branded splash screens on boot/halt.
https://mycroft.ai/ https://www.j1nx.nl

View File

@@ -0,0 +1,8 @@
[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

View File

@@ -0,0 +1,11 @@
[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

View File

@@ -0,0 +1,36 @@
################################################################################
#
# mycroft-splash
#
################################################################################
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
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
$(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
endef
$(eval $(generic-package))

View File

@@ -0,0 +1,12 @@
[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

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB