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:
@@ -1,6 +1,7 @@
|
||||
menu "Mycroft A.I. Personal Assistant"
|
||||
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-splash/Config.in"
|
||||
menu "Additional drivers, libraries and/or applications"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/fann/Config.in"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/respeaker/Config.in"
|
||||
|
@@ -186,6 +186,7 @@ BR2_PACKAGE_HOST_PYTHON_SIX=y
|
||||
BR2_PACKAGE_HOST_PYTHON_XLRD=y
|
||||
BR2_PACKAGE_PYTHON_MYCROFT=y
|
||||
BR2_PACKAGE_MYCROFT_SERVICE=y
|
||||
BR2_PACKAGE_MYCROFT_SPLASH=y
|
||||
BR2_PACKAGE_FANN=y
|
||||
BR2_PACKAGE_RESPEAKER=y
|
||||
BR2_PACKAGE_PYTHON_ADAPT_PARSER=y
|
||||
|
@@ -83,6 +83,7 @@ export LANG=en_US.UTF-8
|
||||
export LANGUAGE=en_US.UTF-8
|
||||
|
||||
function init-once() {
|
||||
fbv -f -d 1 /opt/mycroft/splash/logo.png > /dev/null 2>&1
|
||||
if ($first_time) ; then
|
||||
echo "Initializing..."
|
||||
# Check if Mycroft log folders are present and if not
|
||||
|
@@ -99,6 +99,7 @@ case ${OPT} in
|
||||
end-process audio
|
||||
end-process speech
|
||||
end-process enclosure
|
||||
fbv -f -d 1 /opt/mycroft/splash/background.png > /dev/null 2>&1
|
||||
;;
|
||||
"bus")
|
||||
end-process messagebus.service
|
||||
@@ -125,4 +126,4 @@ esac
|
||||
# 0 if nothing changed (e.g. --help or no process was running)
|
||||
# 100 at least one process was stopped
|
||||
# 120 if any process had to be killed
|
||||
exit $result
|
||||
exit $result
|
||||
|
6
buildroot-external/package/mycroft-splash/Config.in
Normal file
6
buildroot-external/package/mycroft-splash/Config.in
Normal 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
|
@@ -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
|
@@ -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
|
36
buildroot-external/package/mycroft-splash/mycroft-splash.mk
Normal file
36
buildroot-external/package/mycroft-splash/mycroft-splash.mk
Normal 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))
|
@@ -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 |
BIN
buildroot-external/rootfs-overlay/opt/mycroft/splash/down.png
Normal file
BIN
buildroot-external/rootfs-overlay/opt/mycroft/splash/down.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
BIN
buildroot-external/rootfs-overlay/opt/mycroft/splash/logo.png
Normal file
BIN
buildroot-external/rootfs-overlay/opt/mycroft/splash/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 98 KiB |
BIN
buildroot-external/rootfs-overlay/opt/mycroft/splash/off.png
Normal file
BIN
buildroot-external/rootfs-overlay/opt/mycroft/splash/off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
Reference in New Issue
Block a user