bin/generate-zbm: support including a splash image in unified EFI bundles

This commit is contained in:
classabbyamp 2024-02-02 19:50:49 -08:00 committed by classabbyamp
parent 4a034bef96
commit 5b61ab9f2b
6 changed files with 13 additions and 0 deletions

View File

@ -21,6 +21,7 @@ core: zbm-release
install -m 0644 -t "$(DESTDIR)/$(MANDIR)/man8" -D docs/man/dist/man8/*.8 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)/hooks" -D contrib/*
install -m 0755 -t "$(DESTDIR)/$(EXAMPLES)" -D examples/* install -m 0755 -t "$(DESTDIR)/$(EXAMPLES)" -D examples/*
install -m 0644 -t "$(DESTDIR)/$(EXAMPLES)" -D media/splash.bmp
dracut: dracut:
./install-tree.sh dracut "$(DESTDIR)/$(DRACUTDIR)/90zfsbootmenu" ./install-tree.sh dracut "$(DESTDIR)/$(DRACUTDIR)/90zfsbootmenu"

View File

@ -762,6 +762,12 @@ sub createUEFIBundle {
$uki_offset = addBundleSection( \@cmd, ".cmdline", $cmdline, $uki_offset, $uki_alignment ); $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 ); $uki_offset = addBundleSection( \@cmd, ".initrd", $initramfs, $uki_offset, $uki_alignment );
# Add the kernel last, so that it can decompress without overflowing other sections # Add the kernel last, so that it can decompress without overflowing other sections

View File

@ -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. 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 EXAMPLE
======= =======

View File

@ -13,5 +13,6 @@ EFI:
ImageDir: /boot/efi/EFI/zbm ImageDir: /boot/efi/EFI/zbm
Versions: false Versions: false
Enabled: false Enabled: false
SplashImage: /etc/zfsbootmenu/splash.bmp
Kernel: Kernel:
CommandLine: ro quiet loglevel=0 CommandLine: ro quiet loglevel=0

View File

@ -8,5 +8,6 @@ Components:
EFI: EFI:
Versions: false Versions: false
Enabled: true Enabled: true
SplashImage: /etc/zfsbootmenu/splash.bmp
Kernel: Kernel:
CommandLine: quiet loglevel=0 nomodeset CommandLine: quiet loglevel=0 nomodeset

BIN
media/splash.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB