Rebased to newer upstream for fedora-29

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2018-07-11 14:39:49 -04:00
parent bf795fa3c9
commit 33444dc94a
8 changed files with 225 additions and 21 deletions

View file

@ -1,20 +0,0 @@
From 1263543c5038d016553b783146043398cc4f78c0 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 10 Jul 2018 16:54:02 -0400
Subject: [PATCH] Force gentply.py to use python3
Signed-off-by: Peter Jones <pjones@redhat.com>
---
gentpl.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gentpl.py b/gentpl.py
index bf8439fa743..6ab9eb3af71 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python3
# GRUB -- GRand Unified Bootloader
# Copyright (C) 2010,2011,2012,2013 Free Software Foundation, Inc.
#

View file

@ -0,0 +1,46 @@
From 7b54125d8f410b5ac89866823866a160703b80ef Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 11 Jul 2018 13:43:15 -0400
Subject: [PATCH] gentpl: add 'disable = ' support
Signed-off-by: Peter Jones <pjones@redhat.com>
---
gentpl.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gentpl.py b/gentpl.py
index bf8439fa743..a8cd540550f 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -589,11 +589,21 @@ def platform_conditional(platform, closure):
# };
#
def foreach_enabled_platform(defn, closure):
+ enabled = False
+ disabled = False
if 'enable' in defn:
+ enabled = True
for platform in GRUB_PLATFORMS:
if platform_tagged(defn, platform, "enable"):
platform_conditional(platform, closure)
- else:
+
+ if 'disable' in defn:
+ disabled = True
+ for platform in GRUB_PLATFORMS:
+ if not platform_tagged(defn, platform, "disable"):
+ platform_conditional(platform, closure)
+
+ if not enabled and not disabled:
for platform in GRUB_PLATFORMS:
platform_conditional(platform, closure)
@@ -652,6 +662,8 @@ def first_time(defn, snippet):
def is_platform_independent(defn):
if 'enable' in defn:
return False
+ if 'disable' in defn:
+ return False
for suffix in [ "", "_nodist" ]:
template = platform_values(defn, GRUB_PLATFORMS[0], suffix)
for platform in GRUB_PLATFORMS[1:]:

View file

@ -0,0 +1,22 @@
From 2fb1d1f257c3e17639c40a44feaf48824ede7ed9 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 11 Jul 2018 13:43:34 -0400
Subject: [PATCH] gentpl: add 'pc' firmware type
Signed-off-by: Peter Jones <pjones@redhat.com>
---
gentpl.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/gentpl.py b/gentpl.py
index a8cd540550f..baac6a2af69 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -49,6 +49,7 @@ GROUPS["arm"] = [ "arm_uboot", "arm_efi", "arm_coreboot" ]
GROUPS["arm64"] = [ "arm64_efi" ]
# Groups based on firmware
+GROUPS["pc"] = [ "i386_pc" ]
GROUPS["efi"] = [ "i386_efi", "x86_64_efi", "ia64_efi", "arm_efi", "arm64_efi" ]
GROUPS["ieee1275"] = [ "i386_ieee1275", "sparc64_ieee1275", "powerpc_ieee1275" ]
GROUPS["uboot"] = [ "arm_uboot" ]

View file

@ -0,0 +1,42 @@
From 89b6fa058d944d1b77f85a7ee78b0e37efdf89aa Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 11 Jul 2018 13:47:56 -0400
Subject: [PATCH] Disable the reboot module on EFI builds; it is in kernel.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/Makefile.core.def | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index a656930800e..3b022555c46 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -192,6 +192,7 @@ kernel = {
i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
coreboot = video/coreboot/cbfb.c;
+ efi = commands/reboot.c;
efi = disk/efi/efidisk.c;
efi = kern/efi/efi.c;
efi = kern/efi/init.c;
@@ -890,8 +891,8 @@ module = {
module = {
name = reboot;
- i386 = lib/i386/reboot.c;
- i386 = lib/i386/reboot_trampoline.S;
+ i386_pc = lib/i386/reboot.c;
+ i386_pc = lib/i386/reboot_trampoline.S;
powerpc_ieee1275 = lib/ieee1275/reboot.c;
sparc64_ieee1275 = lib/ieee1275/reboot.c;
mips_arc = lib/mips/arc/reboot.c;
@@ -901,6 +902,8 @@ module = {
uboot = lib/uboot/reboot.c;
arm_coreboot = lib/dummy/reboot.c;
common = commands/reboot.c;
+
+ disable = efi;
};
module = {

View file

@ -0,0 +1,42 @@
From 542cb6426ff8418208a75bd5fa2693812763e006 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 11 Jul 2018 13:48:48 -0400
Subject: [PATCH] Disable multiboot, multiboot2, and linux16 modules on EFI
builds.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/Makefile.core.def | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 3b022555c46..81509b86a0d 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -1654,7 +1654,7 @@ module = {
module = {
name = linux16;
common = loader/i386/pc/linux.c;
- enable = x86;
+ enable = i386_pc;
};
module = {
@@ -1689,7 +1689,7 @@ module = {
common = loader/multiboot.c;
common = loader/multiboot_mbi2.c;
- enable = x86;
+ enable = i386_pc;
enable = mips;
};
@@ -1698,7 +1698,7 @@ module = {
common = loader/multiboot.c;
x86 = loader/i386/multiboot_mbi.c;
extra_dist = loader/multiboot_elfxx.c;
- enable = x86;
+ enable = i386_pc;
};
module = {

View file

@ -0,0 +1,40 @@
From b09601dabd607da4bbd3e7c36331ee49acc019a8 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 11 Jul 2018 13:49:17 -0400
Subject: [PATCH] Make the linuxefi module just be the x86 efi version of linux
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/Makefile.core.def | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 81509b86a0d..8da0a01dfce 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -1724,6 +1724,9 @@ module = {
fdt = lib/fdt.c;
common = loader/linux.c;
common = lib/cmdline.c;
+
+ efi = loader/i386/efi/linux.c;
+ efi = loader/efi/linux.c;
};
module = {
@@ -1784,15 +1787,6 @@ module = {
enable = x86_64_efi;
};
-module = {
- name = linuxefi;
- efi = loader/i386/efi/linux.c;
- efi = lib/cmdline.c;
- efi = loader/efi/linux.c;
- enable = i386_efi;
- enable = x86_64_efi;
-};
-
module = {
name = chain;
efi = loader/efi/chainloader.c;

View file

@ -0,0 +1,27 @@
From e309a10fd317ada214cf23a897bb21518137b188 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 11 Jul 2018 13:50:00 -0400
Subject: [PATCH] Make efi_netfs not duplicate symbols from efinet
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/Makefile.core.def | 6 ------
1 file changed, 6 deletions(-)
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 8da0a01dfce..6146f77297f 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -2193,12 +2193,6 @@ module = {
module = {
name = efi_netfs;
common = net/efi/efi_netfs.c;
- common = net/efi/net.c;
- common = net/efi/http.c;
- common = net/efi/pxe.c;
- common = net/efi/ip4_config.c;
- common = net/efi/ip6_config.c;
- common = net/efi/dhcp.c;
enable = efi;
};

View file

@ -372,4 +372,9 @@ Patch0371: 0371-00_menu_auto_hide-Use-a-timeout-of-60s-for-menu_show.patch
Patch0372: 0372-00_menu_auto_hide-Reduce-number-of-save_env-calls.patch
Patch0373: 0373-Minor-fixes-to-make-armv7hl-build-as-arm-efi.patch
Patch0374: 0374-30_uefi-firmware-fix-use-with-sys-firmware-efi-efiva.patch
Patch0375: 0375-Force-gentply.py-to-use-python3.patch
Patch0375: 0375-gentpl-add-disable-support.patch
Patch0376: 0376-gentpl-add-pc-firmware-type.patch
Patch0377: 0377-Disable-the-reboot-module-on-EFI-builds-it-is-in-ker.patch
Patch0378: 0378-Disable-multiboot-multiboot2-and-linux16-modules-on-.patch
Patch0379: 0379-Make-the-linuxefi-module-just-be-the-x86-efi-version.patch
Patch0380: 0380-Make-efi_netfs-not-duplicate-symbols-from-efinet.patch