core/grub to 2.06.r322.gd9b4638c5-4

This commit is contained in:
Kevin Mihelich 2022-09-03 23:07:51 +00:00
parent 4e550fef50
commit 8ccbdda01f
4 changed files with 40 additions and 23 deletions

View file

@ -0,0 +1,29 @@
From faedc1669cb4862020b572fdd013fbe7f5fb925c Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Fri, 2 Sep 2022 13:37:51 +0200
Subject: [PATCH 1/1] kern/efi/mm: increase default heap size
The new dynamic memory allocation slows down grub startup. Try to
fix / work around by increasing the default heap size.
Signed-off-by: Christian Hesse <mail@eworm.de>
---
grub-core/kern/efi/mm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index d290c9a76..598e6b6a2 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -39,7 +39,7 @@
#define MEMORY_MAP_SIZE 0x3000
/* The default heap size for GRUB itself in bytes. */
-#define DEFAULT_HEAP_SIZE 0x100000
+#define DEFAULT_HEAP_SIZE 0x1000000
static void *finish_mmap_buf = 0;
static grub_efi_uintn_t finish_mmap_size = 0;
--
2.37.3

View file

@ -1,12 +0,0 @@
diff -urN grub/grub-core/kern/efi/mm.c grub/grub-core/kern/efi/mm.c
--- grub/grub-core/kern/efi/mm.c 2022-08-20 20:17:23.975902981 +0900
+++ grub/grub-core/kern/efi/mm.c 2022-08-20 20:17:16.268139945 +0900
@@ -39,7 +39,7 @@
#define MEMORY_MAP_SIZE 0x3000
/* The default heap size for GRUB itself in bytes. */
-#define DEFAULT_HEAP_SIZE 0x100000
+#define DEFAULT_HEAP_SIZE 0x200000
static void *finish_mmap_buf = 0;
static grub_efi_uintn_t finish_mmap_size = 0;

View file

@ -8,7 +8,7 @@
# it's not supported on aarch64
# - Drop everything but packaging /etc/grub/default in
# _package_grub-common_and_bios()
# - patch to increase the default heap size
# - patch to add /boot/Image to kernel path
buildarch=8
@ -33,7 +33,7 @@ _commit='d9b4638c50b16d4722e66d334e2c1a674b4a45cc'
_pkgver=2.06.r322.gd9b4638c5
_unifont_ver='14.0.04'
pkgver=${_pkgver/-/}
pkgrel=3
pkgrel=4
url='https://www.gnu.org/software/grub/'
arch=('x86_64')
license=('GPL3')
@ -73,8 +73,8 @@ source=("git+https://git.savannah.gnu.org/git/grub.git#commit=${_commit}"
"https://ftp.gnu.org/gnu/unifont/unifont-${_unifont_ver}/unifont-${_unifont_ver}.bdf.gz"{,.sig}
'0001-00_header-add-GRUB_COLOR_-variables.patch'
'0002-10_linux-detect-archlinux-initramfs.patch'
'0003-10_linux-add-archlinuxarm-s-default-kernel-path.patch'
'0004-increase-heap-size.patch'
'0003-kern-efi-mm-increase-default-heap-size.patch'
'0004-10_linux-add-archlinuxarm-s-default-kernel-path.patch'
'grub.default'
'sbat.csv')
@ -84,8 +84,8 @@ sha256sums=('SKIP'
'SKIP'
'5dee6628c48eef79812bb9e86ee772068d85e7fcebbd2b2b8d1e19d24eda9dab'
'8488aec30a93e8fe66c23ef8c23aefda39c38389530e9e73ba3fbcc8315d244d'
'5529b5ef0cc735106b39b27329a6d1360323195cc2e75148d323ec0e681ed398'
'bfa56cc7cb2e1650fcd19ecfe5b8d2d0aa7bbc4266a0a5fb1e5d4f60e4a7fa56'
'7da44c856a5c8295f82fa3c583dab52fc5f369dc12fea95cc9e63f9e18500fdf'
'c17bf255a41103f6b71a1710afc7e9addaebc578bcf51a48845e227b2f651682'
'98b23d41e223bdc0a6e20bdcb3aa77e642f29b64081b1fd2f575314172fc89df')
@ -138,16 +138,16 @@ prepare() {
echo "Patch to enable GRUB_COLOR_* variables in grub-mkconfig..."
## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html
patch -Np1 -i "${srcdir}/0001-00_header-add-GRUB_COLOR_-variables.patch"
patch -Np1 -i "${srcdir}/0001-00_header-add-GRUB_COLOR_-variables.patch"
echo "Patch to detect of Arch Linux initramfs images by grub-mkconfig..."
patch -Np1 -i "${srcdir}/0002-10_linux-detect-archlinux-initramfs.patch"
patch -Np1 -i "${srcdir}/0002-10_linux-detect-archlinux-initramfs.patch"
echo "Patch to increase default heap size..."
patch -Np1 -i "${srcdir}/0003-kern-efi-mm-increase-default-heap-size.patch"
echo "Patch to detect of Arch Linux ARM kernel images by grub-mkconfig..."
patch -Np1 -i "${srcdir}/0003-10_linux-add-archlinuxarm-s-default-kernel-path.patch"
echo "Patch to increase heap size..."
patch -Np1 -i "${srcdir}/0004-increase-heap-size.patch"
patch -Np1 -i "${srcdir}/0004-10_linux-add-archlinuxarm-s-default-kernel-path.patch"
echo "Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme..."
sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "configure.ac"