Skip to content

Commit

Permalink
bin/generate-zbm: support including a splash image in unified EFI bun…
Browse files Browse the repository at this point in the history
…dles
  • Loading branch information
classabbyamp committed Feb 10, 2024
1 parent e8b0153 commit 3377a1d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ install: core dracut initcpio zbm-release
core: zbm-release
./install-tree.sh zfsbootmenu "$(DESTDIR)/$(MODDIR)/zfsbootmenu"
install -m 0644 -t "$(DESTDIR)/$(CONFDIR)" -D etc/zfsbootmenu/config.yaml
install -m 0644 -t "$(DESTDIR)/$(CONFDIR)" -D etc/zfsbootmenu/splash.bmp
install -m 0755 -t "$(DESTDIR)/$(BINDIR)" -D bin/*
install -m 0644 -t "$(DESTDIR)/$(MANDIR)/man5" -D docs/man/dist/man5/*.5
install -m 0644 -t "$(DESTDIR)/$(MANDIR)/man7" -D docs/man/dist/man7/*.7
Expand Down
6 changes: 6 additions & 0 deletions bin/generate-zbm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions docs/man/generate-zbm.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

EXAMPLE
=======

Expand Down
1 change: 1 addition & 0 deletions etc/zfsbootmenu/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file added etc/zfsbootmenu/splash.bmp
Binary file not shown.

0 comments on commit 3377a1d

Please sign in to comment.