diff --git a/buildroot-external/Config.in b/buildroot-external/Config.in index 5a26a710..5b9e354a 100644 --- a/buildroot-external/Config.in +++ b/buildroot-external/Config.in @@ -6,6 +6,7 @@ menu "Mycroft A.I. Personal Assistant" source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-gui/Config.in" source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-service/Config.in" source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-splash/Config.in" + source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/ovos-splash/Config.in" menu "Additional drivers, libraries and/or applications" source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/alsa-plugins/Config.in" source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/baresip/Config.in" diff --git a/buildroot-external/configs/rpi4_64-gui_defconfig b/buildroot-external/configs/rpi4_64-gui_defconfig index 83b79987..2aa0cebd 100644 --- a/buildroot-external/configs/rpi4_64-gui_defconfig +++ b/buildroot-external/configs/rpi4_64-gui_defconfig @@ -482,7 +482,7 @@ BR2_PACKAGE_PYTHON_MYCROFT=y BR2_PACKAGE_MYCROFT_EMBEDDED_SHELL=y BR2_PACKAGE_MYCROFT_GUI=y BR2_PACKAGE_MYCROFT_SERVICE=y -BR2_PACKAGE_MYCROFT_SPLASH=y +BR2_PACKAGE_OVOS_SPLASH=y BR2_PACKAGE_ALSA_PLUGINS=y BR2_PACKAGE_BARESIP=y BR2_PACKAGE_BTSPEAKER=y diff --git a/buildroot-external/package/ovos-splash/Config.in b/buildroot-external/package/ovos-splash/Config.in new file mode 100644 index 00000000..340c3218 --- /dev/null +++ b/buildroot-external/package/ovos-splash/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_OVOS_SPLASH + bool "ovos-splash" + depends on BR2_USE_WCHAR + help + Show OVOS branded splash screens during + boot/halt process based on psplash. + + 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/ovos-splash/base-images/psplash-bar.png b/buildroot-external/package/ovos-splash/base-images/psplash-bar.png new file mode 100644 index 00000000..f16371a9 Binary files /dev/null and b/buildroot-external/package/ovos-splash/base-images/psplash-bar.png differ diff --git a/buildroot-external/package/ovos-splash/base-images/psplash-hand.png b/buildroot-external/package/ovos-splash/base-images/psplash-hand.png new file mode 100644 index 00000000..35498d3b Binary files /dev/null and b/buildroot-external/package/ovos-splash/base-images/psplash-hand.png differ diff --git a/buildroot-external/package/ovos-splash/base-images/psplash-poky.png b/buildroot-external/package/ovos-splash/base-images/psplash-poky.png new file mode 100644 index 00000000..1a70dbdd Binary files /dev/null and b/buildroot-external/package/ovos-splash/base-images/psplash-poky.png differ diff --git a/buildroot-external/package/ovos-splash/ovos-splash-quit.service b/buildroot-external/package/ovos-splash/ovos-splash-quit.service new file mode 100644 index 00000000..ef35562a --- /dev/null +++ b/buildroot-external/package/ovos-splash/ovos-splash-quit.service @@ -0,0 +1,12 @@ +[Unit] +Description=Terminate OVOS splash boot Screen +After=ovos-splash-start.service +After=mycroft-messagebus.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/psplash-write QUIT +TimeoutSec=20 + +[Install] +WantedBy=multi-user.target diff --git a/buildroot-external/package/ovos-splash/ovos-splash-start.service b/buildroot-external/package/ovos-splash/ovos-splash-start.service new file mode 100644 index 00000000..040fced5 --- /dev/null +++ b/buildroot-external/package/ovos-splash/ovos-splash-start.service @@ -0,0 +1,14 @@ +[Unit] +Description=Starts OVOS splash boot screen +Wants=dev-dri-card0.device +After=dev-dri-card0.device +DefaultDependencies=no + +[Service] +Type=oneshot +ExecStart=/usr/bin/psplash +RemainAfterExit=yes +Restart=no + +[Install] +WantedBy=sysinit.target diff --git a/buildroot-external/package/ovos-splash/ovos-splash.mk b/buildroot-external/package/ovos-splash/ovos-splash.mk new file mode 100644 index 00000000..c1d311e0 --- /dev/null +++ b/buildroot-external/package/ovos-splash/ovos-splash.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# ovos-splash +# +################################################################################ + +OVOS_SPLASH_SOURCE = psplash-0a902f7cd875ccf018456451be369f05fa55f962.tar.gz +OVOS_SPLASH_SITE = http://git.yoctoproject.org/cgit/cgit.cgi/psplash/snapshot +OVOS_SPLASH_LICENSE = GPL-2.0+ +OVOS_SPLASH_LICENSE_FILES = COPYING +OVOS_SPLASH_AUTORECONF = YES + +define OVOS_SPLASH_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-splash/ovos-splash-start.service \ + $(TARGET_DIR)/usr/lib/systemd/system/ovos-splash-start.service + + $(INSTALL) -D -m 644 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-splash/ovos-splash-quit.service \ + $(TARGET_DIR)/usr/lib/systemd/system/ovos-splash-quit.service +endef + +define OVOS_SPLASH_CHANGE_IMAGE + cp $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-splash/psplash-colors.h $(@D) + cp $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-splash/psplash-config.h $(@D) + cp $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-splash/base-images/* $(@D)/base-images/ +endef + +OVOS_SPLASH_PRE_CONFIGURE_HOOKS += OVOS_SPLASH_CHANGE_IMAGE + +$(eval $(autotools-package)) diff --git a/buildroot-external/package/ovos-splash/psplash-colors.h b/buildroot-external/package/ovos-splash/psplash-colors.h new file mode 100644 index 00000000..d524ed67 --- /dev/null +++ b/buildroot-external/package/ovos-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 0x00,0x00,0x00 + +/* 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 0xff,0xff,0xff + +/* This is the color of the progress bar background */ +#define PSPLASH_BAR_BACKGROUND_COLOR 0x00,0x00,0x00 + +#endif diff --git a/buildroot-external/package/ovos-splash/psplash-config.h b/buildroot-external/package/ovos-splash/psplash-config.h new file mode 100644 index 00000000..0bd12b4c --- /dev/null +++ b/buildroot-external/package/ovos-splash/psplash-config.h @@ -0,0 +1,30 @@ +/* + * pslash - a lightweight framebuffer splashscreen for embedded devices. + * + * Copyright (c) 2014 MenloSystems GmbH + * Author: Olaf Mandel + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + */ + +#ifndef _HAVE_PSPLASH_CONFIG_H +#define _HAVE_PSPLASH_CONFIG_H + +/* Text to output on program start; if undefined, output nothing */ +#ifndef PSPLASH_DISABLE_STARTUP_MSG +#define PSPLASH_STARTUP_MSG "" +#endif + +/* Bool indicating if the image is fullscreen, as opposed to split screen */ +#ifndef PSPLASH_IMG_FULLSCREEN +#define PSPLASH_IMG_FULLSCREEN 1 +#endif + +/* Position of the image split from top edge, numerator of fraction */ +#define PSPLASH_IMG_SPLIT_NUMERATOR 6 + +/* Position of the image split from top edge, denominator of fraction */ +#define PSPLASH_IMG_SPLIT_DENOMINATOR 7 + +#endif diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-mycroftos.preset b/buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-ovos.preset similarity index 83% rename from buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-mycroftos.preset rename to buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-ovos.preset index acb50d92..aae15928 100644 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-mycroftos.preset +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/10-ovos.preset @@ -10,9 +10,9 @@ enable seeed-voicecard.service enable NetworkManager.service enable wifi-connect.service -enable mycroft-splash-start.service -enable mycroft-splash-40.service -enable mycroft-splash-60.service +enable ovos-splash-start.service +enable ovos-splash-40.service +enable ovos-splash-60.service enable mycroft.service enable mycroft-messagebus.service enable mycroft-voice.service @@ -20,7 +20,7 @@ enable mycroft-audio.service enable mycroft-skills.service enable mycroft-enclosure.service enable mycroft-gui.service -enable mycroft-splash-quit.service +enable ovos-splash-quit.service disable getty@.service disable mosquitto.service diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/mycroft-splash-40.service b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/ovos-splash-40.service similarity index 77% rename from buildroot-external/rootfs-overlay/usr/lib/systemd/system/mycroft-splash-40.service rename to buildroot-external/rootfs-overlay/usr/lib/systemd/system/ovos-splash-40.service index 517252ca..10ded82d 100644 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/mycroft-splash-40.service +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/ovos-splash-40.service @@ -1,5 +1,5 @@ [Unit] -Description=Update Mycroft splash boot screen to 40% +Description=Update OVOS splash boot screen to 40% Wants=NetworkManager.service After=NetworkManager.service DefaultDependencies=no diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/mycroft-splash-60.service b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/ovos-splash-60.service similarity index 79% rename from buildroot-external/rootfs-overlay/usr/lib/systemd/system/mycroft-splash-60.service rename to buildroot-external/rootfs-overlay/usr/lib/systemd/system/ovos-splash-60.service index abd1134d..4bd7323c 100644 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/mycroft-splash-60.service +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/ovos-splash-60.service @@ -1,5 +1,5 @@ [Unit] -Description=Update Mycroft splash boot screen to 60% +Description=Update OVOS splash boot screen to 60% Wants=NetworkManager-wait-online.service After=NetworkManager-wait-online.service DefaultDependencies=no diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/mycroft-splash-start.service.d/splash.conf b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/ovos-splash-start.service.d/splash.conf similarity index 100% rename from buildroot-external/rootfs-overlay/usr/lib/systemd/system/mycroft-splash-start.service.d/splash.conf rename to buildroot-external/rootfs-overlay/usr/lib/systemd/system/ovos-splash-start.service.d/splash.conf