diff --git a/Makefile b/Makefile index cfcd59785..e72c668f0 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ core: zbm-release install -m 0644 -t "$(DESTDIR)/$(MANDIR)/man8" -D docs/man/dist/man8/*.8 install -m 0755 -t "$(DESTDIR)/$(EXAMPLES)/hooks" -D contrib/* install -m 0755 -t "$(DESTDIR)/$(EXAMPLES)" -D examples/* + install -m 0644 -t "$(DESTDIR)/$(EXAMPLES)" -D media/splash.bmp dracut: ./install-tree.sh dracut "$(DESTDIR)/$(DRACUTDIR)/90zfsbootmenu" diff --git a/bin/generate-zbm b/bin/generate-zbm index 1ff886e7b..67e2e9db2 100755 --- a/bin/generate-zbm +++ b/bin/generate-zbm @@ -762,6 +762,12 @@ sub createUEFIBundle { $uki_offset = addBundleSection( \@cmd, ".cmdline", $cmdline, $uki_offset, $uki_alignment ); } + if ( nonempty $config{EFI}{SplashImage} and -f $config{EFI}{SplashImage} ) { + # only supported with systemd-boot's efistub, + # but gummiboot doesn't care if the section exists + $uki_offset = addBundleSection( \@cmd, ".splash", $config{EFI}{SplashImage}, $uki_offset, $uki_alignment ); + } + $uki_offset = addBundleSection( \@cmd, ".initrd", $initramfs, $uki_offset, $uki_alignment ); # Add the kernel last, so that it can decompress without overflowing other sections diff --git a/docs/man/generate-zbm.5.rst b/docs/man/generate-zbm.5.rst index ec6146132..d7d905735 100644 --- a/docs/man/generate-zbm.5.rst +++ b/docs/man/generate-zbm.5.rst @@ -122,6 +122,10 @@ EFI The path to the EFI stub loader used to boot the unified bundle. If not set, a default of either ``/usr/lib/systemd/boot/efi/linuxx64.efi.stub`` or ``/usr/lib/gummiboot/linuxx64.efi.stub`` is assumed. +**SplashImage** + + The path to a bitmap image file (BMP) to use as a splash image before ZFSBootMenu loads. Only works if using systemd-boot's EFI stub loader. The ZFSBootMenu logo is available in BMP format at ``/usr/share/examples/zfsbootmenu/splash.bmp``. + EXAMPLE ======= diff --git a/etc/zfsbootmenu/config.yaml b/etc/zfsbootmenu/config.yaml index 261cc9b58..913015db8 100644 --- a/etc/zfsbootmenu/config.yaml +++ b/etc/zfsbootmenu/config.yaml @@ -13,5 +13,6 @@ EFI: ImageDir: /boot/efi/EFI/zbm Versions: false Enabled: false + SplashImage: /etc/zfsbootmenu/splash.bmp Kernel: CommandLine: ro quiet loglevel=0 diff --git a/etc/zfsbootmenu/release.yaml b/etc/zfsbootmenu/release.yaml index 7e96f93a5..a87c5666e 100644 --- a/etc/zfsbootmenu/release.yaml +++ b/etc/zfsbootmenu/release.yaml @@ -8,5 +8,6 @@ Components: EFI: Versions: false Enabled: true + SplashImage: /etc/zfsbootmenu/splash.bmp Kernel: CommandLine: quiet loglevel=0 nomodeset diff --git a/media/splash.bmp b/media/splash.bmp new file mode 100644 index 000000000..a62782219 Binary files /dev/null and b/media/splash.bmp differ