From 5b61ab9f2b01b9b98b3e52310e896039e93fdd17 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Fri, 2 Feb 2024 19:50:49 -0800 Subject: [PATCH] bin/generate-zbm: support including a splash image in unified EFI bundles --- Makefile | 1 + bin/generate-zbm | 6 ++++++ docs/man/generate-zbm.5.rst | 4 ++++ etc/zfsbootmenu/config.yaml | 1 + etc/zfsbootmenu/release.yaml | 1 + media/splash.bmp | Bin 0 -> 44026 bytes 6 files changed, 13 insertions(+) create mode 100644 media/splash.bmp 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 0000000000000000000000000000000000000000..a627822191f409b5aa79c1356222feee0224f849 GIT binary patch literal 44026 zcmeI5&ubjX6~{}HjbzK0T^60w7$e)s#X0zFV~lbNcw=-8AuM|yoWo)i@Q{ZPk#J<`hDBw`{~8I{{EY`KAui5 zTEC7YtxcSJ!V=Qf?p>)}TJ8I3V;3HAG_4nl#q^_|wKqj!F|D+O-nHa-8hVV7T%h8; zruUJUUF^+~Llf)jF*3`3QDH2W%$z%8c7hgf9v9V@Qb)4J=JblOwPJqG!l>4g0i!f$ zwPWp#b9+ottdXGMK8tEMY+~P`ZZ-8s_5NC8KHm~5N8B@S)ki|mf zu2*=aGtNSNgjXjF#{29;(*DNk1kKym8PCB(h^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