mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-24 22:35:28 +00:00
Some more minor build issues.
Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
e3bc417798
commit
d4f21da2e0
16 changed files with 111 additions and 40 deletions
|
@ -1,4 +1,4 @@
|
|||
From 83e296e519bbb551e06a6d011daaa16bbfee8b86 Mon Sep 17 00:00:00 2001
|
||||
From 9baa7c16e5138497862eba684d2c41e5ed16e787 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 9 Dec 2016 15:40:29 -0500
|
||||
Subject: [PATCH 202/216] Add BLS support to grub-mkconfig
|
||||
|
@ -10,8 +10,8 @@ files are parsed by blscfg command and the entries created dynamically.
|
|||
---
|
||||
util/grub-mkconfig.in | 3 ++-
|
||||
util/grub-mkconfig_lib.in | 29 +++++++++++++++++++----------
|
||||
util/grub.d/10_linux.in | 36 ++++++++++++++++++++++++++++++++++--
|
||||
3 files changed, 55 insertions(+), 13 deletions(-)
|
||||
util/grub.d/10_linux.in | 37 +++++++++++++++++++++++++++++++++++--
|
||||
3 files changed, 56 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 3b0bfe40308..760fe08727f 100644
|
||||
|
@ -104,10 +104,10 @@ index 2fb4f4f8143..70dc8d57e92 100644
|
|||
fi
|
||||
IFS="$old_ifs"
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 7e78ad33636..68f631772c3 100644
|
||||
index 7e78ad33636..f5daefb9d24 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -126,6 +126,33 @@ linux_entry ()
|
||||
@@ -126,6 +126,34 @@ linux_entry ()
|
||||
if [ -z "$boot_device_id" ]; then
|
||||
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
|
||||
fi
|
||||
|
@ -127,6 +127,7 @@ index 7e78ad33636..68f631772c3 100644
|
|||
+ prepare_grub_to_access_device ${bootefi_device} boot
|
||||
+
|
||||
+ cat << EOF
|
||||
+insmod blscfg
|
||||
+blscfg
|
||||
+if [ -s \$prefix/grubenv ]; then
|
||||
+ load_env
|
||||
|
@ -141,7 +142,7 @@ index 7e78ad33636..68f631772c3 100644
|
|||
if [ x$type != xsimple ] ; then
|
||||
title=$(mktitle "$type" "$version")
|
||||
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
|
||||
@@ -236,7 +263,10 @@ submenu_indentation=""
|
||||
@@ -236,7 +264,10 @@ submenu_indentation=""
|
||||
is_top_level=true
|
||||
while [ "x$list" != "x" ] ; do
|
||||
linux=`version_find_latest $list`
|
||||
|
@ -153,7 +154,7 @@ index 7e78ad33636..68f631772c3 100644
|
|||
basename=`basename $linux`
|
||||
dirname=`dirname $linux`
|
||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||
@@ -281,7 +311,9 @@ while [ "x$list" != "x" ] ; do
|
||||
@@ -281,7 +312,9 @@ while [ "x$list" != "x" ] ; do
|
||||
fi
|
||||
|
||||
if test -n "${initrd}" ; then
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 5ee3b4f17f20848f8cddff1313fbd99048b46036 Mon Sep 17 00:00:00 2001
|
||||
From 206697fab4e803807a83f1f7f330d3d009aba2fd Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Tue, 6 Feb 2018 11:02:09 +0100
|
||||
Subject: [PATCH 203/216] Remove duplicated grub_exit() definition for grub-emu
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From a0029e01e10b5077c88aa56b12314ace5e9c3e4e Mon Sep 17 00:00:00 2001
|
||||
From 37844213b374844bc1a4056712241cf6d9421880 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Tue, 6 Feb 2018 11:16:28 +0100
|
||||
Subject: [PATCH 204/216] Don't attempt to backtrace on grub_abort() for
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From ad586ac13d32bd610c86aaa3d8972101371476eb Mon Sep 17 00:00:00 2001
|
||||
From 01839f5d2491ba1b5694d1c4b2f3c2818a2408ae Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Fri, 2 Feb 2018 11:36:29 +0100
|
||||
Subject: [PATCH 205/216] Enable blscfg command for the emu platform
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From cc17b5318a72426969bf50748056ae526f0011b9 Mon Sep 17 00:00:00 2001
|
||||
From f1a8f489ec2cafdcfbdd3b60ffc7752bed8c8528 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Tue, 6 Feb 2018 09:09:00 +0100
|
||||
Subject: [PATCH 206/216] Add linux and initrd commands for grub-emu
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From bb0547998b22e6c8c675fc67dda6ae1ddf3cf890 Mon Sep 17 00:00:00 2001
|
||||
From 3682958910d45a129f38cb1f28bc61288f92a698 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 15 Mar 2018 14:12:54 -0400
|
||||
Subject: [PATCH 207/216] Fix the efidir in grub-setpassword
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 4db80106d593b4af6ba76d885e900b65a8e58868 Mon Sep 17 00:00:00 2001
|
||||
From 95d9f5c317fb59dbb47c1df531fe5ab6f61e55af Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 15 Mar 2018 14:12:40 -0400
|
||||
Subject: [PATCH 208/216] Add grub2-switch-to-blscfg
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 337affc3480f637d3a8199376e89e146d694682f Mon Sep 17 00:00:00 2001
|
||||
From 73a860b83bc81959baabceeec6e9a32102884a57 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 30 Nov 2017 15:11:39 -0500
|
||||
Subject: [PATCH 209/216] Add grub_debug_enabled()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 0c858bc10a124de21d20e0523e69565bfed4df3b Mon Sep 17 00:00:00 2001
|
||||
From fe56f63c69beec5448db49884b389ff3392fcf7c Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 6 Nov 2017 18:31:56 -0500
|
||||
Subject: [PATCH 210/216] make better backtraces
|
||||
|
@ -9,7 +9,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
grub-core/{lib => commands}/backtrace.c | 2 +-
|
||||
grub-core/gdb/cstub.c | 1 -
|
||||
grub-core/kern/arm64/backtrace.c | 75 ++++++++++++++++++++
|
||||
grub-core/kern/backtrace.c | 83 ++++++++++++++++++++++
|
||||
grub-core/kern/backtrace.c | 95 +++++++++++++++++++++++++
|
||||
grub-core/kern/dl.c | 45 ++++++++++++
|
||||
grub-core/kern/i386/backtrace.c | 120 ++++++++++++++++++++++++++++++++
|
||||
grub-core/kern/i386/pc/init.c | 4 +-
|
||||
|
@ -28,7 +28,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
grub-core/kern/ia64/efi/startup.S | 3 +-
|
||||
grub-core/kern/sparc64/ieee1275/crt0.S | 3 +-
|
||||
grub-core/Makefile.am | 1 +
|
||||
23 files changed, 370 insertions(+), 166 deletions(-)
|
||||
23 files changed, 382 insertions(+), 166 deletions(-)
|
||||
rename grub-core/{lib => commands}/backtrace.c (98%)
|
||||
create mode 100644 grub-core/kern/arm64/backtrace.c
|
||||
create mode 100644 grub-core/kern/backtrace.c
|
||||
|
@ -109,7 +109,7 @@ index b64acd70fee..99281472d36 100644
|
|||
|
||||
diff --git a/grub-core/kern/arm64/backtrace.c b/grub-core/kern/arm64/backtrace.c
|
||||
new file mode 100644
|
||||
index 00000000000..a4af6e4e006
|
||||
index 00000000000..70de1b29414
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/arm64/backtrace.c
|
||||
@@ -0,0 +1,75 @@
|
||||
|
@ -140,12 +140,12 @@ index 00000000000..a4af6e4e006
|
|||
+#include <grub/backtrace.h>
|
||||
+
|
||||
+void
|
||||
+grub_backtrace_pointer (void *frame, unsigned long skip)
|
||||
+grub_backtrace_pointer (void *frame, unsigned int skip)
|
||||
+{
|
||||
+ do
|
||||
+ {
|
||||
+ const char *name = NULL;
|
||||
+ char *addr;
|
||||
+ char *addr = NULL;
|
||||
+
|
||||
+ void *ret = __builtin_return_address (skip);
|
||||
+ frame = __builtin_frame_address (skip);
|
||||
|
@ -181,7 +181,7 @@ index 00000000000..a4af6e4e006
|
|||
+extern grub_uint64_t _data;
|
||||
+
|
||||
+void
|
||||
+grub_backtrace_arch (unsigned long skip)
|
||||
+grub_backtrace_arch (unsigned int skip)
|
||||
+{
|
||||
+ grub_printf ("Backtrace (.text %p .data %p):\n",
|
||||
+ (void *)_text, (void *)_data);
|
||||
|
@ -190,10 +190,10 @@ index 00000000000..a4af6e4e006
|
|||
+}
|
||||
diff --git a/grub-core/kern/backtrace.c b/grub-core/kern/backtrace.c
|
||||
new file mode 100644
|
||||
index 00000000000..363b0e7e766
|
||||
index 00000000000..bd6a783f6d0
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/backtrace.c
|
||||
@@ -0,0 +1,83 @@
|
||||
@@ -0,0 +1,95 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
@ -252,27 +252,39 @@ index 00000000000..363b0e7e766
|
|||
+ grub_printf ("%p", addr);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+grub_backtrace_pointer_default (void *frame __attribute__((__unused__)),
|
||||
+ unsigned int skip __attribute__((__unused__)))
|
||||
+{
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_backtrace_pointer (void *frame, unsigned int skip)
|
||||
+ __attribute__((__weak__,
|
||||
+ __alias__(("grub_backtrace_pointer_default"))));
|
||||
+
|
||||
+void
|
||||
+grub_backtrace_print_address (void *addr)
|
||||
+ __attribute__((__weak__,
|
||||
+ __alias__(("grub_backtrace_print_address_default"))));
|
||||
+
|
||||
+static void
|
||||
+grub_backtrace_arch_default(unsigned long skip)
|
||||
+grub_backtrace_arch_default(unsigned int skip)
|
||||
+{
|
||||
+ grub_backtrace_pointer(__builtin_frame_address(0), skip + 1);
|
||||
+}
|
||||
+
|
||||
+void grub_backtrace_arch (unsigned long skip)
|
||||
+void grub_backtrace_arch (unsigned int skip)
|
||||
+ __attribute__((__weak__, __alias__(("grub_backtrace_arch_default"))));
|
||||
+
|
||||
+void grub_backtrace (unsigned long skip)
|
||||
+void grub_backtrace (unsigned int skip)
|
||||
+{
|
||||
+ grub_backtrace_arch(skip + 1);
|
||||
+}
|
||||
+
|
||||
+void grub_debug_backtrace (const char * const debug,
|
||||
+ unsigned long skip)
|
||||
+ unsigned int skip)
|
||||
+{
|
||||
+ if (grub_debug_enabled (debug))
|
||||
+ grub_backtrace (skip + 1);
|
||||
|
@ -342,7 +354,7 @@ index 621070918d4..5028d157c46 100644
|
|||
i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
|
||||
diff --git a/grub-core/kern/i386/backtrace.c b/grub-core/kern/i386/backtrace.c
|
||||
new file mode 100644
|
||||
index 00000000000..75db596a167
|
||||
index 00000000000..60a6abfe93f
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/i386/backtrace.c
|
||||
@@ -0,0 +1,120 @@
|
||||
|
@ -375,7 +387,7 @@ index 00000000000..75db596a167
|
|||
+#define MAX_STACK_FRAME 102400
|
||||
+
|
||||
+void
|
||||
+grub_backtrace_pointer (void *frame, unsigned long skip)
|
||||
+grub_backtrace_pointer (void *frame, unsigned int skip)
|
||||
+{
|
||||
+ void **ebp = (void **)frame;
|
||||
+ unsigned long x = 0;
|
||||
|
@ -444,7 +456,7 @@ index 00000000000..75db596a167
|
|||
+extern unsigned long _data;
|
||||
+
|
||||
+void
|
||||
+grub_backtrace_arch (unsigned long skip)
|
||||
+grub_backtrace_arch (unsigned int skip)
|
||||
+{
|
||||
+ grub_printf ("Backtrace (.text %p .data %p):\n",
|
||||
+ (void *)_text, (void *)_data);
|
||||
|
@ -708,7 +720,7 @@ index c67273db3ae..00000000000
|
|||
-}
|
||||
-
|
||||
diff --git a/include/grub/backtrace.h b/include/grub/backtrace.h
|
||||
index 395519762f0..759918ebefd 100644
|
||||
index 395519762f0..275cf85e2d3 100644
|
||||
--- a/include/grub/backtrace.h
|
||||
+++ b/include/grub/backtrace.h
|
||||
@@ -19,8 +19,14 @@
|
||||
|
@ -721,10 +733,10 @@ index 395519762f0..759918ebefd 100644
|
|||
+#include <grub/types.h>
|
||||
+
|
||||
+void EXPORT_FUNC(grub_debug_backtrace) (const char * const debug,
|
||||
+ unsigned long skip);
|
||||
+void EXPORT_FUNC(grub_backtrace) (unsigned long skip);
|
||||
+void grub_backtrace_arch (unsigned long skip);
|
||||
+void grub_backtrace_pointer (void *ptr, unsigned long skip);
|
||||
+ unsigned int skip);
|
||||
+void EXPORT_FUNC(grub_backtrace) (unsigned int skip);
|
||||
+void grub_backtrace_arch (unsigned int skip);
|
||||
+void grub_backtrace_pointer (void *ptr, unsigned int skip);
|
||||
void grub_backtrace_print_address (void *addr);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 475996f3151cbe42707eecd0e55dc90761c204f5 Mon Sep 17 00:00:00 2001
|
||||
From 93b1871dd0f46bceb148fd8fd5664fe994ec3d8b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 9 Nov 2017 15:58:52 -0500
|
||||
Subject: [PATCH 211/216] normal: don't draw our startup message if debug is
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 08303ac0f3431062651f1d556641ea54009da207 Mon Sep 17 00:00:00 2001
|
||||
From e7a35bd7770d0dff0130c49522bafa7ce767972e Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 16 Mar 2018 13:28:57 -0400
|
||||
Subject: [PATCH 212/216] Work around some minor include path weirdnesses
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 3ad964eb443776aa0db28bf48fe0a81d11549c7c Mon Sep 17 00:00:00 2001
|
||||
From 243bd5d756c6dd91f77dea538310b5387f5628a5 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 25 Jun 2015 15:41:06 -0400
|
||||
Subject: [PATCH 213/216] Make it possible to enabled --build-id=sha1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 767576df6c562e42b9e290321a85b44902e66f74 Mon Sep 17 00:00:00 2001
|
||||
From 62ba456cc91cbc31ab16a075057459f71bb73524 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Sun, 28 Jun 2015 13:09:58 -0400
|
||||
Subject: [PATCH 214/216] Add grub_qdprintf() - grub_dprintf() without the
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 12174521326fa23d11446021e1057c8a6d87bd89 Mon Sep 17 00:00:00 2001
|
||||
From eb632ed489ac2418f3386f7693a01e1863843c53 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 25 Jun 2015 15:11:36 -0400
|
||||
Subject: [PATCH 215/216] Make a "gdb" dprintf that tells us load addresses.
|
||||
|
|
57
0216-static.patch
Normal file
57
0216-static.patch
Normal file
|
@ -0,0 +1,57 @@
|
|||
From 3fa7a272a55df6ac6fe0108ee1d47b4f7a4d6456 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 16 Mar 2018 14:59:21 -0400
|
||||
Subject: [PATCH 216/216] static
|
||||
|
||||
---
|
||||
util/grub-mkconfig_lib.in | 34 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 34 insertions(+)
|
||||
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index 70dc8d57e92..693340f6912 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -128,6 +128,40 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
+add_device_modules ()
|
||||
+{
|
||||
+ local device=$1 && shift
|
||||
+
|
||||
+ old_ifs="$IFS"
|
||||
+ IFS='
|
||||
+'
|
||||
+ partmap="`"${grub_probe}" --device ${device} --target=partmap`"
|
||||
+ for module in ${partmap} ; do
|
||||
+ case "${module}" in
|
||||
+ netbsd | openbsd)
|
||||
+ echo "insmod part_bsd";;
|
||||
+ *)
|
||||
+ echo "insmod part_${module}";;
|
||||
+ esac
|
||||
+ done
|
||||
+
|
||||
+ # Abstraction modules aren't auto-loaded.
|
||||
+ abstraction="`"${grub_probe}" --device ${device} --target=abstraction`"
|
||||
+ for module in ${abstraction} ; do
|
||||
+ echo "insmod ${module}"
|
||||
+ done
|
||||
+
|
||||
+ fs="`"${grub_probe}" --device ${device} --target=fs`"
|
||||
+ for module in ${fs} ; do
|
||||
+ echo "insmod ${module}"
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
+get_device_uuid ()
|
||||
+{
|
||||
+
|
||||
+}
|
||||
+
|
||||
prepare_grub_to_access_device ()
|
||||
{
|
||||
local device=$1 && shift
|
||||
--
|
||||
2.15.0
|
||||
|
|
@ -213,3 +213,4 @@ Patch0212: 0212-Work-around-some-minor-include-path-weirdnesses.patch
|
|||
Patch0213: 0213-Make-it-possible-to-enabled-build-id-sha1.patch
|
||||
Patch0214: 0214-Add-grub_qdprintf-grub_dprintf-without-the-file-line.patch
|
||||
Patch0215: 0215-Make-a-gdb-dprintf-that-tells-us-load-addresses.patch
|
||||
Patch0216: 0216-static.patch
|
||||
|
|
Loading…
Reference in a new issue