grub2/0078-qemu-coreboot-multiboot-Change-linking-address-to-0x.patch
Peter Jones da63b36ca7 Rebase to newer upstream and fix pmtimer.
- Rebase to current master
- Fix pmtimer calibration to not take forever to fail on kvm.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-01-17 15:41:44 -05:00

57 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 078/225] 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 6edf68286..d90ad6220 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 bf0689fc9..330e4c707 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
--
2.14.3