grub2/0078-qemu-coreboot-multiboot-Change-linking-address-to-0x.patch
Peter Jones 752ceb1640 Rebased to newer upstream for fedora-29
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-10 15:12:02 -04:00

54 lines
2.3 KiB
Diff

From ec763ed00ac55deb1c429bda5057bd5a147183d1 Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder@gmail.com>
Date: Wed, 30 Aug 2017 16:29:59 +0200
Subject: [PATCH] qemu, coreboot, multiboot: Change linking address to 0x9000.
It's common for distros to use a defective ld which links at 0x9000. Instead
of fighting it, just move link target to 0x9000.
---
grub-core/Makefile.core.def | 6 +++---
include/grub/offsets.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 6edf68286c3..d90ad622082 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -68,11 +68,11 @@ kernel = {
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000';
i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)';
- i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
+ i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000';
i386_coreboot_ldflags = '$(TARGET_IMG_LDFLAGS)';
- i386_coreboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
+ i386_coreboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000';
i386_multiboot_ldflags = '$(TARGET_IMG_LDFLAGS)';
- i386_multiboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
+ i386_multiboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000';
i386_ieee1275_ldflags = '$(TARGET_IMG_LDFLAGS)';
i386_ieee1275_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x10000';
i386_xen_ldflags = '$(TARGET_IMG_LDFLAGS)';
diff --git a/include/grub/offsets.h b/include/grub/offsets.h
index bf0689fc99a..330e4c70738 100644
--- a/include/grub/offsets.h
+++ b/include/grub/offsets.h
@@ -50,7 +50,7 @@
/* The offset of GRUB_CORE_ENTRY_ADDR. */
#define GRUB_KERNEL_I386_QEMU_CORE_ENTRY_ADDR 0x8
-#define GRUB_KERNEL_I386_QEMU_LINK_ADDR 0x8200
+#define GRUB_KERNEL_I386_QEMU_LINK_ADDR 0x9000
/* The offset of GRUB_TOTAL_MODULE_SIZE. */
#define GRUB_KERNEL_SPARC64_IEEE1275_TOTAL_MODULE_SIZE 0x8
@@ -91,7 +91,7 @@
#define GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE 0x08
-#define GRUB_KERNEL_I386_COREBOOT_LINK_ADDR 0x8200
+#define GRUB_KERNEL_I386_COREBOOT_LINK_ADDR 0x9000
#define GRUB_KERNEL_I386_COREBOOT_MODULES_ADDR 0x100000
#define GRUB_KERNEL_I386_IEEE1275_LINK_ADDR 0x10000