Switch memdisk compression to lzop

xz decompression is very slow and slows down boot by around 5 seconds on
aarch64/Apple M1 when using the default font. Switch to lzop, which
takes less than one second to uncompress.

This increases EFI core image size by around 11%.

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2024-01-10 22:35:30 +09:00
parent a162c0412f
commit 0c1c9228d2
2 changed files with 7 additions and 4 deletions

View File

@ -419,7 +419,7 @@ rm -f %{1}.conf \
%define efi_mkimage() \
mkdir -p memdisk/fonts \
cp %{4}/unicode.pf2 memdisk/fonts \
mksquashfs memdisk memdisk.squashfs -comp xz \
mksquashfs memdisk memdisk.squashfs -comp lzo \
%{4}./grub-mkimage -O %{1} -o %{2}.orig \\\
-d grub-core \\\
--sbat %{4}./sbat.csv \\\
@ -448,14 +448,14 @@ mksquashfs memdisk memdisk.squashfs -comp xz \
%define ieee1275_mkimage() \
mkdir -p memdisk/fonts \
cp %{5}/unicode.pf2 memdisk/fonts \
mksquashfs memdisk memdisk.squashfs -comp xz \
mksquashfs memdisk memdisk.squashfs -comp lzo \
./grub-mkimage -O %{1} -o %{2} -p '/grub2' -d grub-core ${GRUB_MODULES} \
%{nil}
%else
%define ieee1275_mkimage() \
mkdir -p memdisk/fonts \
cp %{5}/unicode.pf2 memdisk/fonts \
mksquashfs memdisk memdisk.squashfs -comp xz \
mksquashfs memdisk memdisk.squashfs -comp lzo \
APPENDED_SIG_SIZE=0 \
if [ -x /usr/bin/rpm-sign ]; then \
touch empty.unsigned \

View File

@ -17,7 +17,7 @@
Name: grub2
Epoch: 1
Version: 2.06
Release: 113%{?dist}
Release: 114%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
License: GPL-3.0-or-later
URL: http://www.gnu.org/software/grub/
@ -554,6 +554,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%endif
%changelog
* Sat Jan 13 2024 Hector Martin <marcan@fedoraproject.org> - 2.06-114
- Switch memdisk compression to lzop
* Thu Jan 11 2024 Daan De Meyer <daan.j.demeyer@gmail.com> - 2.06-113
- Don't obsolete the tools package with minimal