summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2019-07-23 09:20:29 -0400
committerMike Gilbert <floppym@gentoo.org>2019-07-23 09:21:21 -0400
commitd81d6a345cffb89a68d71df891c908c633f51d37 (patch)
treed2fe3e09dfa7d4e63e7a17dc5a15451f45f7e817 /sys-boot/grub
parentsci-mathematics/cvc4: add statistics, replay and proofs use flag (diff)
downloadgentoo-d81d6a345cffb89a68d71df891c908c633f51d37.tar.gz
gentoo-d81d6a345cffb89a68d71df891c908c633f51d37.tar.bz2
gentoo-d81d6a345cffb89a68d71df891c908c633f51d37.zip
sys-boot/grub: backport fix for bios boot partition on sparc64
Package-Manager: Portage-2.3.68, Repoman-2.3.16_p2 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-boot/grub')
-rw-r--r--sys-boot/grub/files/2.04-sparc64-bios-boot.patch50
-rw-r--r--sys-boot/grub/grub-2.04-r1.ebuild (renamed from sys-boot/grub/grub-2.04.ebuild)1
2 files changed, 51 insertions, 0 deletions
diff --git a/sys-boot/grub/files/2.04-sparc64-bios-boot.patch b/sys-boot/grub/files/2.04-sparc64-bios-boot.patch
new file mode 100644
index 000000000000..8fd00d497ad8
--- /dev/null
+++ b/sys-boot/grub/files/2.04-sparc64-bios-boot.patch
@@ -0,0 +1,50 @@
+From 4e75b2ae313b13b5bfb54cc5e5c53368d6eb2a08 Mon Sep 17 00:00:00 2001
+From: James Clarke <jrtc27@jrtc27.com>
+Date: Thu, 18 Jul 2019 14:31:55 +0200
+Subject: [PATCH] sparc64: Fix BIOS Boot Partition support
+
+Currently, gpt_offset is uninitialised when using a BIOS Boot Partition
+but is used unconditionally inside save_blocklists. Instead, ensure it
+is always initialised to 0 (note that there is already separate code to
+do the equivalent adjustment after we call save_blocklists on this code
+path).
+
+This patch has been tested on a T5-2 LDOM.
+
+Signed-off-by: James Clarke <jrtc27@jrtc27.com>
+Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
+Reviewed-by: Eric Snowberg <eric.snowberg@oracle.com>
+
+---
+ util/setup.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+---
+ util/setup.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/util/setup.c b/util/setup.c
+index 6f88f3c..3be88aa 100644
+--- a/util/setup.c
++++ b/util/setup.c
+@@ -271,6 +271,9 @@ SETUP (const char *dir,
+ bl.current_segment =
+ GRUB_BOOT_I386_PC_KERNEL_SEG + (GRUB_DISK_SECTOR_SIZE >> 4);
+ #endif
++#ifdef GRUB_SETUP_SPARC64
++ bl.gpt_offset = 0;
++#endif
+ bl.last_length = 0;
+
+ /* Read the boot image by the OS service. */
+@@ -730,7 +733,6 @@ unable_to_embed:
+ #ifdef GRUB_SETUP_SPARC64
+ {
+ grub_partition_t container = root_dev->disk->partition;
+- bl.gpt_offset = 0;
+
+ if (grub_strstr (container->partmap->name, "gpt"))
+ bl.gpt_offset = grub_partition_get_start (container);
+--
+cgit v1.0-41-gc330
+
diff --git a/sys-boot/grub/grub-2.04.ebuild b/sys-boot/grub/grub-2.04-r1.ebuild
index 07f21fac6705..81bd769728c9 100644
--- a/sys-boot/grub/grub-2.04.ebuild
+++ b/sys-boot/grub/grub-2.04-r1.ebuild
@@ -39,6 +39,7 @@ fi
PATCHES=(
"${FILESDIR}"/gfxpayload.patch
"${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
+ "${FILESDIR}"/2.04-sparc64-bios-boot.patch
)
DEJAVU=dejavu-sans-ttf-2.37