package/psplash: add support to psplash personalized png image

Add an configuration to use personalized png image. If the configuration is
empty we keep the psplash default image.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
[Arnout: use ifneq condition instead of $(if ...)]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Kory Maincent 2021-10-07 11:31:01 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 21d2a0c2ec
commit 7ab915fe4c
2 changed files with 20 additions and 0 deletions
package/psplash

View File

@ -27,5 +27,15 @@ config BR2_PACKAGE_PSPLASH
http://git.yoctoproject.org/cgit/cgit.cgi/psplash/
if BR2_PACKAGE_PSPLASH
config BR2_PACKAGE_PSPLASH_IMAGE
string "psplash image"
help
Use a personalized png image as boot splash.
Let it empty if you want to keep the psplash default image.
endif
comment "psplash needs a toolchain w/ wchar"
depends on !BR2_USE_WCHAR

View File

@ -18,6 +18,16 @@ else
PSPLASH_CONF_OPTS += --without-systemd
endif
PSPLASH_IMAGE = $(call qstrip,$(BR2_PACKAGE_PSPLASH_IMAGE))
ifneq ($(PSPLASH_IMAGE),)
define PSPLASH_COPY_IMAGE
cp $(PSPLASH_IMAGE) $(@D)/base-images/psplash-poky.png
endef
PSPLASH_POST_EXTRACT_HOOKS += PSPLASH_COPY_IMAGE
endif
define PSPLASH_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/psplash/psplash-start.service \
$(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service