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 18, 2024
1 parent 4a034be commit 5b61ab9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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. The ZFSBootMenu logo is available in BMP format at ``/usr/share/examples/zfsbootmenu/splash.bmp``.

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
1 change: 1 addition & 0 deletions etc/zfsbootmenu/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ Components:
EFI:
Versions: false
Enabled: true
SplashImage: /etc/zfsbootmenu/splash.bmp
Kernel:
CommandLine: quiet loglevel=0 nomodeset
Binary file added media/splash.bmp
Binary file not shown.

0 comments on commit 5b61ab9

Please sign in to comment.