update to version 2.06
This commit is contained in:
parent
551c063ce5
commit
95a71c6479
@ -0,0 +1,24 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Fri, 11 Jun 2021 12:10:45 +0200
|
||||
Subject: [PATCH] Revert "templates: Fix user-facing typo with an incorrect use
|
||||
of "it's""
|
||||
|
||||
This reverts commit 722737630889607c3b5761f1f5a48f1674cd2821.
|
||||
---
|
||||
util/grub.d/30_os-prober.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
||||
index 5984e92d291..94622481284 100644
|
||||
--- a/util/grub.d/30_os-prober.in
|
||||
+++ b/util/grub.d/30_os-prober.in
|
||||
@@ -36,7 +36,7 @@ if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/n
|
||||
exit 0
|
||||
fi
|
||||
|
||||
-grub_warn "$(gettext_printf "os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
+grub_warn "$(gettext_printf "os-prober will be executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
|
||||
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
|
||||
if [ -z "${OSPROBED}" ] ; then
|
||||
@ -0,0 +1,71 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Fri, 11 Jun 2021 12:10:54 +0200
|
||||
Subject: [PATCH] Revert "templates: Properly disable the os-prober by default"
|
||||
|
||||
This reverts commit 54e0a1bbf1e9106901a557195bb35e5e20fb3925.
|
||||
---
|
||||
util/grub-mkconfig.in | 5 +----
|
||||
util/grub.d/30_os-prober.in | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index f8cbb8d7a2b..d3e879b8e5c 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -140,9 +140,6 @@ GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2
|
||||
GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`"
|
||||
GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
|
||||
|
||||
-# Disable os-prober by default due to security reasons.
|
||||
-GRUB_DISABLE_OS_PROBER="true"
|
||||
-
|
||||
# Filesystem for the device containing our userland. Used for stuff like
|
||||
# choosing Hurd filesystem module.
|
||||
GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
|
||||
@@ -204,7 +201,6 @@ export GRUB_DEVICE \
|
||||
GRUB_DEVICE_PARTUUID \
|
||||
GRUB_DEVICE_BOOT \
|
||||
GRUB_DEVICE_BOOT_UUID \
|
||||
- GRUB_DISABLE_OS_PROBER \
|
||||
GRUB_FS \
|
||||
GRUB_FONT \
|
||||
GRUB_PRELOAD_MODULES \
|
||||
@@ -246,6 +242,7 @@ export GRUB_DEFAULT \
|
||||
GRUB_BACKGROUND \
|
||||
GRUB_THEME \
|
||||
GRUB_GFXPAYLOAD_LINUX \
|
||||
+ GRUB_DISABLE_OS_PROBER \
|
||||
GRUB_INIT_TUNE \
|
||||
GRUB_SAVEDEFAULT \
|
||||
GRUB_ENABLE_CRYPTODISK \
|
||||
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
||||
index 94622481284..80685b15f4d 100644
|
||||
--- a/util/grub.d/30_os-prober.in
|
||||
+++ b/util/grub.d/30_os-prober.in
|
||||
@@ -26,8 +26,8 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
|
||||
. "$pkgdatadir/grub-mkconfig_lib"
|
||||
|
||||
-if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
|
||||
- grub_warn "$(gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.")"
|
||||
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xfalse" ]; then
|
||||
+ gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -36,12 +36,12 @@ if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/n
|
||||
exit 0
|
||||
fi
|
||||
|
||||
-grub_warn "$(gettext_printf "os-prober will be executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
-
|
||||
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
|
||||
if [ -z "${OSPROBED}" ] ; then
|
||||
# empty os-prober output, nothing doing
|
||||
exit 0
|
||||
+else
|
||||
+ grub_warn "$(gettext_printf "os-prober was executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
fi
|
||||
|
||||
osx_entry() {
|
||||
70
0003-Revert-templates-Disable-the-os-prober-by-default.patch
Normal file
70
0003-Revert-templates-Disable-the-os-prober-by-default.patch
Normal file
@ -0,0 +1,70 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Fri, 11 Jun 2021 12:10:58 +0200
|
||||
Subject: [PATCH] Revert "templates: Disable the os-prober by default"
|
||||
|
||||
This reverts commit e346414725a70e5c74ee87ca14e580c66f517666.
|
||||
---
|
||||
docs/grub.texi | 18 ++++++++----------
|
||||
util/grub.d/30_os-prober.in | 5 +----
|
||||
2 files changed, 9 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/docs/grub.texi b/docs/grub.texi
|
||||
index f8b4b3b21a7..69f08d289f9 100644
|
||||
--- a/docs/grub.texi
|
||||
+++ b/docs/grub.texi
|
||||
@@ -1519,13 +1519,10 @@ boot sequence. If you have problems, set this option to @samp{text} and
|
||||
GRUB will tell Linux to boot in normal text mode.
|
||||
|
||||
@item GRUB_DISABLE_OS_PROBER
|
||||
-The @command{grub-mkconfig} has a feature to use the external
|
||||
-@command{os-prober} program to discover other operating systems installed on
|
||||
-the same machine and generate appropriate menu entries for them. It is disabled
|
||||
-by default since automatic and silent execution of @command{os-prober}, and
|
||||
-creating boot entries based on that data, is a potential attack vector. Set
|
||||
-this option to @samp{false} to enable this feature in the
|
||||
-@command{grub-mkconfig} command.
|
||||
+Normally, @command{grub-mkconfig} will try to use the external
|
||||
+@command{os-prober} program, if installed, to discover other operating
|
||||
+systems installed on the same system and generate appropriate menu entries
|
||||
+for them. Set this option to @samp{true} to disable this.
|
||||
|
||||
@item GRUB_OS_PROBER_SKIP_LIST
|
||||
List of space-separated FS UUIDs of filesystems to be ignored from os-prober
|
||||
@@ -1853,9 +1850,10 @@ than zero; otherwise 0.
|
||||
@section Multi-boot manual config
|
||||
|
||||
Currently autogenerating config files for multi-boot environments depends on
|
||||
-os-prober and has several shortcomings. Due to that it is disabled by default.
|
||||
-It is advised to use the power of GRUB syntax and do it yourself. A possible
|
||||
-configuration is detailed here, feel free to adjust to your needs.
|
||||
+os-prober and has several shortcomings. While fixing it is scheduled for the
|
||||
+next release, meanwhile you can make use of the power of GRUB syntax and do it
|
||||
+yourself. A possible configuration is detailed here, feel free to adjust to your
|
||||
+needs.
|
||||
|
||||
First create a separate GRUB partition, big enough to hold GRUB. Some of the
|
||||
following entries show how to load OS installer images from this same partition,
|
||||
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
||||
index 80685b15f4d..1b91c102f35 100644
|
||||
--- a/util/grub.d/30_os-prober.in
|
||||
+++ b/util/grub.d/30_os-prober.in
|
||||
@@ -26,8 +26,7 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
|
||||
. "$pkgdatadir/grub-mkconfig_lib"
|
||||
|
||||
-if [ "x${GRUB_DISABLE_OS_PROBER}" = "xfalse" ]; then
|
||||
- gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.\n"
|
||||
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -40,8 +39,6 @@ OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
|
||||
if [ -z "${OSPROBED}" ] ; then
|
||||
# empty os-prober output, nothing doing
|
||||
exit 0
|
||||
-else
|
||||
- grub_warn "$(gettext_printf "os-prober was executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
fi
|
||||
|
||||
osx_entry() {
|
||||
@ -1,7 +1,7 @@
|
||||
From a66a5e1ff5e4ad4df490754bfe41839a43cad1d5 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <mjg@redhat.com>
|
||||
Date: Fri, 5 Jul 2019 18:36:44 +0200
|
||||
Subject: [PATCH 001/220] Add support for Linux EFI stub loading.
|
||||
Date: Tue, 10 Jul 2012 11:58:52 -0400
|
||||
Subject: [PATCH] Add support for Linux EFI stub loading.
|
||||
|
||||
Also:
|
||||
|
||||
@ -29,25 +29,25 @@ moves the check into grub_dl_load_file.
|
||||
grub-core/kern/dl.c | 21 +++
|
||||
grub-core/kern/efi/efi.c | 28 ++++
|
||||
grub-core/kern/efi/mm.c | 32 ++++
|
||||
grub-core/loader/arm64/linux.c | 112 +++++++------
|
||||
grub-core/loader/arm64/linux.c | 118 +++++++-------
|
||||
grub-core/loader/arm64/xen_boot.c | 1 -
|
||||
grub-core/loader/efi/linux.c | 70 ++++++++
|
||||
grub-core/loader/i386/efi/linux.c | 335 ++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/loader/i386/pc/linux.c | 10 +-
|
||||
include/grub/arm/linux.h | 9 +
|
||||
include/grub/arm64/linux.h | 10 ++
|
||||
include/grub/arm64/linux.h | 9 +
|
||||
include/grub/efi/efi.h | 7 +-
|
||||
include/grub/efi/linux.h | 31 ++++
|
||||
13 files changed, 616 insertions(+), 66 deletions(-)
|
||||
13 files changed, 618 insertions(+), 69 deletions(-)
|
||||
create mode 100644 grub-core/loader/efi/linux.c
|
||||
create mode 100644 grub-core/loader/i386/efi/linux.c
|
||||
create mode 100644 include/grub/efi/linux.h
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 474a63e..581d9df 100644
|
||||
index 8022e1c0a79..45d3edaa4dc 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -1709,13 +1709,6 @@ module = {
|
||||
@@ -1734,13 +1734,6 @@ module = {
|
||||
enable = i386_pc;
|
||||
};
|
||||
|
||||
@ -61,7 +61,7 @@ index 474a63e..581d9df 100644
|
||||
module = {
|
||||
name = ntldr;
|
||||
i386_pc = loader/i386/pc/ntldr.c;
|
||||
@@ -1771,7 +1764,9 @@ module = {
|
||||
@@ -1796,7 +1789,9 @@ module = {
|
||||
|
||||
module = {
|
||||
name = linux;
|
||||
@ -72,7 +72,7 @@ index 474a63e..581d9df 100644
|
||||
i386_xen_pvh = loader/i386/linux.c;
|
||||
xen = loader/i386/xen.c;
|
||||
i386_pc = lib/i386/pc/vesa_modes_table.c;
|
||||
@@ -1786,9 +1781,14 @@ module = {
|
||||
@@ -1811,9 +1806,14 @@ module = {
|
||||
arm64 = loader/arm64/linux.c;
|
||||
riscv32 = loader/riscv/linux.c;
|
||||
riscv64 = loader/riscv/linux.c;
|
||||
@ -88,7 +88,7 @@ index 474a63e..581d9df 100644
|
||||
|
||||
module = {
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index 48eb5e7..896bebf 100644
|
||||
index 48f8a79073d..b7149370950 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -38,6 +38,14 @@
|
||||
@ -106,7 +106,7 @@ index 48eb5e7..896bebf 100644
|
||||
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
@@ -686,6 +694,19 @@ grub_dl_load_file (const char *filename)
|
||||
@@ -695,6 +703,19 @@ grub_dl_load_file (const char *filename)
|
||||
void *core = 0;
|
||||
grub_dl_t mod = 0;
|
||||
|
||||
@ -127,11 +127,11 @@ index 48eb5e7..896bebf 100644
|
||||
|
||||
file = grub_file_open (filename, GRUB_FILE_TYPE_GRUB_MODULE);
|
||||
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
||||
index 6e1ceb9..a0faa40 100644
|
||||
index 8cff7be0289..35b8f670602 100644
|
||||
--- a/grub-core/kern/efi/efi.c
|
||||
+++ b/grub-core/kern/efi/efi.c
|
||||
@@ -273,6 +273,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
return NULL;
|
||||
@@ -286,6 +286,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
return grub_efi_get_variable_with_attributes (var, guid, datasize_out, data_out, NULL);
|
||||
}
|
||||
|
||||
+grub_efi_boolean_t
|
||||
@ -166,7 +166,7 @@ index 6e1ceb9..a0faa40 100644
|
||||
|
||||
/* Search the mods section from the PE32/PE32+ image. This code uses
|
||||
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
|
||||
index b02fab1..a9e3710 100644
|
||||
index 9838fb2f50d..f6aef0ef649 100644
|
||||
--- a/grub-core/kern/efi/mm.c
|
||||
+++ b/grub-core/kern/efi/mm.c
|
||||
@@ -113,6 +113,38 @@ grub_efi_drop_alloc (grub_efi_physical_address_t address,
|
||||
@ -209,7 +209,7 @@ index b02fab1..a9e3710 100644
|
||||
void *
|
||||
grub_efi_allocate_pages_real (grub_efi_physical_address_t address,
|
||||
diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
|
||||
index ef3e9f9..a312c66 100644
|
||||
index ef3e9f9444c..a312c668685 100644
|
||||
--- a/grub-core/loader/arm64/linux.c
|
||||
+++ b/grub-core/loader/arm64/linux.c
|
||||
@@ -29,6 +29,7 @@
|
||||
@ -238,41 +238,20 @@ index ef3e9f9..a312c66 100644
|
||||
|
||||
void *fdt;
|
||||
|
||||
@@ -102,6 +105,25 @@ finalize_params_linux (void)
|
||||
@@ -102,79 +105,70 @@ finalize_params_linux (void)
|
||||
if (grub_fdt_install() != GRUB_ERR_NONE)
|
||||
goto failure;
|
||||
|
||||
+ grub_dprintf ("linux", "Installed/updated FDT configuration table @ %p\n",
|
||||
+ fdt);
|
||||
+
|
||||
+ /* Convert command line to UCS-2 */
|
||||
+ loaded_image = grub_efi_get_loaded_image (grub_efi_image_handle);
|
||||
+ if (!loaded_image)
|
||||
+ goto failure;
|
||||
+
|
||||
+ loaded_image->load_options_size = len =
|
||||
+ (grub_strlen (linux_args) + 1) * sizeof (grub_efi_char16_t);
|
||||
+ loaded_image->load_options =
|
||||
+ grub_efi_allocate_any_pages (GRUB_EFI_BYTES_TO_PAGES (loaded_image->load_options_size));
|
||||
+ if (!loaded_image->load_options)
|
||||
+ return grub_error(GRUB_ERR_BAD_OS, "failed to create kernel parameters");
|
||||
+
|
||||
+ loaded_image->load_options_size =
|
||||
+ 2 * grub_utf8_to_utf16 (loaded_image->load_options, len,
|
||||
+ (grub_uint8_t *) linux_args, len, NULL);
|
||||
+
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
failure:
|
||||
@@ -109,72 +131,44 @@ failure:
|
||||
return grub_error(GRUB_ERR_BAD_OS, "failed to install/update FDT");
|
||||
}
|
||||
|
||||
- return GRUB_ERR_NONE;
|
||||
-
|
||||
-failure:
|
||||
- grub_fdt_unload();
|
||||
- return grub_error(GRUB_ERR_BAD_OS, "failed to install/update FDT");
|
||||
-}
|
||||
-
|
||||
-grub_err_t
|
||||
-grub_arch_efi_linux_boot_image (grub_addr_t addr, grub_size_t size, char *args)
|
||||
+static void
|
||||
+free_params (void)
|
||||
{
|
||||
-{
|
||||
- grub_efi_memory_mapped_device_path_t *mempath;
|
||||
- grub_efi_handle_t image_handle;
|
||||
- grub_efi_boot_services_t *b;
|
||||
@ -290,8 +269,7 @@ index ef3e9f9..a312c66 100644
|
||||
- mempath[0].memory_type = GRUB_EFI_LOADER_DATA;
|
||||
- mempath[0].start_address = addr;
|
||||
- mempath[0].end_address = addr + size;
|
||||
+ grub_efi_loaded_image_t *loaded_image = NULL;
|
||||
|
||||
-
|
||||
- mempath[1].header.type = GRUB_EFI_END_DEVICE_PATH_TYPE;
|
||||
- mempath[1].header.subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
|
||||
- mempath[1].header.length = sizeof (grub_efi_device_path_t);
|
||||
@ -302,6 +280,50 @@ index ef3e9f9..a312c66 100644
|
||||
- (void *) addr, size, &image_handle);
|
||||
- if (status != GRUB_EFI_SUCCESS)
|
||||
- return grub_error (GRUB_ERR_BAD_OS, "cannot load image");
|
||||
-
|
||||
- grub_dprintf ("linux", "linux command line: '%s'\n", args);
|
||||
+ grub_dprintf ("linux", "Installed/updated FDT configuration table @ %p\n",
|
||||
+ fdt);
|
||||
|
||||
/* Convert command line to UCS-2 */
|
||||
- loaded_image = grub_efi_get_loaded_image (image_handle);
|
||||
+ loaded_image = grub_efi_get_loaded_image (grub_efi_image_handle);
|
||||
+ if (!loaded_image)
|
||||
+ goto failure;
|
||||
+
|
||||
loaded_image->load_options_size = len =
|
||||
- (grub_strlen (args) + 1) * sizeof (grub_efi_char16_t);
|
||||
+ (grub_strlen (linux_args) + 1) * sizeof (grub_efi_char16_t);
|
||||
loaded_image->load_options =
|
||||
grub_efi_allocate_any_pages (GRUB_EFI_BYTES_TO_PAGES (loaded_image->load_options_size));
|
||||
if (!loaded_image->load_options)
|
||||
- return grub_errno;
|
||||
+ return grub_error(GRUB_ERR_BAD_OS, "failed to create kernel parameters");
|
||||
|
||||
loaded_image->load_options_size =
|
||||
2 * grub_utf8_to_utf16 (loaded_image->load_options, len,
|
||||
- (grub_uint8_t *) args, len, NULL);
|
||||
+ (grub_uint8_t *) linux_args, len, NULL);
|
||||
|
||||
- grub_dprintf ("linux", "starting image %p\n", image_handle);
|
||||
- status = b->start_image (image_handle, 0, NULL);
|
||||
+ return GRUB_ERR_NONE;
|
||||
|
||||
- /* When successful, not reached */
|
||||
- b->unload_image (image_handle);
|
||||
- grub_efi_free_pages ((grub_addr_t) loaded_image->load_options,
|
||||
- GRUB_EFI_BYTES_TO_PAGES (loaded_image->load_options_size));
|
||||
+failure:
|
||||
+ grub_fdt_unload();
|
||||
+ return grub_error(GRUB_ERR_BAD_OS, "failed to install/update FDT");
|
||||
+}
|
||||
|
||||
- return grub_errno;
|
||||
+static void
|
||||
+free_params (void)
|
||||
+{
|
||||
+ grub_efi_loaded_image_t *loaded_image = NULL;
|
||||
+
|
||||
+ loaded_image = grub_efi_get_loaded_image (grub_efi_image_handle);
|
||||
+ if (loaded_image)
|
||||
+ {
|
||||
@ -312,39 +334,20 @@ index ef3e9f9..a312c66 100644
|
||||
+ loaded_image->load_options_size = 0;
|
||||
+ }
|
||||
+}
|
||||
|
||||
- grub_dprintf ("linux", "linux command line: '%s'\n", args);
|
||||
+
|
||||
+grub_err_t
|
||||
+grub_arch_efi_linux_boot_image (grub_addr_t addr, char *args)
|
||||
+{
|
||||
+ grub_err_t retval;
|
||||
|
||||
- /* Convert command line to UCS-2 */
|
||||
- loaded_image = grub_efi_get_loaded_image (image_handle);
|
||||
- loaded_image->load_options_size = len =
|
||||
- (grub_strlen (args) + 1) * sizeof (grub_efi_char16_t);
|
||||
- loaded_image->load_options =
|
||||
- grub_efi_allocate_any_pages (GRUB_EFI_BYTES_TO_PAGES (loaded_image->load_options_size));
|
||||
- if (!loaded_image->load_options)
|
||||
+
|
||||
+ retval = finalize_params_linux ();
|
||||
+ if (retval != GRUB_ERR_NONE)
|
||||
return grub_errno;
|
||||
|
||||
- loaded_image->load_options_size =
|
||||
- 2 * grub_utf8_to_utf16 (loaded_image->load_options, len,
|
||||
- (grub_uint8_t *) args, len, NULL);
|
||||
-
|
||||
- grub_dprintf ("linux", "starting image %p\n", image_handle);
|
||||
- status = b->start_image (image_handle, 0, NULL);
|
||||
+ return grub_errno;
|
||||
+
|
||||
+ grub_dprintf ("linux", "linux command line: '%s'\n", args);
|
||||
|
||||
- /* When successful, not reached */
|
||||
- b->unload_image (image_handle);
|
||||
- grub_efi_free_pages ((grub_addr_t) loaded_image->load_options,
|
||||
- GRUB_EFI_BYTES_TO_PAGES (loaded_image->load_options_size));
|
||||
+
|
||||
+ retval = grub_efi_linux_boot ((char *)addr, handover_offset, (void *)addr);
|
||||
|
||||
- return grub_errno;
|
||||
+
|
||||
+ /* Never reached... */
|
||||
+ free_params();
|
||||
+ return retval;
|
||||
@ -387,7 +390,7 @@ index ef3e9f9..a312c66 100644
|
||||
linux_args = grub_malloc (cmdline_size);
|
||||
if (!linux_args)
|
||||
diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
|
||||
index 22cc25e..d9b7a9b 100644
|
||||
index 22cc25eccd9..d9b7a9ba400 100644
|
||||
--- a/grub-core/loader/arm64/xen_boot.c
|
||||
+++ b/grub-core/loader/arm64/xen_boot.c
|
||||
@@ -266,7 +266,6 @@ xen_boot (void)
|
||||
@ -400,7 +403,7 @@ index 22cc25e..d9b7a9b 100644
|
||||
|
||||
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
|
||||
new file mode 100644
|
||||
index 0000000..c24202a
|
||||
index 00000000000..c24202a5dd1
|
||||
--- /dev/null
|
||||
+++ b/grub-core/loader/efi/linux.c
|
||||
@@ -0,0 +1,70 @@
|
||||
@ -476,7 +479,7 @@ index 0000000..c24202a
|
||||
+#pragma GCC diagnostic pop
|
||||
diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
|
||||
new file mode 100644
|
||||
index 0000000..bb2616a
|
||||
index 00000000000..bb2616a8092
|
||||
--- /dev/null
|
||||
+++ b/grub-core/loader/i386/efi/linux.c
|
||||
@@ -0,0 +1,335 @@
|
||||
@ -816,10 +819,10 @@ index 0000000..bb2616a
|
||||
+ grub_unregister_command (cmd_initrdefi);
|
||||
+}
|
||||
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
|
||||
index 47ea294..eea25ea 100644
|
||||
index 2a299520160..8be4c3b3f48 100644
|
||||
--- a/grub-core/loader/i386/pc/linux.c
|
||||
+++ b/grub-core/loader/i386/pc/linux.c
|
||||
@@ -470,14 +470,20 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -474,14 +474,20 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
||||
return grub_errno;
|
||||
}
|
||||
|
||||
@ -841,7 +844,7 @@ index 47ea294..eea25ea 100644
|
||||
grub_register_command ("initrd16", grub_cmd_initrd,
|
||||
0, N_("Load initrd."));
|
||||
my_mod = mod;
|
||||
@@ -486,5 +492,7 @@ GRUB_MOD_INIT(linux16)
|
||||
@@ -490,5 +496,7 @@ GRUB_MOD_INIT(linux16)
|
||||
GRUB_MOD_FINI(linux16)
|
||||
{
|
||||
grub_unregister_command (cmd_linux);
|
||||
@ -850,7 +853,7 @@ index 47ea294..eea25ea 100644
|
||||
+ grub_unregister_command (cmd_initrd16);
|
||||
}
|
||||
diff --git a/include/grub/arm/linux.h b/include/grub/arm/linux.h
|
||||
index 2e98a66..775297d 100644
|
||||
index bcd5a7eb186..b582f67f661 100644
|
||||
--- a/include/grub/arm/linux.h
|
||||
+++ b/include/grub/arm/linux.h
|
||||
@@ -20,6 +20,7 @@
|
||||
@ -880,19 +883,18 @@ index 2e98a66..775297d 100644
|
||||
|
||||
#if defined GRUB_MACHINE_UBOOT
|
||||
diff --git a/include/grub/arm64/linux.h b/include/grub/arm64/linux.h
|
||||
index 4269adc..a3be9dd 100644
|
||||
index 7e22b4ab699..ea030312df3 100644
|
||||
--- a/include/grub/arm64/linux.h
|
||||
+++ b/include/grub/arm64/linux.h
|
||||
@@ -19,6 +19,8 @@
|
||||
@@ -19,6 +19,7 @@
|
||||
#ifndef GRUB_ARM64_LINUX_HEADER
|
||||
#define GRUB_ARM64_LINUX_HEADER 1
|
||||
|
||||
+#include <grub/efi/pe32.h>
|
||||
+
|
||||
#define GRUB_LINUX_ARM64_MAGIC_SIGNATURE 0x644d5241 /* 'ARM\x64' */
|
||||
#include <grub/types.h>
|
||||
|
||||
/* From linux/Documentation/arm64/booting.txt */
|
||||
@@ -36,9 +38,17 @@ struct linux_arm64_kernel_header
|
||||
#define GRUB_LINUX_ARM64_MAGIC_SIGNATURE 0x644d5241 /* 'ARM\x64' */
|
||||
@@ -38,9 +39,17 @@ struct linux_arm64_kernel_header
|
||||
grub_uint32_t hdr_offset; /* Offset of PE/COFF header */
|
||||
};
|
||||
|
||||
@ -911,7 +913,7 @@ index 4269adc..a3be9dd 100644
|
||||
|
||||
#endif /* ! GRUB_ARM64_LINUX_HEADER */
|
||||
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
|
||||
index e90e00d..6840bfe 100644
|
||||
index 83d958f9945..6295df85f3f 100644
|
||||
--- a/include/grub/efi/efi.h
|
||||
+++ b/include/grub/efi/efi.h
|
||||
@@ -47,6 +47,9 @@ EXPORT_FUNC(grub_efi_allocate_fixed) (grub_efi_physical_address_t address,
|
||||
@ -924,7 +926,7 @@ index e90e00d..6840bfe 100644
|
||||
void EXPORT_FUNC(grub_efi_free_pages) (grub_efi_physical_address_t address,
|
||||
grub_efi_uintn_t pages);
|
||||
grub_efi_uintn_t EXPORT_FUNC(grub_efi_find_mmap_size) (void);
|
||||
@@ -82,6 +85,7 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var,
|
||||
@@ -88,6 +91,7 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var,
|
||||
const grub_efi_guid_t *guid,
|
||||
void *data,
|
||||
grub_size_t datasize);
|
||||
@ -932,7 +934,7 @@ index e90e00d..6840bfe 100644
|
||||
int
|
||||
EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,
|
||||
const grub_efi_device_path_t *dp2);
|
||||
@@ -95,8 +99,7 @@ void *EXPORT_FUNC(grub_efi_get_firmware_fdt)(void);
|
||||
@@ -101,8 +105,7 @@ void *EXPORT_FUNC(grub_efi_get_firmware_fdt)(void);
|
||||
grub_err_t EXPORT_FUNC(grub_efi_get_ram_base)(grub_addr_t *);
|
||||
#include <grub/cpu/linux.h>
|
||||
grub_err_t grub_arch_efi_linux_check_image(struct linux_arch_kernel_header *lh);
|
||||
@ -944,7 +946,7 @@ index e90e00d..6840bfe 100644
|
||||
grub_addr_t grub_efi_modules_addr (void);
|
||||
diff --git a/include/grub/efi/linux.h b/include/grub/efi/linux.h
|
||||
new file mode 100644
|
||||
index 0000000..d9ede36
|
||||
index 00000000000..d9ede36773b
|
||||
--- /dev/null
|
||||
+++ b/include/grub/efi/linux.h
|
||||
@@ -0,0 +1,31 @@
|
||||
@ -979,6 +981,3 @@ index 0000000..d9ede36
|
||||
+ void *kernel_param);
|
||||
+
|
||||
+#endif /* ! GRUB_EFI_LINUX_HEADER */
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,20 +1,22 @@
|
||||
From 6dd706679d6a784317929140bdc7bb11c90ab622 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <mjg59@coreos.com>
|
||||
Date: Fri, 5 Jul 2019 20:54:51 +0200
|
||||
Subject: [PATCH 002/220] Rework linux command
|
||||
Date: Sun, 9 Aug 2015 16:12:39 -0700
|
||||
Subject: [PATCH] Rework linux command
|
||||
|
||||
We want a single buffer that contains the entire kernel image in order to
|
||||
perform a TPM measurement. Allocate one and copy the entire kernel into it
|
||||
before pulling out the individual blocks later on.
|
||||
|
||||
Signed-off-by: Matthew Garrett <mjg59@coreos.com>
|
||||
---
|
||||
grub-core/loader/i386/linux.c | 36 +++++++++++++++++++++++-------------
|
||||
1 file changed, 23 insertions(+), 13 deletions(-)
|
||||
grub-core/loader/i386/linux.c | 35 +++++++++++++++++++++++------------
|
||||
1 file changed, 23 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
|
||||
index d0501e2..b255c95 100644
|
||||
index 9f74a96b19a..dccf3bb3005 100644
|
||||
--- a/grub-core/loader/i386/linux.c
|
||||
+++ b/grub-core/loader/i386/linux.c
|
||||
@@ -641,13 +641,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -649,13 +649,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
{
|
||||
grub_file_t file = 0;
|
||||
struct linux_i386_kernel_header lh;
|
||||
@ -31,7 +33,7 @@ index d0501e2..b255c95 100644
|
||||
|
||||
grub_dl_ref (my_mod);
|
||||
|
||||
@@ -661,7 +663,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -669,7 +671,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
if (! file)
|
||||
goto fail;
|
||||
|
||||
@ -48,7 +50,7 @@ index d0501e2..b255c95 100644
|
||||
{
|
||||
if (!grub_errno)
|
||||
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
|
||||
@@ -669,6 +679,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -677,6 +687,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -58,32 +60,25 @@ index d0501e2..b255c95 100644
|
||||
if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_OS, "invalid magic number");
|
||||
@@ -760,6 +773,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
preferred_address))
|
||||
goto fail;
|
||||
|
||||
+
|
||||
grub_memset (&linux_params, 0, sizeof (linux_params));
|
||||
grub_memcpy (&linux_params.setup_sects, &lh.setup_sects, sizeof (lh) - 0x1F1);
|
||||
|
||||
@@ -782,13 +796,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -784,13 +797,11 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
/* We've already read lh so there is no need to read it second time. */
|
||||
len -= sizeof(lh);
|
||||
|
||||
- if (grub_file_read (file, (char *) &linux_params + sizeof (lh), len) != len)
|
||||
- {
|
||||
- if ((len > 0) &&
|
||||
- (grub_file_read (file, (char *) &linux_params + sizeof (lh), len) != len))
|
||||
+ linux_params_ptr = (void *)&linux_params;
|
||||
+ if (len > 0)
|
||||
{
|
||||
- if (!grub_errno)
|
||||
- grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
|
||||
- argv[0]);
|
||||
- goto fail;
|
||||
- }
|
||||
+ linux_params_ptr = (void *)&linux_params;
|
||||
+ grub_memcpy (linux_params_ptr + sizeof (lh), kernel + kernel_offset, len);
|
||||
+ kernel_offset += len;
|
||||
+ grub_memcpy (linux_params_ptr + sizeof (lh), kernel + kernel_offset, len);
|
||||
+ kernel_offset += len;
|
||||
}
|
||||
|
||||
linux_params.type_of_loader = GRUB_LINUX_BOOT_LOADER_TYPE;
|
||||
|
||||
@@ -847,7 +857,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
linux_params.code32_start = prot_mode_target + lh.code32_start - GRUB_LINUX_BZIMAGE_ADDR;
|
||||
@@ -853,7 +864,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
/* The other parameters are filled when booting. */
|
||||
|
||||
@ -92,7 +87,7 @@ index d0501e2..b255c95 100644
|
||||
|
||||
grub_dprintf ("linux", "bzImage, setup=0x%x, size=0x%x\n",
|
||||
(unsigned) real_size, (unsigned) prot_size);
|
||||
@@ -1001,9 +1011,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -1007,9 +1018,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
}
|
||||
|
||||
len = prot_file_size;
|
||||
@ -103,7 +98,7 @@ index d0501e2..b255c95 100644
|
||||
|
||||
if (grub_errno == GRUB_ERR_NONE)
|
||||
{
|
||||
@@ -1014,6 +1022,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -1020,6 +1029,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
fail:
|
||||
|
||||
@ -112,6 +107,3 @@ index d0501e2..b255c95 100644
|
||||
if (file)
|
||||
grub_file_close (file);
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,20 +1,22 @@
|
||||
From 84d1fbf3d3a427c168b57f83e8e29a7ae22e7192 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <mjg59@coreos.com>
|
||||
Date: Fri, 5 Jul 2019 21:12:00 +0200
|
||||
Subject: [PATCH 003/220] Rework linux16 command
|
||||
Date: Sun, 9 Aug 2015 16:20:58 -0700
|
||||
Subject: [PATCH] Rework linux16 command
|
||||
|
||||
We want a single buffer that contains the entire kernel image in order to
|
||||
perform a TPM measurement. Allocate one and copy the entire kernel int it
|
||||
before pulling out the individual blocks later on.
|
||||
|
||||
Signed-off-by: Matthew Garrett <mjg59@coreos.com>
|
||||
---
|
||||
grub-core/loader/i386/pc/linux.c | 33 +++++++++++++++++++++------------
|
||||
1 file changed, 21 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
|
||||
index eea25ea..73fb91e 100644
|
||||
index 8be4c3b3f48..4b1750e360e 100644
|
||||
--- a/grub-core/loader/i386/pc/linux.c
|
||||
+++ b/grub-core/loader/i386/pc/linux.c
|
||||
@@ -123,13 +123,14 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -124,13 +124,14 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
grub_file_t file = 0;
|
||||
struct linux_i386_kernel_header lh;
|
||||
grub_uint8_t setup_sects;
|
||||
@ -30,7 +32,7 @@ index eea25ea..73fb91e 100644
|
||||
|
||||
grub_dl_ref (my_mod);
|
||||
|
||||
@@ -143,7 +144,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -144,7 +145,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
if (! file)
|
||||
goto fail;
|
||||
|
||||
@ -47,7 +49,7 @@ index eea25ea..73fb91e 100644
|
||||
{
|
||||
if (!grub_errno)
|
||||
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
|
||||
@@ -151,6 +160,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -152,6 +161,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -57,7 +59,7 @@ index eea25ea..73fb91e 100644
|
||||
if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_OS, "invalid magic number");
|
||||
@@ -314,13 +326,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -320,13 +332,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
grub_memmove (grub_linux_real_chunk, &lh, sizeof (lh));
|
||||
|
||||
len = real_size + GRUB_DISK_SECTOR_SIZE - sizeof (lh);
|
||||
@ -74,7 +76,7 @@ index eea25ea..73fb91e 100644
|
||||
|
||||
if (lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
|
||||
|| grub_le_to_cpu16 (lh.version) < 0x0200)
|
||||
@@ -358,9 +366,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -364,9 +372,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
}
|
||||
|
||||
len = grub_linux16_prot_size;
|
||||
@ -86,7 +88,7 @@ index eea25ea..73fb91e 100644
|
||||
|
||||
if (grub_errno == GRUB_ERR_NONE)
|
||||
{
|
||||
@@ -370,6 +377,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -376,6 +383,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
fail:
|
||||
|
||||
@ -95,6 +97,3 @@ index eea25ea..73fb91e 100644
|
||||
if (file)
|
||||
grub_file_close (file);
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 703e2ddcf768f52f46d02a59627b91280822c293 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Raymund Will <rw@suse.com>
|
||||
Date: Mon, 8 Jul 2019 11:55:18 +0200
|
||||
Subject: [PATCH 004/220] Add secureboot support on efi chainloader
|
||||
Subject: [PATCH] Add secureboot support on efi chainloader
|
||||
|
||||
Expand the chainloader to be able to verify the image by means of shim
|
||||
lock protocol. The PE/COFF image is loaded and relocated by the
|
||||
@ -164,21 +164,36 @@ following branches:
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1347291
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
|
||||
Also:
|
||||
|
||||
commit cc06f149fbd2d8c1da1e83173d21629ba97e0d92
|
||||
Author: Raymund Will <rw@suse.com>
|
||||
|
||||
chainloader: Define machine types for RISC-V
|
||||
|
||||
The commit "Add secureboot support on efi chainloader" didn't add machine
|
||||
types for RISC-V, so this patch adds them.
|
||||
|
||||
Note, that grub-core/loader/riscv/linux.c is skipped because Linux is not
|
||||
supported yet. This patch might need a new revision once that's the case.
|
||||
|
||||
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
|
||||
---
|
||||
grub-core/kern/efi/efi.c | 14 +-
|
||||
grub-core/loader/arm64/linux.c | 4 +-
|
||||
grub-core/loader/efi/chainloader.c | 817 +++++++++++++++++++++++++++++++++----
|
||||
grub-core/loader/efi/chainloader.c | 820 +++++++++++++++++++++++++++++++++----
|
||||
grub-core/loader/efi/linux.c | 25 +-
|
||||
grub-core/loader/i386/efi/linux.c | 17 +-
|
||||
include/grub/efi/linux.h | 2 +-
|
||||
include/grub/efi/pe32.h | 52 ++-
|
||||
7 files changed, 840 insertions(+), 91 deletions(-)
|
||||
7 files changed, 844 insertions(+), 90 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
||||
index a0faa40..3487b06 100644
|
||||
index 35b8f670602..4a2259aa1c7 100644
|
||||
--- a/grub-core/kern/efi/efi.c
|
||||
+++ b/grub-core/kern/efi/efi.c
|
||||
@@ -283,14 +283,20 @@ grub_efi_secure_boot (void)
|
||||
@@ -296,14 +296,20 @@ grub_efi_secure_boot (void)
|
||||
grub_efi_boolean_t ret = 0;
|
||||
|
||||
secure_boot = grub_efi_get_variable("SecureBoot", &efi_var_guid, &datasize);
|
||||
@ -204,7 +219,7 @@ index a0faa40..3487b06 100644
|
||||
if (*secure_boot && !*setup_mode)
|
||||
ret = 1;
|
||||
diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
|
||||
index a312c66..04994d5 100644
|
||||
index a312c668685..04994d5c67d 100644
|
||||
--- a/grub-core/loader/arm64/linux.c
|
||||
+++ b/grub-core/loader/arm64/linux.c
|
||||
@@ -284,6 +284,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@ -226,7 +241,7 @@ index a312c66..04994d5 100644
|
||||
grub_error (GRUB_ERR_INVALID_COMMAND, N_("%s has invalid signature"), argv[0]);
|
||||
goto fail;
|
||||
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
|
||||
index cd92ea3..ef87b06 100644
|
||||
index 2bd80f4db3d..e6a8d4ad0e9 100644
|
||||
--- a/grub-core/loader/efi/chainloader.c
|
||||
+++ b/grub-core/loader/efi/chainloader.c
|
||||
@@ -32,6 +32,8 @@
|
||||
@ -261,15 +276,7 @@ index cd92ea3..ef87b06 100644
|
||||
|
||||
grub_dl_unref (my_mod);
|
||||
return GRUB_ERR_NONE;
|
||||
@@ -179,7 +187,6 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename)
|
||||
/* Fill the file path for the directory. */
|
||||
d = (grub_efi_device_path_t *) ((char *) file_path
|
||||
+ ((char *) d - (char *) dp));
|
||||
- grub_efi_print_device_path (d);
|
||||
copy_file_path ((grub_efi_file_path_device_path_t *) d,
|
||||
dir_start, dir_end - dir_start);
|
||||
|
||||
@@ -197,20 +204,690 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename)
|
||||
@@ -213,20 +221,694 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename)
|
||||
return file_path;
|
||||
}
|
||||
|
||||
@ -384,6 +391,10 @@ index cd92ea3..ef87b06 100644
|
||||
+ GRUB_PE32_MACHINE_I386;
|
||||
+#elif defined(__ia64__)
|
||||
+ GRUB_PE32_MACHINE_IA64;
|
||||
+#elif defined(__riscv) && (__riscv_xlen == 32)
|
||||
+ GRUB_PE32_MACHINE_RISCV32;
|
||||
+#elif defined(__riscv) && (__riscv_xlen == 64)
|
||||
+ GRUB_PE32_MACHINE_RISCV64;
|
||||
+#else
|
||||
+#error this architecture is not supported by grub2
|
||||
+#endif
|
||||
@ -963,7 +974,7 @@ index cd92ea3..ef87b06 100644
|
||||
|
||||
if (argc == 0)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
|
||||
@@ -222,15 +899,45 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -238,15 +920,45 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
address = 0;
|
||||
image_handle = 0;
|
||||
file_path = 0;
|
||||
@ -1011,7 +1022,7 @@ index cd92ea3..ef87b06 100644
|
||||
if (! dev)
|
||||
goto fail;
|
||||
|
||||
@@ -267,17 +974,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -283,17 +995,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
if (! file_path)
|
||||
goto fail;
|
||||
|
||||
@ -1032,7 +1043,7 @@ index cd92ea3..ef87b06 100644
|
||||
|
||||
status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ANY_PAGES,
|
||||
GRUB_EFI_LOADER_CODE,
|
||||
@@ -291,7 +995,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -307,7 +1016,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
}
|
||||
|
||||
boot_image = (void *) ((grub_addr_t) address);
|
||||
@ -1041,7 +1052,7 @@ index cd92ea3..ef87b06 100644
|
||||
{
|
||||
if (grub_errno == GRUB_ERR_NONE)
|
||||
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
|
||||
@@ -301,7 +1005,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -317,7 +1026,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
}
|
||||
|
||||
#if defined (__i386__) || defined (__x86_64__)
|
||||
@ -1050,12 +1061,12 @@ index cd92ea3..ef87b06 100644
|
||||
{
|
||||
struct grub_macho_fat_header *head = boot_image;
|
||||
if (head->magic
|
||||
@@ -310,6 +1014,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -326,6 +1035,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
grub_uint32_t i;
|
||||
struct grub_macho_fat_arch *archs
|
||||
= (struct grub_macho_fat_arch *) (head + 1);
|
||||
+
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_OS,
|
||||
+ "MACHO binaries are forbidden with Secure Boot");
|
||||
@ -1065,7 +1076,7 @@ index cd92ea3..ef87b06 100644
|
||||
for (i = 0; i < grub_cpu_to_le32 (head->nfat_arch); i++)
|
||||
{
|
||||
if (GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT (archs[i].cputype))
|
||||
@@ -324,79 +1036,39 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -340,79 +1057,39 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
> ~grub_cpu_to_le32 (archs[i].size)
|
||||
|| grub_cpu_to_le32 (archs[i].offset)
|
||||
+ grub_cpu_to_le32 (archs[i].size)
|
||||
@ -1097,27 +1108,27 @@ index cd92ea3..ef87b06 100644
|
||||
- grub_error (GRUB_ERR_BAD_OS, "cannot load image");
|
||||
-
|
||||
- goto fail;
|
||||
- }
|
||||
-
|
||||
- /* LoadImage does not set a device handler when the image is
|
||||
- loaded from memory, so it is necessary to set it explicitly here.
|
||||
- This is a mess. */
|
||||
- loaded_image = grub_efi_get_loaded_image (image_handle);
|
||||
- if (! loaded_image)
|
||||
- {
|
||||
- grub_error (GRUB_ERR_BAD_OS, "no loaded image available");
|
||||
- goto fail;
|
||||
+ grub_file_close (file);
|
||||
+ grub_device_close (dev);
|
||||
+ grub_loader_set (grub_secureboot_chainloader_boot,
|
||||
+ grub_secureboot_chainloader_unload, 0);
|
||||
+ return 0;
|
||||
}
|
||||
-
|
||||
- /* LoadImage does not set a device handler when the image is
|
||||
- loaded from memory, so it is necessary to set it explicitly here.
|
||||
- This is a mess. */
|
||||
- loaded_image = grub_efi_get_loaded_image (image_handle);
|
||||
- if (! loaded_image)
|
||||
+ else if (rc == 0)
|
||||
{
|
||||
- grub_error (GRUB_ERR_BAD_OS, "no loaded image available");
|
||||
- goto fail;
|
||||
- }
|
||||
- loaded_image->device_handle = dev_handle;
|
||||
-
|
||||
- if (argc > 1)
|
||||
+ else if (rc == 0)
|
||||
{
|
||||
- {
|
||||
- int i, len;
|
||||
- grub_efi_char16_t *p16;
|
||||
-
|
||||
@ -1128,7 +1139,11 @@ index cd92ea3..ef87b06 100644
|
||||
- cmdline = p16 = grub_malloc (len);
|
||||
- if (! cmdline)
|
||||
- goto fail;
|
||||
-
|
||||
+ grub_load_and_start_image(boot_image);
|
||||
+ grub_file_close (file);
|
||||
+ grub_device_close (dev);
|
||||
+ grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 0);
|
||||
|
||||
- for (i = 1; i < argc; i++)
|
||||
- {
|
||||
- char *p8;
|
||||
@ -1140,11 +1155,7 @@ index cd92ea3..ef87b06 100644
|
||||
- *(p16++) = ' ';
|
||||
- }
|
||||
- *(--p16) = 0;
|
||||
+ grub_load_and_start_image(boot_image);
|
||||
+ grub_file_close (file);
|
||||
+ grub_device_close (dev);
|
||||
+ grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 0);
|
||||
|
||||
-
|
||||
- loaded_image->load_options = cmdline;
|
||||
- loaded_image->load_options_size = len;
|
||||
+ return 0;
|
||||
@ -1162,7 +1173,7 @@ index cd92ea3..ef87b06 100644
|
||||
if (dev)
|
||||
grub_device_close (dev);
|
||||
|
||||
@@ -408,6 +1080,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -424,6 +1101,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
if (address)
|
||||
efi_call_2 (b->free_pages, address, pages);
|
||||
|
||||
@ -1173,7 +1184,7 @@ index cd92ea3..ef87b06 100644
|
||||
|
||||
return grub_errno;
|
||||
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
|
||||
index c24202a..c8ecce6 100644
|
||||
index c24202a5dd1..c8ecce6dfd0 100644
|
||||
--- a/grub-core/loader/efi/linux.c
|
||||
+++ b/grub-core/loader/efi/linux.c
|
||||
@@ -33,21 +33,34 @@ struct grub_efi_shim_lock
|
||||
@ -1197,7 +1208,9 @@ index c24202a..c8ecce6 100644
|
||||
+ grub_dprintf ("secureboot", "shim not available\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
|
||||
- if (shim_lock->verify(data, size) == GRUB_EFI_SUCCESS)
|
||||
- return 1;
|
||||
+ grub_dprintf ("secureboot", "Asking shim to verify kernel signature\n");
|
||||
+ status = shim_lock->verify (data, size);
|
||||
+ grub_dprintf ("secureboot", "shim_lock->verify(): %ld\n", (long int)status);
|
||||
@ -1207,18 +1220,16 @@ index c24202a..c8ecce6 100644
|
||||
+ return 1;
|
||||
+ }
|
||||
|
||||
- if (shim_lock->verify(data, size) == GRUB_EFI_SUCCESS)
|
||||
- return 1;
|
||||
- return 0;
|
||||
+ grub_dprintf ("secureboot", "Kernel signature verification failed (0x%lx)\n",
|
||||
+ (unsigned long) status);
|
||||
|
||||
- return 0;
|
||||
+
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
|
||||
index bb2616a..6b24cbb 100644
|
||||
index bb2616a8092..6b24cbb9483 100644
|
||||
--- a/grub-core/loader/i386/efi/linux.c
|
||||
+++ b/grub-core/loader/i386/efi/linux.c
|
||||
@@ -117,6 +117,8 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
||||
@ -1286,7 +1297,7 @@ index bb2616a..6b24cbb 100644
|
||||
grub_file_close (file);
|
||||
|
||||
diff --git a/include/grub/efi/linux.h b/include/grub/efi/linux.h
|
||||
index d9ede36..0033d93 100644
|
||||
index d9ede36773b..0033d9305a9 100644
|
||||
--- a/include/grub/efi/linux.h
|
||||
+++ b/include/grub/efi/linux.h
|
||||
@@ -22,7 +22,7 @@
|
||||
@ -1299,7 +1310,7 @@ index d9ede36..0033d93 100644
|
||||
grub_err_t
|
||||
EXPORT_FUNC(grub_efi_linux_boot) (void *kernel_address, grub_off_t offset,
|
||||
diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h
|
||||
index 0ed8781..a43adf2 100644
|
||||
index 0ed8781f037..a43adf27464 100644
|
||||
--- a/include/grub/efi/pe32.h
|
||||
+++ b/include/grub/efi/pe32.h
|
||||
@@ -223,7 +223,11 @@ struct grub_pe64_optional_header
|
||||
@ -1388,6 +1399,3 @@ index 0ed8781..a43adf2 100644
|
||||
struct grub_pe32_fixup_block
|
||||
{
|
||||
grub_uint32_t page_rva;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,473 +0,0 @@
|
||||
From 22e9b5b6f0e2031bc68d1c3cb0e8e1f33cc68c93 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2019 12:55:29 +0200
|
||||
Subject: [PATCH 007/220] re-write .gitignore
|
||||
|
||||
---
|
||||
.gitignore | 366 +++++++++++++++-----------------------
|
||||
docs/.gitignore | 5 +
|
||||
grub-core/.gitignore | 16 ++
|
||||
grub-core/lib/.gitignore | 1 +
|
||||
include/grub/gcrypt/.gitignore | 2 +
|
||||
po/.gitignore | 5 +
|
||||
util/bash-completion.d/.gitignore | 2 +
|
||||
7 files changed, 171 insertions(+), 226 deletions(-)
|
||||
create mode 100644 docs/.gitignore
|
||||
create mode 100644 grub-core/.gitignore
|
||||
create mode 100644 grub-core/lib/.gitignore
|
||||
create mode 100644 include/grub/gcrypt/.gitignore
|
||||
create mode 100644 po/.gitignore
|
||||
create mode 100644 util/bash-completion.d/.gitignore
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 819cd18..b45a633 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -1,237 +1,151 @@
|
||||
+# things ./autogen.sh will create
|
||||
+/Makefile.utilgcry.def
|
||||
+/ABOUT-NLS
|
||||
+/aclocal.m4
|
||||
+/autom4te.cache
|
||||
+/build-aux
|
||||
+/configure
|
||||
+/gnulib
|
||||
+/grub-core/lib/gnulib/
|
||||
+/Makefile
|
||||
+
|
||||
+# things very common editors create that we never want
|
||||
*~
|
||||
-00_header
|
||||
-10_*
|
||||
-20_linux_xen
|
||||
-30_os-prober
|
||||
-40_custom
|
||||
-41_custom
|
||||
-*.1
|
||||
-*.8
|
||||
-ABOUT-NLS
|
||||
-aclocal.m4
|
||||
-ahci_test
|
||||
-ascii.bitmaps
|
||||
-ascii.h
|
||||
-autom4te.cache
|
||||
-build-aux
|
||||
-build-grub-gen-asciih
|
||||
-build-grub-gen-widthspec
|
||||
-build-grub-mkfont
|
||||
-cdboot_test
|
||||
-cmp_test
|
||||
-config.cache
|
||||
-config.guess
|
||||
-config.h
|
||||
-config-util.h
|
||||
-config-util.h.in
|
||||
-config.log
|
||||
-config.status
|
||||
-config.sub
|
||||
-configure
|
||||
-core_compress_test
|
||||
-DISTLIST
|
||||
-docs/*.info
|
||||
-docs/stamp-vti
|
||||
-docs/version.texi
|
||||
-ehci_test
|
||||
-example_grub_script_test
|
||||
-example_scripted_test
|
||||
-example_unit_test
|
||||
+.*.sw?
|
||||
+*.patch
|
||||
+
|
||||
+# stuff you're likely to make while building test trees
|
||||
+grub.cfg
|
||||
+/build*/
|
||||
+
|
||||
+# built objects across the whole tree
|
||||
+Makefile.in
|
||||
+*.a
|
||||
+*.am
|
||||
+*.efi
|
||||
*.exec
|
||||
-*.exec.exe
|
||||
-fddboot_test
|
||||
-genkernsyms.sh
|
||||
-gensymlist.sh
|
||||
-gentrigtables
|
||||
-gentrigtables.exe
|
||||
-gettext_strings_test
|
||||
-/gnulib
|
||||
-grub-bin2h
|
||||
-/grub-bios-setup
|
||||
-/grub-bios-setup.exe
|
||||
-grub_cmd_date
|
||||
-grub_cmd_echo
|
||||
-grub_cmd_regexp
|
||||
-grub_cmd_set_date
|
||||
-grub_cmd_sleep
|
||||
-/grub-editenv
|
||||
-/grub-editenv.exe
|
||||
-grub-emu
|
||||
-grub-emu-lite
|
||||
-grub-emu.exe
|
||||
-grub-emu-lite.exe
|
||||
-grub_emu_init.c
|
||||
-grub_emu_init.h
|
||||
-/grub-file
|
||||
-/grub-file.exe
|
||||
-grub-fstest
|
||||
-grub-fstest.exe
|
||||
-grub_fstest_init.c
|
||||
-grub_fstest_init.h
|
||||
-grub_func_test
|
||||
-grub-install
|
||||
-grub-install.exe
|
||||
-grub-kbdcomp
|
||||
-/grub-macbless
|
||||
-/grub-macbless.exe
|
||||
-grub-macho2img
|
||||
-/grub-menulst2cfg
|
||||
-/grub-menulst2cfg.exe
|
||||
-/grub-mk*
|
||||
-grub-mount
|
||||
-/grub-ofpathname
|
||||
-/grub-ofpathname.exe
|
||||
-grub-core/build-grub-pe2elf.exe
|
||||
-/grub-probe
|
||||
-/grub-probe.exe
|
||||
-grub_probe_init.c
|
||||
-grub_probe_init.h
|
||||
-/grub-reboot
|
||||
-grub_script_blanklines
|
||||
-grub_script_blockarg
|
||||
-grub_script_break
|
||||
-grub-script-check
|
||||
-grub-script-check.exe
|
||||
-grub_script_check_init.c
|
||||
-grub_script_check_init.h
|
||||
-grub_script_comments
|
||||
-grub_script_continue
|
||||
-grub_script_dollar
|
||||
-grub_script_echo1
|
||||
-grub_script_echo_keywords
|
||||
-grub_script_escape_comma
|
||||
-grub_script_eval
|
||||
-grub_script_expansion
|
||||
-grub_script_final_semicolon
|
||||
-grub_script_for1
|
||||
-grub_script_functions
|
||||
-grub_script_gettext
|
||||
-grub_script_if
|
||||
-grub_script_leading_whitespace
|
||||
-grub_script_no_commands
|
||||
-grub_script_not
|
||||
-grub_script_return
|
||||
-grub_script_setparams
|
||||
-grub_script_shift
|
||||
-grub_script_strcmp
|
||||
-grub_script_test
|
||||
-grub_script_vars1
|
||||
-grub_script_while1
|
||||
-grub_script.tab.c
|
||||
-grub_script.tab.h
|
||||
-grub_script.yy.c
|
||||
-grub_script.yy.h
|
||||
-grub-set-default
|
||||
-grub_setup_init.c
|
||||
-grub_setup_init.h
|
||||
-grub-shell
|
||||
-grub-shell-tester
|
||||
-grub-sparc64-setup
|
||||
-grub-sparc64-setup.exe
|
||||
-/grub-syslinux2cfg
|
||||
-/grub-syslinux2cfg.exe
|
||||
-gzcompress_test
|
||||
-hddboot_test
|
||||
-help_test
|
||||
-*.img
|
||||
*.image
|
||||
-*.image.exe
|
||||
-include/grub/cpu
|
||||
-include/grub/machine
|
||||
-INSTALL.grub
|
||||
-install-sh
|
||||
-lib/libgcrypt-grub
|
||||
-libgrub_a_init.c
|
||||
-*.log
|
||||
+*.img
|
||||
+*.info
|
||||
*.lst
|
||||
-lzocompress_test
|
||||
*.marker
|
||||
-Makefile
|
||||
/m4
|
||||
*.mod
|
||||
-mod-*.c
|
||||
-missing
|
||||
-netboot_test
|
||||
+*.module
|
||||
*.o
|
||||
-*.a
|
||||
-ohci_test
|
||||
-partmap_test
|
||||
-pata_test
|
||||
*.pf2
|
||||
-*.pp
|
||||
-po/*.mo
|
||||
-po/grub.pot
|
||||
-po/Makefile.in.in
|
||||
-po/Makevars
|
||||
-po/Makevars.template
|
||||
-po/POTFILES
|
||||
-po/Rules-quot
|
||||
-po/stamp-po
|
||||
-printf_test
|
||||
-priority_queue_unit_test
|
||||
-pseries_test
|
||||
-stamp-h
|
||||
-stamp-h1
|
||||
-stamp-h.in
|
||||
-symlist.c
|
||||
-symlist.h
|
||||
-trigtables.c
|
||||
-*.trs
|
||||
-uhci_test
|
||||
-update-grub_lib
|
||||
-unidata.c
|
||||
-xzcompress_test
|
||||
-Makefile.in
|
||||
-GPATH
|
||||
-GRTAGS
|
||||
-GSYMS
|
||||
-GTAGS
|
||||
-compile
|
||||
-depcomp
|
||||
-mdate-sh
|
||||
-texinfo.tex
|
||||
-grub-core/lib/libgcrypt-grub
|
||||
-.deps
|
||||
-.deps-util
|
||||
-.deps-core
|
||||
+*.yy.[ch]
|
||||
+.deps/
|
||||
+.deps-core/
|
||||
+.deps-util/
|
||||
.dirstamp
|
||||
-Makefile.util.am
|
||||
-contrib
|
||||
-grub-core/bootinfo.txt
|
||||
-grub-core/Makefile.core.am
|
||||
-grub-core/Makefile.gcry.def
|
||||
-grub-core/contrib
|
||||
-grub-core/gdb_grub
|
||||
-grub-core/genmod.sh
|
||||
-grub-core/gensyminfo.sh
|
||||
-grub-core/gmodule.pl
|
||||
-grub-core/grub.chrp
|
||||
-grub-core/modinfo.sh
|
||||
-grub-core/*.module
|
||||
-grub-core/*.module.exe
|
||||
-grub-core/*.pp
|
||||
-grub-core/kernel.img.bin
|
||||
-util/bash-completion.d/grub
|
||||
-grub-core/lib/gnulib
|
||||
-grub-core/rs_decoder.h
|
||||
-widthspec.bin
|
||||
-widthspec.h
|
||||
-docs/stamp-1
|
||||
-docs/version-dev.texi
|
||||
-Makefile.utilgcry.def
|
||||
-po/*.po
|
||||
-po/*.gmo
|
||||
-po/LINGUAS
|
||||
-po/remove-potcdate.sed
|
||||
-include/grub/gcrypt/gcrypt.h
|
||||
-include/grub/gcrypt/g10lib.h
|
||||
-po/POTFILES.in
|
||||
-po/POTFILES-shell.in
|
||||
-/grub-glue-efi
|
||||
-/grub-render-label
|
||||
-/grub-glue-efi.exe
|
||||
-/grub-render-label.exe
|
||||
+
|
||||
+# next are things you get if you do ./configure in the topdir (for e.g.
|
||||
+# "make dist" invocation.
|
||||
+/config-util.h
|
||||
+/config.h
|
||||
+/include/grub/cpu
|
||||
+/include/grub/machine
|
||||
+/INSTALL
|
||||
+/INSTALL.grub
|
||||
+/po/Makefile.in.in
|
||||
+/po/Makevars
|
||||
+/po/Makevars.template
|
||||
+/po/POTFILES
|
||||
+/po/Rules-quot
|
||||
+/stamp-h
|
||||
+/stamp-h1
|
||||
+bootstrap.log
|
||||
+config.log
|
||||
+config.status
|
||||
+
|
||||
+# stuff "make dist" creates
|
||||
+ChangeLog
|
||||
+grub-*.tar
|
||||
+grub-*.tar.*
|
||||
+
|
||||
+# stuff "make" creates
|
||||
+/[[:digit:]][[:digit:]]_?*
|
||||
+/ascii.h
|
||||
+/build-grub-gen-asciih
|
||||
+/build-grub-gen-widthspec
|
||||
+/build-grub-mkfont
|
||||
+/config-util.h.in
|
||||
/garbage-gen
|
||||
-/garbage-gen.exe
|
||||
-/grub-fs-tester
|
||||
-grub-core/build-grub-module-verifier
|
||||
+/grub*-bios-setup
|
||||
+/grub*-bios-setup.8
|
||||
+/grub*-editenv
|
||||
+/grub*-editenv.1
|
||||
+/grub*-file
|
||||
+/grub*-file.1
|
||||
+/grub*-fs-tester
|
||||
+/grub*-fstest
|
||||
+/grub*-fstest.1
|
||||
+/grub*-get-kernel-settings
|
||||
+/grub*-get-kernel-settings.3
|
||||
+/grub*-glue-efi
|
||||
+/grub*-glue-efi.1
|
||||
+/grub*-install
|
||||
+/grub*-install.8
|
||||
+/grub*-kbdcomp
|
||||
+/grub*-kbdcomp.1
|
||||
+/grub*-macbless
|
||||
+/grub*-macbless.8
|
||||
+/grub*-menulst2cfg
|
||||
+/grub*-menulst2cfg.1
|
||||
+/grub*-mount
|
||||
+/grub*-mount.1
|
||||
+/grub*-mkconfig
|
||||
+/grub*-mkconfig.8
|
||||
+/grub*-mkconfig_lib
|
||||
+/grub*-mkfont
|
||||
+/grub*-mkfont.1
|
||||
+/grub*-mkimage
|
||||
+/grub*-mkimage.1
|
||||
+/grub*-mklayout
|
||||
+/grub*-mklayout.1
|
||||
+/grub*-mknetdir
|
||||
+/grub*-mknetdir.1
|
||||
+/grub*-mkpasswd-pbkdf2
|
||||
+/grub*-mkpasswd-pbkdf2.1
|
||||
+/grub*-mkrelpath
|
||||
+/grub*-mkrelpath.1
|
||||
+/grub*-mkrescue
|
||||
+/grub*-mkrescue.1
|
||||
+/grub*-mkstandalone
|
||||
+/grub*-mkstandalone.1
|
||||
+/grub*-ofpathname
|
||||
+/grub*-ofpathname.8
|
||||
+/grub*-probe
|
||||
+/grub*-probe.8
|
||||
+/grub*-reboot
|
||||
+/grub*-reboot.8
|
||||
+/grub*-render-label
|
||||
+/grub*-render-label.1
|
||||
+/grub*-rpm-sort
|
||||
+/grub*-rpm-sort.8
|
||||
+/grub*-script-check
|
||||
+/grub*-script-check.1
|
||||
+/grub*-set-bootflag
|
||||
+/grub*-set-bootflag.1
|
||||
+/grub*-set-default
|
||||
+/grub*-set-default.8
|
||||
+/grub*-set-password
|
||||
+/grub*-set-password.8
|
||||
+/grub*-shell
|
||||
+/grub*-shell-tester
|
||||
+/grub*-sparc64-setup
|
||||
+/grub*-sparc64-setup.8
|
||||
+/grub*-syslinux2cfg
|
||||
+/grub*-syslinux2cfg.1
|
||||
+/grub*-switch-to-blscfg
|
||||
+/grub*-switch-to-blscfg.8
|
||||
+/grub_fstest.pp
|
||||
+/grub_fstest_init.c
|
||||
+/grub_fstest_init.lst
|
||||
+/grub_script.tab.[ch]
|
||||
+/libgrub.pp
|
||||
+/libgrub_a_init.c
|
||||
+/libgrub_a_init.lst
|
||||
+/stamp-h.in
|
||||
+/widthspec.h
|
||||
diff --git a/docs/.gitignore b/docs/.gitignore
|
||||
new file mode 100644
|
||||
index 0000000..e1d849e
|
||||
--- /dev/null
|
||||
+++ b/docs/.gitignore
|
||||
@@ -0,0 +1,5 @@
|
||||
+/*.in
|
||||
+/Makefile
|
||||
+/stamp-1
|
||||
+/stamp-vti
|
||||
+/version*.texi
|
||||
diff --git a/grub-core/.gitignore b/grub-core/.gitignore
|
||||
new file mode 100644
|
||||
index 0000000..2acce28
|
||||
--- /dev/null
|
||||
+++ b/grub-core/.gitignore
|
||||
@@ -0,0 +1,16 @@
|
||||
+/*.lst
|
||||
+/Makefile
|
||||
+/Makefile.gcry.def
|
||||
+/unidata.c
|
||||
+/build-grub-module-verifier
|
||||
+/gdb_grub
|
||||
+/genmod.sh
|
||||
+/gensyminfo.sh
|
||||
+/gentrigtables
|
||||
+/gmodule.pl
|
||||
+/grub_script.tab.[ch]
|
||||
+/modinfo.sh
|
||||
+/rs_decoder.h
|
||||
+/symlist.c
|
||||
+/symlist.h
|
||||
+/trigtables.c
|
||||
diff --git a/grub-core/lib/.gitignore b/grub-core/lib/.gitignore
|
||||
new file mode 100644
|
||||
index 0000000..6815459
|
||||
--- /dev/null
|
||||
+++ b/grub-core/lib/.gitignore
|
||||
@@ -0,0 +1 @@
|
||||
+/libgcrypt-grub/
|
||||
diff --git a/include/grub/gcrypt/.gitignore b/include/grub/gcrypt/.gitignore
|
||||
new file mode 100644
|
||||
index 0000000..8fbf564
|
||||
--- /dev/null
|
||||
+++ b/include/grub/gcrypt/.gitignore
|
||||
@@ -0,0 +1,2 @@
|
||||
+g10lib.h
|
||||
+gcrypt.h
|
||||
diff --git a/po/.gitignore b/po/.gitignore
|
||||
new file mode 100644
|
||||
index 0000000..f507e77
|
||||
--- /dev/null
|
||||
+++ b/po/.gitignore
|
||||
@@ -0,0 +1,5 @@
|
||||
+/Makefile
|
||||
+/POTFILES*.in
|
||||
+/grub.pot
|
||||
+/remove-potcdate.sed
|
||||
+/stamp-po
|
||||
diff --git a/util/bash-completion.d/.gitignore b/util/bash-completion.d/.gitignore
|
||||
new file mode 100644
|
||||
index 0000000..6813a52
|
||||
--- /dev/null
|
||||
+++ b/util/bash-completion.d/.gitignore
|
||||
@@ -0,0 +1,2 @@
|
||||
+Makefile
|
||||
+grub
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,132 +1,102 @@
|
||||
From a5d1b0391c2875677f3d7a6d762b3fadaa3ecf85 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 6 Oct 2015 16:09:25 -0400
|
||||
Subject: [PATCH 005/220] Make any of the loaders that link in efi mode honor
|
||||
secure boot.
|
||||
Subject: [PATCH] Make any of the loaders that link in efi mode honor secure
|
||||
boot.
|
||||
|
||||
And in this case "honor" means "even if somebody does link this in, they
|
||||
won't register commands if SB is enabled."
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/Makefile.am | 1 +
|
||||
grub-core/Makefile.core.def | 1 +
|
||||
grub-core/commands/iorw.c | 7 +++++
|
||||
grub-core/commands/memrw.c | 7 +++++
|
||||
grub-core/kern/dl.c | 1 +
|
||||
grub-core/kern/efi/efi.c | 34 --------------------
|
||||
grub-core/kern/efi/sb.c | 64 ++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/loader/efi/appleloader.c | 7 +++++
|
||||
grub-core/commands/iorw.c | 7 +++++++
|
||||
grub-core/commands/memrw.c | 7 +++++++
|
||||
grub-core/kern/dl.c | 3 ++-
|
||||
grub-core/kern/efi/efi.c | 34 ----------------------------------
|
||||
grub-core/loader/efi/appleloader.c | 7 +++++++
|
||||
grub-core/loader/efi/chainloader.c | 1 +
|
||||
grub-core/loader/i386/bsd.c | 7 +++++
|
||||
grub-core/loader/i386/linux.c | 7 +++++
|
||||
grub-core/loader/i386/pc/linux.c | 7 +++++
|
||||
grub-core/loader/multiboot.c | 7 +++++
|
||||
grub-core/loader/xnu.c | 7 +++++
|
||||
grub-core/loader/i386/bsd.c | 7 +++++++
|
||||
grub-core/loader/i386/linux.c | 7 +++++++
|
||||
grub-core/loader/i386/pc/linux.c | 7 +++++++
|
||||
grub-core/loader/multiboot.c | 7 +++++++
|
||||
grub-core/loader/xnu.c | 7 +++++++
|
||||
include/grub/efi/efi.h | 1 -
|
||||
include/grub/efi/sb.h | 29 +++++++++++++++++
|
||||
include/grub/ia64/linux.h | 0
|
||||
include/grub/mips/linux.h | 0
|
||||
include/grub/powerpc/linux.h | 0
|
||||
include/grub/sparc64/linux.h | 0
|
||||
20 files changed, 153 insertions(+), 35 deletions(-)
|
||||
create mode 100644 grub-core/kern/efi/sb.c
|
||||
create mode 100644 include/grub/efi/sb.h
|
||||
16 files changed, 59 insertions(+), 36 deletions(-)
|
||||
create mode 100644 include/grub/ia64/linux.h
|
||||
create mode 100644 include/grub/mips/linux.h
|
||||
create mode 100644 include/grub/powerpc/linux.h
|
||||
create mode 100644 include/grub/sparc64/linux.h
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index 3ea8e7f..c6ba5b2 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -71,6 +71,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dl.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/sb.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 581d9df..eb1088f 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -207,6 +207,7 @@ kernel = {
|
||||
i386_multiboot = kern/i386/pc/acpi.c;
|
||||
i386_coreboot = kern/acpi.c;
|
||||
i386_multiboot = kern/acpi.c;
|
||||
+ common = kern/efi/sb.c;
|
||||
|
||||
x86 = kern/i386/tsc.c;
|
||||
x86 = kern/i386/tsc_pit.c;
|
||||
diff --git a/grub-core/commands/iorw.c b/grub-core/commands/iorw.c
|
||||
index a0c164e..41a7f3f 100644
|
||||
index 584baec8f91..7b2999b14b5 100644
|
||||
--- a/grub-core/commands/iorw.c
|
||||
+++ b/grub-core/commands/iorw.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <grub/env.h>
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <grub/cpu/io.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/lockdown.h>
|
||||
+#include <grub/efi/sb.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -118,6 +119,9 @@ grub_cmd_write (grub_command_t cmd, int argc, char **argv)
|
||||
@@ -119,6 +120,9 @@ grub_cmd_write (grub_command_t cmd, int argc, char **argv)
|
||||
|
||||
GRUB_MOD_INIT(memrw)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
cmd_read_byte =
|
||||
grub_register_extcmd ("inb", grub_cmd_read, 0,
|
||||
N_("PORT"), N_("Read 8-bit value from PORT."),
|
||||
@@ -146,6 +150,9 @@ GRUB_MOD_INIT(memrw)
|
||||
@@ -147,6 +151,9 @@ GRUB_MOD_INIT(memrw)
|
||||
|
||||
GRUB_MOD_FINI(memrw)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
grub_unregister_extcmd (cmd_read_byte);
|
||||
grub_unregister_extcmd (cmd_read_word);
|
||||
grub_unregister_extcmd (cmd_read_dword);
|
||||
diff --git a/grub-core/commands/memrw.c b/grub-core/commands/memrw.c
|
||||
index 98769ea..088cbe9 100644
|
||||
index d401a6db0ef..39cf3a06dbd 100644
|
||||
--- a/grub-core/commands/memrw.c
|
||||
+++ b/grub-core/commands/memrw.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <grub/extcmd.h>
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <grub/env.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/lockdown.h>
|
||||
+#include <grub/efi/sb.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -120,6 +121,9 @@ grub_cmd_write (grub_command_t cmd, int argc, char **argv)
|
||||
@@ -121,6 +122,9 @@ grub_cmd_write (grub_command_t cmd, int argc, char **argv)
|
||||
|
||||
GRUB_MOD_INIT(memrw)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
cmd_read_byte =
|
||||
grub_register_extcmd ("read_byte", grub_cmd_read, 0,
|
||||
N_("ADDR"), N_("Read 8-bit value from ADDR."),
|
||||
@@ -148,6 +152,9 @@ GRUB_MOD_INIT(memrw)
|
||||
@@ -149,6 +153,9 @@ GRUB_MOD_INIT(memrw)
|
||||
|
||||
GRUB_MOD_FINI(memrw)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
grub_unregister_extcmd (cmd_read_byte);
|
||||
grub_unregister_extcmd (cmd_read_word);
|
||||
grub_unregister_extcmd (cmd_read_dword);
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index 896bebf..d7718d2 100644
|
||||
index b7149370950..7afb9e6f724 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -32,6 +32,7 @@
|
||||
@ -137,12 +107,21 @@ index 896bebf..d7718d2 100644
|
||||
|
||||
/* Platforms where modules are in a readonly area of memory. */
|
||||
#if defined(GRUB_MACHINE_QEMU)
|
||||
@@ -704,7 +705,7 @@ grub_dl_load_file (const char *filename)
|
||||
grub_dl_t mod = 0;
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
- if (grub_efi_secure_boot ())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
{
|
||||
#if 0
|
||||
/* This is an error, but grub2-mkconfig still generates a pile of
|
||||
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
||||
index 3487b06..6e1ceb9 100644
|
||||
index 4a2259aa1c7..8cff7be0289 100644
|
||||
--- a/grub-core/kern/efi/efi.c
|
||||
+++ b/grub-core/kern/efi/efi.c
|
||||
@@ -273,40 +273,6 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
return NULL;
|
||||
@@ -286,40 +286,6 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
return grub_efi_get_variable_with_attributes (var, guid, datasize_out, data_out, NULL);
|
||||
}
|
||||
|
||||
-grub_efi_boolean_t
|
||||
@ -182,78 +161,8 @@ index 3487b06..6e1ceb9 100644
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
|
||||
/* Search the mods section from the PE32/PE32+ image. This code uses
|
||||
diff --git a/grub-core/kern/efi/sb.c b/grub-core/kern/efi/sb.c
|
||||
new file mode 100644
|
||||
index 0000000..d74778b
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/efi/sb.c
|
||||
@@ -0,0 +1,64 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+ *
|
||||
+ * GRUB is free software: you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation, either version 3 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * GRUB is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <grub/err.h>
|
||||
+#include <grub/mm.h>
|
||||
+#include <grub/types.h>
|
||||
+#include <grub/cpu/linux.h>
|
||||
+#include <grub/efi/efi.h>
|
||||
+#include <grub/efi/pe32.h>
|
||||
+#include <grub/efi/linux.h>
|
||||
+#include <grub/efi/sb.h>
|
||||
+
|
||||
+int
|
||||
+grub_efi_secure_boot (void)
|
||||
+{
|
||||
+#ifdef GRUB_MACHINE_EFI
|
||||
+ grub_efi_guid_t efi_var_guid = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
+ grub_size_t datasize;
|
||||
+ char *secure_boot = NULL;
|
||||
+ char *setup_mode = NULL;
|
||||
+ grub_efi_boolean_t ret = 0;
|
||||
+
|
||||
+ secure_boot = grub_efi_get_variable("SecureBoot", &efi_var_guid, &datasize);
|
||||
+ if (datasize != 1 || !secure_boot)
|
||||
+ {
|
||||
+ grub_dprintf ("secureboot", "No SecureBoot variable\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
+ grub_dprintf ("secureboot", "SecureBoot: %d\n", *secure_boot);
|
||||
+
|
||||
+ setup_mode = grub_efi_get_variable("SetupMode", &efi_var_guid, &datasize);
|
||||
+ if (datasize != 1 || !setup_mode)
|
||||
+ {
|
||||
+ grub_dprintf ("secureboot", "No SetupMode variable\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
+ grub_dprintf ("secureboot", "SetupMode: %d\n", *setup_mode);
|
||||
+
|
||||
+ if (*secure_boot && !*setup_mode)
|
||||
+ ret = 1;
|
||||
+
|
||||
+ out:
|
||||
+ grub_free (secure_boot);
|
||||
+ grub_free (setup_mode);
|
||||
+ return ret;
|
||||
+#else
|
||||
+ return 0;
|
||||
+#endif
|
||||
+}
|
||||
diff --git a/grub-core/loader/efi/appleloader.c b/grub-core/loader/efi/appleloader.c
|
||||
index 74888c4..69c2a10 100644
|
||||
index 74888c463ba..585f2b57385 100644
|
||||
--- a/grub-core/loader/efi/appleloader.c
|
||||
+++ b/grub-core/loader/efi/appleloader.c
|
||||
@@ -24,6 +24,7 @@
|
||||
@ -268,7 +177,7 @@ index 74888c4..69c2a10 100644
|
||||
|
||||
GRUB_MOD_INIT(appleloader)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
cmd = grub_register_command ("appleloader", grub_cmd_appleloader,
|
||||
@ -278,13 +187,13 @@ index 74888c4..69c2a10 100644
|
||||
|
||||
GRUB_MOD_FINI(appleloader)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
grub_unregister_command (cmd);
|
||||
}
|
||||
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
|
||||
index ef87b06..5aa3a5d 100644
|
||||
index e6a8d4ad0e9..07c4937898d 100644
|
||||
--- a/grub-core/loader/efi/chainloader.c
|
||||
+++ b/grub-core/loader/efi/chainloader.c
|
||||
@@ -34,6 +34,7 @@
|
||||
@ -296,10 +205,10 @@ index ef87b06..5aa3a5d 100644
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/net.h>
|
||||
diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
|
||||
index 3730ed3..5b9b92d 100644
|
||||
index 5f3290ce17b..54befc26626 100644
|
||||
--- a/grub-core/loader/i386/bsd.c
|
||||
+++ b/grub-core/loader/i386/bsd.c
|
||||
@@ -39,6 +39,7 @@
|
||||
@@ -40,6 +40,7 @@
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
#include <grub/machine/int.h>
|
||||
#endif
|
||||
@ -307,92 +216,92 @@ index 3730ed3..5b9b92d 100644
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -2130,6 +2131,9 @@ static grub_command_t cmd_netbsd_module_elf, cmd_openbsd_ramdisk;
|
||||
@@ -2137,6 +2138,9 @@ static grub_command_t cmd_netbsd_module_elf, cmd_openbsd_ramdisk;
|
||||
|
||||
GRUB_MOD_INIT (bsd)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
/* Net and OpenBSD kernels are often compressed. */
|
||||
grub_dl_load ("gzio");
|
||||
|
||||
@@ -2169,6 +2173,9 @@ GRUB_MOD_INIT (bsd)
|
||||
@@ -2176,6 +2180,9 @@ GRUB_MOD_INIT (bsd)
|
||||
|
||||
GRUB_MOD_FINI (bsd)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
grub_unregister_extcmd (cmd_freebsd);
|
||||
grub_unregister_extcmd (cmd_openbsd);
|
||||
grub_unregister_extcmd (cmd_netbsd);
|
||||
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
|
||||
index b255c95..376c726 100644
|
||||
index dccf3bb3005..4aeb0e4b9a6 100644
|
||||
--- a/grub-core/loader/i386/linux.c
|
||||
+++ b/grub-core/loader/i386/linux.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <grub/lib/cmdline.h>
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <grub/linux.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include <grub/safemath.h>
|
||||
+#include <grub/efi/sb.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -1131,6 +1132,9 @@ static grub_command_t cmd_linux, cmd_initrd;
|
||||
@@ -1138,6 +1139,9 @@ static grub_command_t cmd_linux, cmd_initrd;
|
||||
|
||||
GRUB_MOD_INIT(linux)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
cmd_linux = grub_register_command ("linux", grub_cmd_linux,
|
||||
0, N_("Load Linux."));
|
||||
cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
|
||||
@@ -1140,6 +1144,9 @@ GRUB_MOD_INIT(linux)
|
||||
@@ -1147,6 +1151,9 @@ GRUB_MOD_INIT(linux)
|
||||
|
||||
GRUB_MOD_FINI(linux)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
grub_unregister_command (cmd_linux);
|
||||
grub_unregister_command (cmd_initrd);
|
||||
}
|
||||
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
|
||||
index 73fb91e..fe3e1d4 100644
|
||||
index 4b1750e360e..e3fa1221e81 100644
|
||||
--- a/grub-core/loader/i386/pc/linux.c
|
||||
+++ b/grub-core/loader/i386/pc/linux.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <grub/i386/floppy.h>
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <grub/lib/cmdline.h>
|
||||
#include <grub/linux.h>
|
||||
#include <grub/safemath.h>
|
||||
+#include <grub/efi/sb.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -483,6 +484,9 @@ static grub_command_t cmd_linux, cmd_linux16, cmd_initrd, cmd_initrd16;
|
||||
@@ -487,6 +488,9 @@ static grub_command_t cmd_linux, cmd_linux16, cmd_initrd, cmd_initrd16;
|
||||
|
||||
GRUB_MOD_INIT(linux16)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
cmd_linux =
|
||||
grub_register_command ("linux", grub_cmd_linux,
|
||||
0, N_("Load Linux."));
|
||||
@@ -500,6 +504,9 @@ GRUB_MOD_INIT(linux16)
|
||||
@@ -504,6 +508,9 @@ GRUB_MOD_INIT(linux16)
|
||||
|
||||
GRUB_MOD_FINI(linux16)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
grub_unregister_command (cmd_linux);
|
||||
grub_unregister_command (cmd_linux16);
|
||||
grub_unregister_command (cmd_initrd);
|
||||
diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c
|
||||
index 4a98d70..3e6ad16 100644
|
||||
index facb13f3d36..47e481f4576 100644
|
||||
--- a/grub-core/loader/multiboot.c
|
||||
+++ b/grub-core/loader/multiboot.c
|
||||
@@ -50,6 +50,7 @@
|
||||
@ -407,7 +316,7 @@ index 4a98d70..3e6ad16 100644
|
||||
|
||||
GRUB_MOD_INIT(multiboot)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
cmd_multiboot =
|
||||
@ -417,49 +326,49 @@ index 4a98d70..3e6ad16 100644
|
||||
|
||||
GRUB_MOD_FINI(multiboot)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
grub_unregister_command (cmd_multiboot);
|
||||
grub_unregister_command (cmd_module);
|
||||
}
|
||||
diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c
|
||||
index 7f74d1d..e0f47e7 100644
|
||||
index 1c0cf6a430a..baa54e652ab 100644
|
||||
--- a/grub-core/loader/xnu.c
|
||||
+++ b/grub-core/loader/xnu.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <grub/env.h>
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/verify.h>
|
||||
#include <grub/safemath.h>
|
||||
+#include <grub/efi/sb.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -1478,6 +1479,9 @@ static grub_extcmd_t cmd_splash;
|
||||
@@ -1497,6 +1498,9 @@ static grub_extcmd_t cmd_splash;
|
||||
|
||||
GRUB_MOD_INIT(xnu)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
cmd_kernel = grub_register_command ("xnu_kernel", grub_cmd_xnu_kernel, 0,
|
||||
N_("Load XNU image."));
|
||||
cmd_kernel64 = grub_register_command ("xnu_kernel64", grub_cmd_xnu_kernel64,
|
||||
@@ -1518,6 +1522,9 @@ GRUB_MOD_INIT(xnu)
|
||||
@@ -1540,6 +1544,9 @@ GRUB_MOD_INIT(xnu)
|
||||
|
||||
GRUB_MOD_FINI(xnu)
|
||||
{
|
||||
+ if (grub_efi_secure_boot())
|
||||
+ if (grub_efi_get_secureboot () == GRUB_EFI_SECUREBOOT_MODE_ENABLED)
|
||||
+ return;
|
||||
+
|
||||
#ifndef GRUB_MACHINE_EMU
|
||||
grub_unregister_command (cmd_resume);
|
||||
#endif
|
||||
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
|
||||
index 6840bfe..090c862 100644
|
||||
index 6295df85f3f..585fa6662b6 100644
|
||||
--- a/include/grub/efi/efi.h
|
||||
+++ b/include/grub/efi/efi.h
|
||||
@@ -85,7 +85,6 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var,
|
||||
@@ -91,7 +91,6 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var,
|
||||
const grub_efi_guid_t *guid,
|
||||
void *data,
|
||||
grub_size_t datasize);
|
||||
@ -467,53 +376,15 @@ index 6840bfe..090c862 100644
|
||||
int
|
||||
EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,
|
||||
const grub_efi_device_path_t *dp2);
|
||||
diff --git a/include/grub/efi/sb.h b/include/grub/efi/sb.h
|
||||
new file mode 100644
|
||||
index 0000000..9629fbb
|
||||
--- /dev/null
|
||||
+++ b/include/grub/efi/sb.h
|
||||
@@ -0,0 +1,29 @@
|
||||
+/* sb.h - declare functions for EFI Secure Boot support */
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
|
||||
+ *
|
||||
+ * GRUB is free software: you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation, either version 3 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * GRUB is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#ifndef GRUB_EFI_SB_HEADER
|
||||
+#define GRUB_EFI_SB_HEADER 1
|
||||
+
|
||||
+#include <grub/types.h>
|
||||
+#include <grub/dl.h>
|
||||
+
|
||||
+/* Functions. */
|
||||
+int EXPORT_FUNC (grub_efi_secure_boot) (void);
|
||||
+
|
||||
+#endif /* ! GRUB_EFI_SB_HEADER */
|
||||
diff --git a/include/grub/ia64/linux.h b/include/grub/ia64/linux.h
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
index 00000000000..e69de29bb2d
|
||||
diff --git a/include/grub/mips/linux.h b/include/grub/mips/linux.h
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
index 00000000000..e69de29bb2d
|
||||
diff --git a/include/grub/powerpc/linux.h b/include/grub/powerpc/linux.h
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
index 00000000000..e69de29bb2d
|
||||
diff --git a/include/grub/sparc64/linux.h b/include/grub/sparc64/linux.h
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
index 00000000000..e69de29bb2d
|
||||
@ -1,19 +1,19 @@
|
||||
From 6290701c8bd7183fef478afd5c27053bf9691639 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2019 12:32:37 +0200
|
||||
Subject: [PATCH 006/220] Handle multi-arch (64-on-32) boot in linuxefi loader.
|
||||
Subject: [PATCH] Handle multi-arch (64-on-32) boot in linuxefi loader.
|
||||
|
||||
Allow booting 64-bit kernels on 32-bit EFI on x86.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/loader/efi/linux.c | 9 ++-
|
||||
grub-core/loader/i386/efi/linux.c | 114 ++++++++++++++++++++++++++------------
|
||||
grub-core/loader/efi/linux.c | 9 +++-
|
||||
grub-core/loader/i386/efi/linux.c | 110 ++++++++++++++++++++++++++------------
|
||||
include/grub/i386/linux.h | 7 ++-
|
||||
3 files changed, 91 insertions(+), 39 deletions(-)
|
||||
3 files changed, 89 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
|
||||
index c8ecce6..0622dfa 100644
|
||||
index c8ecce6dfd0..0622dfa48d4 100644
|
||||
--- a/grub-core/loader/efi/linux.c
|
||||
+++ b/grub-core/loader/efi/linux.c
|
||||
@@ -69,12 +69,17 @@ grub_linuxefi_secure_validate (void *data, grub_uint32_t size)
|
||||
@ -37,7 +37,7 @@ index c8ecce6..0622dfa 100644
|
||||
|
||||
return GRUB_ERR_BUG;
|
||||
diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
|
||||
index 6b24cbb..3017d0f 100644
|
||||
index 6b24cbb9483..3017d0f3e52 100644
|
||||
--- a/grub-core/loader/i386/efi/linux.c
|
||||
+++ b/grub-core/loader/i386/efi/linux.c
|
||||
@@ -44,14 +44,10 @@ static char *linux_cmdline;
|
||||
@ -95,16 +95,14 @@ index 6b24cbb..3017d0f 100644
|
||||
}
|
||||
|
||||
- grub_dprintf ("linux", "params = %lx\n", (unsigned long) params);
|
||||
-
|
||||
+ grub_dprintf ("linux", "params = %p\n", params);
|
||||
|
||||
- grub_memset (params, 0, 16384);
|
||||
-
|
||||
+ grub_memset (params, 0, sizeof(*params));
|
||||
|
||||
- grub_memcpy (&lh, kernel, sizeof (lh));
|
||||
-
|
||||
- if (lh.boot_flag != grub_cpu_to_le16 (0xaa55))
|
||||
+ grub_dprintf ("linux", "params = %p\n", params);
|
||||
+
|
||||
+ grub_memset (params, 0, sizeof(*params));
|
||||
+
|
||||
+ setup_header_end_offset = *((grub_uint8_t *)kernel + 0x201);
|
||||
+ grub_dprintf ("linux", "copying %lu bytes from %p to %p\n",
|
||||
+ MIN((grub_size_t)0x202+setup_header_end_offset,
|
||||
@ -218,15 +216,15 @@ index 6b24cbb..3017d0f 100644
|
||||
loaded=1;
|
||||
+ grub_dprintf ("linux", "setting lh->code32_start to %p\n", kernel_mem);
|
||||
+ lh->code32_start = (grub_uint32_t)(grub_addr_t) kernel_mem;
|
||||
+
|
||||
+ grub_memcpy (kernel_mem, (char *)kernel + start, filelen - start);
|
||||
|
||||
- lh.code32_start = (grub_uint32_t)(grub_uint64_t) kernel_mem;
|
||||
- grub_memcpy (params, &lh, 2 * 512);
|
||||
+ grub_dprintf ("linux", "setting lh->type_of_loader\n");
|
||||
+ lh->type_of_loader = 0x6;
|
||||
+ grub_memcpy (kernel_mem, (char *)kernel + start, filelen - start);
|
||||
|
||||
- params->type_of_loader = 0x21;
|
||||
+ grub_dprintf ("linux", "setting lh->type_of_loader\n");
|
||||
+ lh->type_of_loader = 0x6;
|
||||
+
|
||||
+ grub_dprintf ("linux", "setting lh->ext_loader_{type,ver}\n");
|
||||
+ params->ext_loader_type = 0;
|
||||
+ params->ext_loader_ver = 2;
|
||||
@ -247,10 +245,10 @@ index 6b24cbb..3017d0f 100644
|
||||
if (kernel_mem && !loaded)
|
||||
grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)kernel_mem,
|
||||
diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h
|
||||
index ce30e7f..a093679 100644
|
||||
index eddf9251d9a..25ef52c04eb 100644
|
||||
--- a/include/grub/i386/linux.h
|
||||
+++ b/include/grub/i386/linux.h
|
||||
@@ -136,7 +136,12 @@ struct linux_i386_kernel_header
|
||||
@@ -138,7 +138,12 @@ struct linux_i386_kernel_header
|
||||
grub_uint32_t kernel_alignment;
|
||||
grub_uint8_t relocatable;
|
||||
grub_uint8_t min_alignment;
|
||||
@ -264,6 +262,3 @@ index ce30e7f..a093679 100644
|
||||
grub_uint32_t cmdline_size;
|
||||
grub_uint32_t hardware_subarch;
|
||||
grub_uint64_t hardware_subarch_data;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
248
0010-re-write-.gitignore.patch
Normal file
248
0010-re-write-.gitignore.patch
Normal file
@ -0,0 +1,248 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2019 12:55:29 +0200
|
||||
Subject: [PATCH] re-write .gitignore
|
||||
|
||||
---
|
||||
.gitignore | 152 ++++++++++++++++++++++++++++++++++++++
|
||||
docs/.gitignore | 5 ++
|
||||
grub-core/.gitignore | 16 ++++
|
||||
grub-core/lib/.gitignore | 1 +
|
||||
include/grub/gcrypt/.gitignore | 2 +
|
||||
po/.gitignore | 5 ++
|
||||
util/bash-completion.d/.gitignore | 2 +
|
||||
7 files changed, 183 insertions(+)
|
||||
create mode 100644 docs/.gitignore
|
||||
create mode 100644 grub-core/.gitignore
|
||||
create mode 100644 grub-core/lib/.gitignore
|
||||
create mode 100644 include/grub/gcrypt/.gitignore
|
||||
create mode 100644 po/.gitignore
|
||||
create mode 100644 util/bash-completion.d/.gitignore
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index f6a1bd05175..594d0134d33 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -275,3 +275,155 @@ widthspec.bin
|
||||
/xfs_test
|
||||
/xzcompress_test
|
||||
/zfs_test
|
||||
+=======
|
||||
+# things ./autogen.sh will create
|
||||
+/Makefile.utilgcry.def
|
||||
+/ABOUT-NLS
|
||||
+/aclocal.m4
|
||||
+/autom4te.cache
|
||||
+/build-aux
|
||||
+/configure
|
||||
+/gnulib
|
||||
+/grub-core/lib/gnulib/
|
||||
+/Makefile
|
||||
+
|
||||
+# things very common editors create that we never want
|
||||
+*~
|
||||
+.*.sw?
|
||||
+*.patch
|
||||
+
|
||||
+# stuff you're likely to make while building test trees
|
||||
+grub.cfg
|
||||
+/build*/
|
||||
+
|
||||
+# built objects across the whole tree
|
||||
+Makefile.in
|
||||
+*.a
|
||||
+*.am
|
||||
+*.efi
|
||||
+*.exec
|
||||
+*.image
|
||||
+*.img
|
||||
+*.info
|
||||
+*.lst
|
||||
+*.marker
|
||||
+/m4
|
||||
+*.mod
|
||||
+*.module
|
||||
+*.o
|
||||
+*.pf2
|
||||
+*.yy.[ch]
|
||||
+.deps/
|
||||
+.deps-core/
|
||||
+.deps-util/
|
||||
+.dirstamp
|
||||
+
|
||||
+# next are things you get if you do ./configure in the topdir (for e.g.
|
||||
+# "make dist" invocation.
|
||||
+/config-util.h
|
||||
+/config.h
|
||||
+/include/grub/cpu
|
||||
+/include/grub/machine
|
||||
+/INSTALL
|
||||
+/INSTALL.grub
|
||||
+/po/Makefile.in.in
|
||||
+/po/Makevars
|
||||
+/po/Makevars.template
|
||||
+/po/POTFILES
|
||||
+/po/Rules-quot
|
||||
+/stamp-h
|
||||
+/stamp-h1
|
||||
+bootstrap.log
|
||||
+config.log
|
||||
+config.status
|
||||
+
|
||||
+# stuff "make dist" creates
|
||||
+ChangeLog
|
||||
+grub-*.tar
|
||||
+grub-*.tar.*
|
||||
+
|
||||
+# stuff "make" creates
|
||||
+/[[:digit:]][[:digit:]]_?*
|
||||
+/ascii.h
|
||||
+/build-grub-gen-asciih
|
||||
+/build-grub-gen-widthspec
|
||||
+/build-grub-mkfont
|
||||
+/config-util.h.in
|
||||
+/garbage-gen
|
||||
+/grub*-bios-setup
|
||||
+/grub*-bios-setup.8
|
||||
+/grub*-editenv
|
||||
+/grub*-editenv.1
|
||||
+/grub*-file
|
||||
+/grub*-file.1
|
||||
+/grub*-fs-tester
|
||||
+/grub*-fstest
|
||||
+/grub*-fstest.1
|
||||
+/grub*-get-kernel-settings
|
||||
+/grub*-get-kernel-settings.3
|
||||
+/grub*-glue-efi
|
||||
+/grub*-glue-efi.1
|
||||
+/grub*-install
|
||||
+/grub*-install.8
|
||||
+/grub*-kbdcomp
|
||||
+/grub*-kbdcomp.1
|
||||
+/grub*-macbless
|
||||
+/grub*-macbless.8
|
||||
+/grub*-menulst2cfg
|
||||
+/grub*-menulst2cfg.1
|
||||
+/grub*-mount
|
||||
+/grub*-mount.1
|
||||
+/grub*-mkconfig
|
||||
+/grub*-mkconfig.8
|
||||
+/grub*-mkconfig_lib
|
||||
+/grub*-mkfont
|
||||
+/grub*-mkfont.1
|
||||
+/grub*-mkimage
|
||||
+/grub*-mkimage.1
|
||||
+/grub*-mklayout
|
||||
+/grub*-mklayout.1
|
||||
+/grub*-mknetdir
|
||||
+/grub*-mknetdir.1
|
||||
+/grub*-mkpasswd-pbkdf2
|
||||
+/grub*-mkpasswd-pbkdf2.1
|
||||
+/grub*-mkrelpath
|
||||
+/grub*-mkrelpath.1
|
||||
+/grub*-mkrescue
|
||||
+/grub*-mkrescue.1
|
||||
+/grub*-mkstandalone
|
||||
+/grub*-mkstandalone.1
|
||||
+/grub*-ofpathname
|
||||
+/grub*-ofpathname.8
|
||||
+/grub*-probe
|
||||
+/grub*-probe.8
|
||||
+/grub*-reboot
|
||||
+/grub*-reboot.8
|
||||
+/grub*-render-label
|
||||
+/grub*-render-label.1
|
||||
+/grub*-rpm-sort
|
||||
+/grub*-rpm-sort.8
|
||||
+/grub*-script-check
|
||||
+/grub*-script-check.1
|
||||
+/grub*-set-bootflag
|
||||
+/grub*-set-bootflag.1
|
||||
+/grub*-set-default
|
||||
+/grub*-set-default.8
|
||||
+/grub*-set-password
|
||||
+/grub*-set-password.8
|
||||
+/grub*-shell
|
||||
+/grub*-shell-tester
|
||||
+/grub*-sparc64-setup
|
||||
+/grub*-sparc64-setup.8
|
||||
+/grub*-syslinux2cfg
|
||||
+/grub*-syslinux2cfg.1
|
||||
+/grub*-switch-to-blscfg
|
||||
+/grub*-switch-to-blscfg.8
|
||||
+/grub_fstest.pp
|
||||
+/grub_fstest_init.c
|
||||
+/grub_fstest_init.lst
|
||||
+/grub_script.tab.[ch]
|
||||
+/libgrub.pp
|
||||
+/libgrub_a_init.c
|
||||
+/libgrub_a_init.lst
|
||||
+/stamp-h.in
|
||||
+/widthspec.h
|
||||
diff --git a/docs/.gitignore b/docs/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..e1d849ef95b
|
||||
--- /dev/null
|
||||
+++ b/docs/.gitignore
|
||||
@@ -0,0 +1,5 @@
|
||||
+/*.in
|
||||
+/Makefile
|
||||
+/stamp-1
|
||||
+/stamp-vti
|
||||
+/version*.texi
|
||||
diff --git a/grub-core/.gitignore b/grub-core/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..2acce281159
|
||||
--- /dev/null
|
||||
+++ b/grub-core/.gitignore
|
||||
@@ -0,0 +1,16 @@
|
||||
+/*.lst
|
||||
+/Makefile
|
||||
+/Makefile.gcry.def
|
||||
+/unidata.c
|
||||
+/build-grub-module-verifier
|
||||
+/gdb_grub
|
||||
+/genmod.sh
|
||||
+/gensyminfo.sh
|
||||
+/gentrigtables
|
||||
+/gmodule.pl
|
||||
+/grub_script.tab.[ch]
|
||||
+/modinfo.sh
|
||||
+/rs_decoder.h
|
||||
+/symlist.c
|
||||
+/symlist.h
|
||||
+/trigtables.c
|
||||
diff --git a/grub-core/lib/.gitignore b/grub-core/lib/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..68154591404
|
||||
--- /dev/null
|
||||
+++ b/grub-core/lib/.gitignore
|
||||
@@ -0,0 +1 @@
|
||||
+/libgcrypt-grub/
|
||||
diff --git a/include/grub/gcrypt/.gitignore b/include/grub/gcrypt/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..8fbf5646246
|
||||
--- /dev/null
|
||||
+++ b/include/grub/gcrypt/.gitignore
|
||||
@@ -0,0 +1,2 @@
|
||||
+g10lib.h
|
||||
+gcrypt.h
|
||||
diff --git a/po/.gitignore b/po/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..f507e7741e3
|
||||
--- /dev/null
|
||||
+++ b/po/.gitignore
|
||||
@@ -0,0 +1,5 @@
|
||||
+/Makefile
|
||||
+/POTFILES*.in
|
||||
+/grub.pot
|
||||
+/remove-potcdate.sed
|
||||
+/stamp-po
|
||||
diff --git a/util/bash-completion.d/.gitignore b/util/bash-completion.d/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..6813a527ad3
|
||||
--- /dev/null
|
||||
+++ b/util/bash-completion.d/.gitignore
|
||||
@@ -0,0 +1,2 @@
|
||||
+Makefile
|
||||
+grub
|
||||
@ -1,29 +0,0 @@
|
||||
From 100f123a544bc54034cf61646f03f988fc876435 Mon Sep 17 00:00:00 2001
|
||||
From: Marcel Kolaja <mkolaja@redhat.com>
|
||||
Date: Tue, 21 Jan 2014 10:57:08 -0500
|
||||
Subject: [PATCH 011/220] Honor a symlink when generating configuration by
|
||||
grub2-mkconfig
|
||||
|
||||
Honor a symlink when generating configuration by grub2-mkconfig, so that
|
||||
the -o option follows it rather than overwriting it with a regular file.
|
||||
---
|
||||
util/grub-mkconfig.in | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 9f477ff..523d4e0 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -287,7 +287,8 @@ and /etc/grub.d/* files or please file a bug report with
|
||||
exit 1
|
||||
else
|
||||
# none of the children aborted with error, install the new grub.cfg
|
||||
- mv -f ${grub_cfg}.new ${grub_cfg}
|
||||
+ cat ${grub_cfg}.new > ${grub_cfg}
|
||||
+ rm -f ${grub_cfg}.new
|
||||
fi
|
||||
fi
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,22 +1,26 @@
|
||||
From 3b4c970a7123c3c29415f41bebee761524597b25 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Thu, 20 Sep 2012 18:07:39 -0300
|
||||
Subject: [PATCH 008/220] IBM client architecture (CAS) reboot support
|
||||
Subject: [PATCH] IBM client architecture (CAS) reboot support
|
||||
|
||||
This is an implementation of IBM client architecture (CAS) reboot for GRUB.
|
||||
|
||||
There are cases where the POWER firmware must reboot in order to support
|
||||
specific features requested by a kernel. The kernel calls
|
||||
ibm,client-architecture-support and it may either return or reboot with the new
|
||||
feature set. eg:
|
||||
ibm,client-architecture-support and it may either return or reboot with
|
||||
the new feature set. eg:
|
||||
|
||||
Calling ibm,client-architecture-support.../
|
||||
Elapsed time since release of system processors: 70959 mins 50 secs
|
||||
Welcome to GRUB!
|
||||
|
||||
Instead of return to the GRUB menu, it will check if the flag for CAS reboot is
|
||||
set. If so, grub will automatically boot the last booted kernel using the same
|
||||
parameters
|
||||
Instead of return to the GRUB menu, it will check if the flag for CAS
|
||||
reboot is set. If so, grub will automatically boot the last booted
|
||||
kernel using the same parameters
|
||||
|
||||
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
[rharwood@redhat.com: commit message rewrap]
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/kern/ieee1275/openfw.c | 63 ++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/normal/main.c | 19 ++++++++++++
|
||||
@ -25,7 +29,7 @@ parameters
|
||||
4 files changed, 91 insertions(+)
|
||||
|
||||
diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c
|
||||
index 4d493ab..3a6689a 100644
|
||||
index 4d493ab7661..3a6689abb11 100644
|
||||
--- a/grub-core/kern/ieee1275/openfw.c
|
||||
+++ b/grub-core/kern/ieee1275/openfw.c
|
||||
@@ -591,3 +591,66 @@ grub_ieee1275_get_boot_dev (void)
|
||||
@ -96,10 +100,10 @@ index 4d493ab..3a6689a 100644
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 1b03dfd..222e239 100644
|
||||
index c4ebe9e22ad..70614de1565 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -33,6 +33,9 @@
|
||||
@@ -34,6 +34,9 @@
|
||||
#include <grub/charset.h>
|
||||
#include <grub/script_sh.h>
|
||||
#include <grub/bufio.h>
|
||||
@ -109,7 +113,7 @@ index 1b03dfd..222e239 100644
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -275,6 +278,22 @@ grub_normal_execute (const char *config, int nested, int batch)
|
||||
@@ -276,6 +279,22 @@ grub_normal_execute (const char *config, int nested, int batch)
|
||||
{
|
||||
menu = read_config_file (config);
|
||||
|
||||
@ -133,7 +137,7 @@ index 1b03dfd..222e239 100644
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
}
|
||||
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
|
||||
index ee299fd..0d05d6b 100644
|
||||
index 25158407dd8..ad80399246a 100644
|
||||
--- a/grub-core/script/execute.c
|
||||
+++ b/grub-core/script/execute.c
|
||||
@@ -28,6 +28,9 @@
|
||||
@ -146,7 +150,7 @@ index ee299fd..0d05d6b 100644
|
||||
|
||||
/* Max digits for a char is 3 (0xFF is 255), similarly for an int it
|
||||
is sizeof (int) * 3, and one extra for a possible -ve sign. */
|
||||
@@ -878,6 +881,10 @@ grub_script_execute_sourcecode (const char *source)
|
||||
@@ -883,6 +886,10 @@ grub_script_execute_sourcecode (const char *source)
|
||||
grub_err_t ret = 0;
|
||||
struct grub_script *parsed_script;
|
||||
|
||||
@ -158,7 +162,7 @@ index ee299fd..0d05d6b 100644
|
||||
{
|
||||
char *line;
|
||||
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
|
||||
index 73e2f46..0a59960 100644
|
||||
index 73e2f464475..0a599607f31 100644
|
||||
--- a/include/grub/ieee1275/ieee1275.h
|
||||
+++ b/include/grub/ieee1275/ieee1275.h
|
||||
@@ -254,6 +254,8 @@ int EXPORT_FUNC(grub_ieee1275_devalias_next) (struct grub_ieee1275_devalias *ali
|
||||
@ -170,6 +174,3 @@ index 73e2f46..0a59960 100644
|
||||
|
||||
char *EXPORT_FUNC(grub_ieee1275_get_boot_dev) (void);
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 8213eaa16384c332659e2655a7f5f01d09d5b27d Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Wed, 24 Apr 2013 10:51:48 -0300
|
||||
Subject: [PATCH 009/220] for ppc, reset console display attr when clear screen
|
||||
Subject: [PATCH] for ppc, reset console display attr when clear screen
|
||||
|
||||
v2: Also use \x0c instead of a literal ^L to make future patches less
|
||||
awkward.
|
||||
@ -10,12 +10,14 @@ This should fix this bugzilla:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=908519
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/term/terminfo.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
|
||||
index d317efa..29df35e 100644
|
||||
index 85ecf06b4df..05c88dcf49e 100644
|
||||
--- a/grub-core/term/terminfo.c
|
||||
+++ b/grub-core/term/terminfo.c
|
||||
@@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term,
|
||||
@ -27,6 +29,3 @@ index d317efa..29df35e 100644
|
||||
data->reverse_video_on = grub_strdup ("\e[7m");
|
||||
data->reverse_video_off = grub_strdup ("\e[m");
|
||||
if (grub_strcmp ("ieee1275", str) == 0)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
From 0a3d7e634bfa38143cdbe1c53aae681ea4432547 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Tue, 11 Jun 2013 15:14:05 -0300
|
||||
Subject: [PATCH 010/220] Disable GRUB video support for IBM power machines
|
||||
Subject: [PATCH] Disable GRUB video support for IBM power machines
|
||||
|
||||
Should fix the problem in bugzilla:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=973205
|
||||
|
||||
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/kern/ieee1275/cmain.c | 5 ++++-
|
||||
grub-core/video/ieee1275.c | 9 ++++++---
|
||||
@ -12,7 +15,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=973205
|
||||
3 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
|
||||
index 20cbbd7..04df9d2 100644
|
||||
index 20cbbd761ec..04df9d2c667 100644
|
||||
--- a/grub-core/kern/ieee1275/cmain.c
|
||||
+++ b/grub-core/kern/ieee1275/cmain.c
|
||||
@@ -90,7 +90,10 @@ grub_ieee1275_find_options (void)
|
||||
@ -28,7 +31,7 @@ index 20cbbd7..04df9d2 100644
|
||||
/* Old Macs have no key repeat, newer ones have fully working one.
|
||||
The ones inbetween when repeated key generates an escaoe sequence
|
||||
diff --git a/grub-core/video/ieee1275.c b/grub-core/video/ieee1275.c
|
||||
index 17a3dbb..b8e4b3f 100644
|
||||
index 17a3dbbb575..b8e4b3feb32 100644
|
||||
--- a/grub-core/video/ieee1275.c
|
||||
+++ b/grub-core/video/ieee1275.c
|
||||
@@ -352,9 +352,12 @@ static struct grub_video_adapter grub_video_ieee1275_adapter =
|
||||
@ -48,7 +51,7 @@ index 17a3dbb..b8e4b3f 100644
|
||||
|
||||
GRUB_MOD_FINI(ieee1275_fb)
|
||||
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
|
||||
index 0a59960..b5a1d49 100644
|
||||
index 0a599607f31..b5a1d49bbc3 100644
|
||||
--- a/include/grub/ieee1275/ieee1275.h
|
||||
+++ b/include/grub/ieee1275/ieee1275.h
|
||||
@@ -148,6 +148,8 @@ enum grub_ieee1275_flag
|
||||
@ -60,6 +63,3 @@ index 0a59960..b5a1d49 100644
|
||||
};
|
||||
|
||||
extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
From 11d400b4b4f1475cf1a75e7f216524a903e7df7c Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 3 Apr 2013 14:35:34 -0400
|
||||
Subject: [PATCH 012/220] Move bash completion script (#922997)
|
||||
Subject: [PATCH] Move bash completion script (#922997)
|
||||
|
||||
Apparently these go in a new place now.
|
||||
---
|
||||
@ -10,10 +10,10 @@ Apparently these go in a new place now.
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7656f24..d283af6 100644
|
||||
index 7517fc49d98..8331f95b645 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -305,6 +305,14 @@ AC_SUBST(grubdirname)
|
||||
@@ -314,6 +314,14 @@ AC_SUBST(grubdirname)
|
||||
AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname",
|
||||
[Default grub directory name])
|
||||
|
||||
@ -28,7 +28,7 @@ index 7656f24..d283af6 100644
|
||||
#
|
||||
# Checks for build programs.
|
||||
#
|
||||
@@ -516,6 +524,9 @@ HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags"
|
||||
@@ -525,6 +533,9 @@ HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags"
|
||||
# Check for target programs.
|
||||
#
|
||||
|
||||
@ -39,7 +39,7 @@ index 7656f24..d283af6 100644
|
||||
if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
|
||||
tmp_ac_tool_prefix="$ac_tool_prefix"
|
||||
diff --git a/util/bash-completion.d/Makefile.am b/util/bash-completion.d/Makefile.am
|
||||
index 136287c..61108f0 100644
|
||||
index 136287cf1bf..61108f05429 100644
|
||||
--- a/util/bash-completion.d/Makefile.am
|
||||
+++ b/util/bash-completion.d/Makefile.am
|
||||
@@ -6,7 +6,6 @@ EXTRA_DIST = $(bash_completion_source)
|
||||
@ -50,6 +50,3 @@ index 136287c..61108f0 100644
|
||||
bashcompletion_DATA = $(bash_completion_script)
|
||||
|
||||
$(bash_completion_script): $(bash_completion_source) $(top_builddir)/config.status
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,109 +0,0 @@
|
||||
From be1ed0f8e7ddf8747049c6e132c25032d2fef9ca Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 4 Sep 2014 16:49:25 -0400
|
||||
Subject: [PATCH 015/220] Add GRUB_DISABLE_UUID.
|
||||
|
||||
This will cause "search --fs-uuid --set=root ..." not to be generated by
|
||||
grub2-mkconfig, and instead simply attempt to use the grub device name
|
||||
as it understands it.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
docs/grub.texi | 7 +++++++
|
||||
util/grub-mkconfig.in | 22 +++++++++++++++++++---
|
||||
util/grub-mkconfig_lib.in | 4 ++--
|
||||
3 files changed, 28 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/docs/grub.texi b/docs/grub.texi
|
||||
index 8779507..6f52430 100644
|
||||
--- a/docs/grub.texi
|
||||
+++ b/docs/grub.texi
|
||||
@@ -1441,6 +1441,13 @@ enable the use of partition UUIDs, set this option to @samp{false}.
|
||||
If this option is set to @samp{true}, disable the generation of recovery
|
||||
mode menu entries.
|
||||
|
||||
+@item GRUB_DISABLE_UUID
|
||||
+Normally, @command{grub-mkconfig} will generate menu entries that use
|
||||
+universally-unique identifiers (UUIDs) to identify various filesystems to
|
||||
+search for files. This is usually more reliable, but in some cases it may
|
||||
+not be appropriate. To disable this use of UUIDs, set this option to
|
||||
+@samp{true}.
|
||||
+
|
||||
@item GRUB_VIDEO_BACKEND
|
||||
If graphical video support is required, either because the @samp{gfxterm}
|
||||
graphical terminal is in use or because @samp{GRUB_GFXPAYLOAD_LINUX} is set,
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 523d4e0..9ecbcfb 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -133,12 +133,12 @@ fi
|
||||
|
||||
# Device containing our userland. Typically used for root= parameter.
|
||||
GRUB_DEVICE="`${grub_probe} --target=device /`"
|
||||
-GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
|
||||
-GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2> /dev/null`" || true
|
||||
+GRUB_DEVICE_UUID_GENERATED="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
|
||||
+GRUB_DEVICE_PARTUUID_GENERATED="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2> /dev/null`" || true
|
||||
|
||||
# Device containing our /boot partition. Usually the same as GRUB_DEVICE.
|
||||
GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`"
|
||||
-GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
|
||||
+GRUB_DEVICE_BOOT_UUID_GENERATED="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
|
||||
|
||||
# Filesystem for the device containing our userland. Used for stuff like
|
||||
# choosing Hurd filesystem module.
|
||||
@@ -158,6 +158,21 @@ if test -f ${sysconfdir}/default/grub ; then
|
||||
. ${sysconfdir}/default/grub
|
||||
fi
|
||||
|
||||
+if [ "x$GRUB_DISABLE_UUID" != "xtrue" ]; then
|
||||
+ if [ -z "$GRUB_DEVICE_UUID" ]; then
|
||||
+ GRUB_DEVICE_UUID="$GRUB_DEVICE_UUID_GENERATED"
|
||||
+ fi
|
||||
+ if [ -z "$GRUB_DEVICE_BOOT_UUID" ]; then
|
||||
+ GRUB_DEVICE_BOOT_UUID="$GRUB_DEVICE_BOOT_UUID_GENERATED"
|
||||
+ fi
|
||||
+ if [ -z "$GRUB_DEVICE_UUID" ]; then
|
||||
+ GRUB_DEVICE_UUID="$GRUB_DEVICE_UUID_GENERATED"
|
||||
+ fi
|
||||
+ if [ -z "$GRUB_DEVICE_PART_UUID" ]; then
|
||||
+ GRUB_DEVICE_PART_UUID="$GRUB_DEVICE_PART_UUID_GENERATED"
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
# XXX: should this be deprecated at some point?
|
||||
if [ "x${GRUB_TERMINAL}" != "x" ] ; then
|
||||
GRUB_TERMINAL_INPUT="${GRUB_TERMINAL}"
|
||||
@@ -227,6 +242,7 @@ export GRUB_DEFAULT \
|
||||
GRUB_DISABLE_LINUX_UUID \
|
||||
GRUB_DISABLE_LINUX_PARTUUID \
|
||||
GRUB_DISABLE_RECOVERY \
|
||||
+ GRUB_DISABLE_UUID \
|
||||
GRUB_VIDEO_BACKEND \
|
||||
GRUB_GFXMODE \
|
||||
GRUB_BACKGROUND \
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index 0f801ca..1001a12 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -156,7 +156,7 @@ prepare_grub_to_access_device ()
|
||||
if [ "x$fs_hint" != x ]; then
|
||||
echo "set root='$fs_hint'"
|
||||
fi
|
||||
- if fs_uuid="`"${grub_probe}" --device $@ --target=fs_uuid 2> /dev/null`" ; then
|
||||
+ if [ "x$GRUB_DISABLE_UUID" != "xtrue" ] && fs_uuid="`"${grub_probe}" --device $@ --target=fs_uuid 2> /dev/null`" ; then
|
||||
hints="`"${grub_probe}" --device $@ --target=hints_string 2> /dev/null`" || hints=
|
||||
echo "if [ x\$feature_platform_search_hint = xy ]; then"
|
||||
echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
|
||||
@@ -173,7 +173,7 @@ grub_get_device_id ()
|
||||
IFS='
|
||||
'
|
||||
device="$1"
|
||||
- if fs_uuid="`"${grub_probe}" --device ${device} --target=fs_uuid 2> /dev/null`" ; then
|
||||
+ if [ "x$GRUB_DISABLE_UUID" != "xtrue" ] && fs_uuid="`"${grub_probe}" --device ${device} --target=fs_uuid 2> /dev/null`" ; then
|
||||
echo "$fs_uuid";
|
||||
else
|
||||
echo $device |sed 's, ,_,g'
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
From f12a6d6082e3d532b676e3835e833df2d818416b Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 5 Sep 2014 10:07:04 -0400
|
||||
Subject: [PATCH 014/220] Allow "fallback" to include entries by title, not
|
||||
just number.
|
||||
Subject: [PATCH] Allow "fallback" to include entries by title, not just
|
||||
number.
|
||||
|
||||
Resolves: rhbz#1026084
|
||||
|
||||
@ -12,10 +12,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 58 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
|
||||
index d5e0c79..9175ad2 100644
|
||||
index 8397886fa05..d7a222e681b 100644
|
||||
--- a/grub-core/normal/menu.c
|
||||
+++ b/grub-core/normal/menu.c
|
||||
@@ -163,16 +163,41 @@ grub_menu_set_timeout (int timeout)
|
||||
@@ -163,15 +163,40 @@ grub_menu_set_timeout (int timeout)
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,14 +51,13 @@ index d5e0c79..9175ad2 100644
|
||||
-get_and_remove_first_entry_number (const char *name)
|
||||
+get_and_remove_first_entry_number (grub_menu_t menu, const char *name)
|
||||
{
|
||||
const char *val;
|
||||
char *tail;
|
||||
const char *val, *tail;
|
||||
int entry;
|
||||
+ int sz = 0;
|
||||
|
||||
val = grub_env_get (name);
|
||||
if (! val)
|
||||
@@ -182,9 +207,39 @@ get_and_remove_first_entry_number (const char *name)
|
||||
@@ -181,9 +206,39 @@ get_and_remove_first_entry_number (const char *name)
|
||||
|
||||
entry = (int) grub_strtoul (val, &tail, 0);
|
||||
|
||||
@ -99,7 +98,7 @@ index d5e0c79..9175ad2 100644
|
||||
while (*tail && grub_isspace (*tail))
|
||||
tail++;
|
||||
grub_env_set (name, tail);
|
||||
@@ -347,7 +402,7 @@ grub_menu_execute_with_fallback (grub_menu_t menu,
|
||||
@@ -346,7 +401,7 @@ grub_menu_execute_with_fallback (grub_menu_t menu,
|
||||
grub_menu_execute_entry (entry, 1);
|
||||
|
||||
/* Deal with fallback entries. */
|
||||
@ -108,7 +107,7 @@ index d5e0c79..9175ad2 100644
|
||||
>= 0)
|
||||
{
|
||||
grub_print_error ();
|
||||
@@ -465,30 +520,6 @@ grub_menu_register_viewer (struct grub_menu_viewer *viewer)
|
||||
@@ -464,30 +519,6 @@ grub_menu_register_viewer (struct grub_menu_viewer *viewer)
|
||||
viewers = viewer;
|
||||
}
|
||||
|
||||
@ -139,6 +138,3 @@ index d5e0c79..9175ad2 100644
|
||||
/* Get the entry number from the variable NAME. */
|
||||
static int
|
||||
get_entry_number (grub_menu_t menu, const char *name)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 479a8c2d36a28aaac12bf349ea09999655b90353 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 26 Feb 2014 21:49:12 -0500
|
||||
Subject: [PATCH 016/220] Make "exit" take a return code.
|
||||
Subject: [PATCH] Make "exit" take a return code.
|
||||
|
||||
This adds "exit" with a return code. With this patch, any "exit"
|
||||
command /may/ include a return code, and on platforms that support
|
||||
@ -27,10 +27,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
14 files changed, 48 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/grub-core/commands/minicmd.c b/grub-core/commands/minicmd.c
|
||||
index 6bbce31..6d66b7c 100644
|
||||
index fa498931ed2..2bd3ac76f2d 100644
|
||||
--- a/grub-core/commands/minicmd.c
|
||||
+++ b/grub-core/commands/minicmd.c
|
||||
@@ -179,12 +179,24 @@ grub_mini_cmd_lsmod (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -182,12 +182,24 @@ grub_mini_cmd_lsmod (struct grub_command *cmd __attribute__ ((unused)),
|
||||
}
|
||||
|
||||
/* exit */
|
||||
@ -60,10 +60,10 @@ index 6bbce31..6d66b7c 100644
|
||||
}
|
||||
|
||||
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
||||
index 6e1ceb9..370ce03 100644
|
||||
index 8cff7be0289..05d8237a9b2 100644
|
||||
--- a/grub-core/kern/efi/efi.c
|
||||
+++ b/grub-core/kern/efi/efi.c
|
||||
@@ -164,11 +164,16 @@ grub_reboot (void)
|
||||
@@ -165,11 +165,16 @@ grub_reboot (void)
|
||||
}
|
||||
|
||||
void
|
||||
@ -83,7 +83,7 @@ index 6e1ceb9..370ce03 100644
|
||||
}
|
||||
|
||||
diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c
|
||||
index 425bb96..55ea5a1 100644
|
||||
index 425bb960347..55ea5a11ccd 100644
|
||||
--- a/grub-core/kern/emu/main.c
|
||||
+++ b/grub-core/kern/emu/main.c
|
||||
@@ -67,7 +67,7 @@ grub_reboot (void)
|
||||
@ -96,10 +96,10 @@ index 425bb96..55ea5a1 100644
|
||||
grub_reboot ();
|
||||
}
|
||||
diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
|
||||
index 65db79b..19cd007 100644
|
||||
index dfd8a8ec488..0ff13bcaf8c 100644
|
||||
--- a/grub-core/kern/emu/misc.c
|
||||
+++ b/grub-core/kern/emu/misc.c
|
||||
@@ -139,9 +139,10 @@ xasprintf (const char *fmt, ...)
|
||||
@@ -151,9 +151,10 @@ xasprintf (const char *fmt, ...)
|
||||
|
||||
#if !defined (GRUB_MACHINE_EMU) || defined (GRUB_UTIL)
|
||||
void
|
||||
@ -113,7 +113,7 @@ index 65db79b..19cd007 100644
|
||||
#endif
|
||||
|
||||
diff --git a/grub-core/kern/i386/coreboot/init.c b/grub-core/kern/i386/coreboot/init.c
|
||||
index 3314f02..36f9134 100644
|
||||
index 3314f027fec..36f9134b7b7 100644
|
||||
--- a/grub-core/kern/i386/coreboot/init.c
|
||||
+++ b/grub-core/kern/i386/coreboot/init.c
|
||||
@@ -41,7 +41,7 @@ extern grub_uint8_t _end[];
|
||||
@ -126,7 +126,7 @@ index 3314f02..36f9134 100644
|
||||
/* We can't use grub_fatal() in this function. This would create an infinite
|
||||
loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
|
||||
diff --git a/grub-core/kern/i386/qemu/init.c b/grub-core/kern/i386/qemu/init.c
|
||||
index 271b6fb..9fafe98 100644
|
||||
index 271b6fbfabd..9fafe98f015 100644
|
||||
--- a/grub-core/kern/i386/qemu/init.c
|
||||
+++ b/grub-core/kern/i386/qemu/init.c
|
||||
@@ -42,7 +42,7 @@ extern grub_uint8_t _end[];
|
||||
@ -139,7 +139,7 @@ index 271b6fb..9fafe98 100644
|
||||
/* We can't use grub_fatal() in this function. This would create an infinite
|
||||
loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
|
||||
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
|
||||
index d483e35..e71d158 100644
|
||||
index d483e35eed2..e71d1584164 100644
|
||||
--- a/grub-core/kern/ieee1275/init.c
|
||||
+++ b/grub-core/kern/ieee1275/init.c
|
||||
@@ -71,7 +71,7 @@ grub_addr_t grub_ieee1275_original_stack;
|
||||
@ -152,7 +152,7 @@ index d483e35..e71d158 100644
|
||||
grub_ieee1275_exit ();
|
||||
}
|
||||
diff --git a/grub-core/kern/mips/arc/init.c b/grub-core/kern/mips/arc/init.c
|
||||
index 3834a14..86b3a25 100644
|
||||
index 2ed3ff3191e..5c40c34078d 100644
|
||||
--- a/grub-core/kern/mips/arc/init.c
|
||||
+++ b/grub-core/kern/mips/arc/init.c
|
||||
@@ -276,7 +276,7 @@ grub_halt (void)
|
||||
@ -165,7 +165,7 @@ index 3834a14..86b3a25 100644
|
||||
GRUB_ARC_FIRMWARE_VECTOR->exit ();
|
||||
|
||||
diff --git a/grub-core/kern/mips/loongson/init.c b/grub-core/kern/mips/loongson/init.c
|
||||
index 7b96531..dff598c 100644
|
||||
index 7b96531b983..dff598ca7b0 100644
|
||||
--- a/grub-core/kern/mips/loongson/init.c
|
||||
+++ b/grub-core/kern/mips/loongson/init.c
|
||||
@@ -304,7 +304,7 @@ grub_halt (void)
|
||||
@ -178,7 +178,7 @@ index 7b96531..dff598c 100644
|
||||
grub_halt ();
|
||||
}
|
||||
diff --git a/grub-core/kern/mips/qemu_mips/init.c b/grub-core/kern/mips/qemu_mips/init.c
|
||||
index be88b77..8b6c55f 100644
|
||||
index be88b77d22d..8b6c55ffc01 100644
|
||||
--- a/grub-core/kern/mips/qemu_mips/init.c
|
||||
+++ b/grub-core/kern/mips/qemu_mips/init.c
|
||||
@@ -75,7 +75,7 @@ grub_machine_fini (int flags __attribute__ ((unused)))
|
||||
@ -191,10 +191,10 @@ index be88b77..8b6c55f 100644
|
||||
grub_halt ();
|
||||
}
|
||||
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
|
||||
index 3b633d5..cd63a8c 100644
|
||||
index 3af336ee227..63b586d09cb 100644
|
||||
--- a/grub-core/kern/misc.c
|
||||
+++ b/grub-core/kern/misc.c
|
||||
@@ -1095,9 +1095,18 @@ grub_abort (void)
|
||||
@@ -1209,9 +1209,18 @@ grub_abort (void)
|
||||
grub_getkey ();
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ index 3b633d5..cd63a8c 100644
|
||||
grub_fatal (const char *fmt, ...)
|
||||
{
|
||||
diff --git a/grub-core/kern/uboot/init.c b/grub-core/kern/uboot/init.c
|
||||
index 3e33864..be2a5be 100644
|
||||
index 3e338645c57..be2a5be1d07 100644
|
||||
--- a/grub-core/kern/uboot/init.c
|
||||
+++ b/grub-core/kern/uboot/init.c
|
||||
@@ -39,9 +39,9 @@ extern grub_size_t grub_total_module_size;
|
||||
@ -240,7 +240,7 @@ index 3e33864..be2a5be 100644
|
||||
else if (ver > API_SIG_VERSION)
|
||||
{
|
||||
diff --git a/grub-core/kern/xen/init.c b/grub-core/kern/xen/init.c
|
||||
index 782ca72..708b060 100644
|
||||
index 782ca72952a..708b060f324 100644
|
||||
--- a/grub-core/kern/xen/init.c
|
||||
+++ b/grub-core/kern/xen/init.c
|
||||
@@ -584,7 +584,7 @@ grub_machine_init (void)
|
||||
@ -253,10 +253,10 @@ index 782ca72..708b060 100644
|
||||
struct sched_shutdown arg;
|
||||
|
||||
diff --git a/include/grub/misc.h b/include/grub/misc.h
|
||||
index ee48eb7..f9135b6 100644
|
||||
index 7d2b5519690..fd18e6320b8 100644
|
||||
--- a/include/grub/misc.h
|
||||
+++ b/include/grub/misc.h
|
||||
@@ -334,7 +334,7 @@ int EXPORT_FUNC(grub_vsnprintf) (char *str, grub_size_t n, const char *fmt,
|
||||
@@ -353,7 +353,7 @@ int EXPORT_FUNC(grub_vsnprintf) (char *str, grub_size_t n, const char *fmt,
|
||||
char *EXPORT_FUNC(grub_xasprintf) (const char *fmt, ...)
|
||||
__attribute__ ((format (GNU_PRINTF, 1, 2))) WARN_UNUSED_RESULT;
|
||||
char *EXPORT_FUNC(grub_xvasprintf) (const char *fmt, va_list args) WARN_UNUSED_RESULT;
|
||||
@ -265,6 +265,3 @@ index ee48eb7..f9135b6 100644
|
||||
grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
|
||||
grub_uint64_t d,
|
||||
grub_uint64_t *r);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@ -1,35 +1,43 @@
|
||||
From 2c806ded764dd0e69dbc4e1b95a390bb65bbd019 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 7 Dec 2015 14:20:49 -0500
|
||||
Subject: [PATCH 018/220] Make efi machines load an env block from a variable
|
||||
Subject: [PATCH] Make efi machines load an env block from a variable
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/Makefile.core.def | 1 +
|
||||
grub-core/kern/efi/init.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 34 insertions(+), 1 deletion(-)
|
||||
grub-core/kern/efi/init.c | 36 +++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 36 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index eb1088f..41b5e16 100644
|
||||
index 45d3edaa4dc..c865a08b027 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -203,6 +203,7 @@ kernel = {
|
||||
efi = term/efi/console.c;
|
||||
efi = kern/acpi.c;
|
||||
@@ -207,6 +207,7 @@ kernel = {
|
||||
efi = kern/efi/acpi.c;
|
||||
efi = kern/efi/sb.c;
|
||||
efi = kern/lockdown.c;
|
||||
+ efi = lib/envblk.c;
|
||||
i386_coreboot = kern/i386/pc/acpi.c;
|
||||
i386_multiboot = kern/i386/pc/acpi.c;
|
||||
i386_coreboot = kern/acpi.c;
|
||||
diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c
|
||||
index 3dfdf2d..71d2279 100644
|
||||
index 7facacf09c7..6d39bd3ad29 100644
|
||||
--- a/grub-core/kern/efi/init.c
|
||||
+++ b/grub-core/kern/efi/init.c
|
||||
@@ -25,9 +25,40 @@
|
||||
@@ -27,8 +27,11 @@
|
||||
#include <grub/env.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/kernel.h>
|
||||
+
|
||||
#include <grub/stack_protector.h>
|
||||
|
||||
+#include <grub/lib/envblk.h>
|
||||
+
|
||||
#ifdef GRUB_STACK_PROTECTOR
|
||||
|
||||
static grub_efi_guid_t rng_protocol_guid = GRUB_EFI_RNG_PROTOCOL_GUID;
|
||||
@@ -82,6 +85,36 @@ stack_protector_init (void)
|
||||
|
||||
grub_addr_t grub_modbase;
|
||||
|
||||
@ -54,8 +62,8 @@ index 3dfdf2d..71d2279 100644
|
||||
+ struct grub_envblk envblk_s = { NULL, 0 };
|
||||
+ grub_envblk_t envblk = &envblk_s;
|
||||
+
|
||||
+ envblk_s.buf = grub_efi_get_variable ("GRUB_ENV", &efi_grub_guid,
|
||||
+ &envblk_s.size);
|
||||
+ grub_efi_get_variable ("GRUB_ENV", &efi_grub_guid, &envblk_s.size,
|
||||
+ (void **) &envblk_s.buf);
|
||||
+ if (!envblk_s.buf || envblk_s.size < 1)
|
||||
+ return;
|
||||
+
|
||||
@ -66,7 +74,7 @@ index 3dfdf2d..71d2279 100644
|
||||
void
|
||||
grub_efi_init (void)
|
||||
{
|
||||
@@ -42,10 +73,11 @@ grub_efi_init (void)
|
||||
@@ -108,10 +141,11 @@ grub_efi_init (void)
|
||||
efi_call_4 (grub_efi_system_table->boot_services->set_watchdog_timer,
|
||||
0, 0, 0, NULL);
|
||||
|
||||
@ -79,6 +87,3 @@ index 3dfdf2d..71d2279 100644
|
||||
char **device,
|
||||
char **path);
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
From 9851c77af2f615927719300b632f38d51d8f1d27 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 22 Jul 2015 11:21:01 -0400
|
||||
Subject: [PATCH 017/220] Mark po/exclude.pot as binary so git won't try to
|
||||
diff nonprintables.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
.gitattributes | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 .gitattributes
|
||||
|
||||
diff --git a/.gitattributes b/.gitattributes
|
||||
new file mode 100644
|
||||
index 0000000..33ffaa4
|
||||
--- /dev/null
|
||||
+++ b/.gitattributes
|
||||
@@ -0,0 +1 @@
|
||||
+po/exclude.pot binary
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
From b29012d97aac59ab69aff7806cb012d6270706e2 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Hamzy <hamzy@us.ibm.com>
|
||||
Date: Wed, 28 Mar 2012 14:46:41 -0500
|
||||
Subject: [PATCH 022/220] Migrate PPC from Yaboot to Grub2
|
||||
Subject: [PATCH] Migrate PPC from Yaboot to Grub2
|
||||
|
||||
Add configuration support for serial terminal consoles. This will set the
|
||||
maximum screen size so that text is not overwritten.
|
||||
Add configuration support for serial terminal consoles. This will set
|
||||
the maximum screen size so that text is not overwritten.
|
||||
|
||||
Signed-off-by: Mark Hamzy <hamzy@us.ibm.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
Makefile.util.def | 7 +++
|
||||
util/grub.d/20_ppc_terminfo.in | 114 +++++++++++++++++++++++++++++++++++++++++
|
||||
@ -12,26 +15,26 @@ maximum screen size so that text is not overwritten.
|
||||
create mode 100644 util/grub.d/20_ppc_terminfo.in
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 969d32f..8717774 100644
|
||||
index f8b356cc1fa..2c9b283a230 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -497,6 +497,13 @@ script = {
|
||||
@@ -508,6 +508,13 @@ script = {
|
||||
condition = COND_HOST_LINUX;
|
||||
};
|
||||
|
||||
script = {
|
||||
+script = {
|
||||
+ name = '20_ppc_terminfo';
|
||||
+ common = util/grub.d/20_ppc_terminfo.in;
|
||||
+ installdir = grubconf;
|
||||
+ condition = COND_HOST_LINUX;
|
||||
+};
|
||||
+
|
||||
+script = {
|
||||
script = {
|
||||
name = '30_os-prober';
|
||||
common = util/grub.d/30_os-prober.in;
|
||||
installdir = grubconf;
|
||||
diff --git a/util/grub.d/20_ppc_terminfo.in b/util/grub.d/20_ppc_terminfo.in
|
||||
new file mode 100644
|
||||
index 0000000..10d6658
|
||||
index 00000000000..10d66586820
|
||||
--- /dev/null
|
||||
+++ b/util/grub.d/20_ppc_terminfo.in
|
||||
@@ -0,0 +1,114 @@
|
||||
@ -149,6 +152,3 @@ index 0000000..10d6658
|
||||
+cat << EOF
|
||||
+ terminfo -g ${X}x${Y} ${TERMINAL}
|
||||
+EOF
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,23 +1,26 @@
|
||||
From 0a416bfa1cb5647bcba96513edf4f6c8b68c79ba Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Wed, 19 Sep 2012 21:22:55 -0300
|
||||
Subject: [PATCH 023/220] Add fw_path variable (revised)
|
||||
Subject: [PATCH] Add fw_path variable (revised)
|
||||
|
||||
This patch makes grub look for its config file on efi where the app was
|
||||
found. It was originally written by Matthew Garrett, and adapted to fix the
|
||||
"No modules are loaded on grub2 network boot" issue:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=857936
|
||||
|
||||
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/kern/main.c | 13 ++++++-------
|
||||
grub-core/normal/main.c | 25 ++++++++++++++++++++++++-
|
||||
2 files changed, 30 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
||||
index 9cad0c4..8ab7794 100644
|
||||
index 73967e2f5b0..d1de9fa6873 100644
|
||||
--- a/grub-core/kern/main.c
|
||||
+++ b/grub-core/kern/main.c
|
||||
@@ -127,16 +127,15 @@ grub_set_prefix_and_root (void)
|
||||
@@ -128,16 +128,15 @@ grub_set_prefix_and_root (void)
|
||||
|
||||
grub_machine_get_bootlocation (&fwdevice, &fwpath);
|
||||
|
||||
@ -41,10 +44,10 @@ index 9cad0c4..8ab7794 100644
|
||||
}
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 222e239..394bfbe 100644
|
||||
index 70614de1565..62571e6dfcc 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -338,7 +338,30 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -339,7 +339,30 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
/* Guess the config filename. It is necessary to make CONFIG static,
|
||||
so that it won't get broken by longjmp. */
|
||||
char *config;
|
||||
@ -76,6 +79,3 @@ index 222e239..394bfbe 100644
|
||||
|
||||
prefix = grub_env_get ("prefix");
|
||||
if (prefix)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,143 +0,0 @@
|
||||
From 93dd0d49c319a8611cfe346c21706d2390cbf854 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Mon, 8 Jul 2019 14:10:58 +0200
|
||||
Subject: [PATCH 019/220] DHCP client ID and UUID options added.
|
||||
|
||||
---
|
||||
grub-core/net/bootp.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++-----
|
||||
include/grub/net.h | 2 ++
|
||||
2 files changed, 79 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
|
||||
index 04cfbb0..0e6e41a 100644
|
||||
--- a/grub-core/net/bootp.c
|
||||
+++ b/grub-core/net/bootp.c
|
||||
@@ -95,6 +95,49 @@ enum
|
||||
/* Max timeout when waiting for BOOTP/DHCP reply */
|
||||
#define GRUB_DHCP_MAX_PACKET_TIMEOUT 32
|
||||
|
||||
+static char *
|
||||
+grub_env_write_readonly (struct grub_env_var *var __attribute__ ((unused)),
|
||||
+ const char *val __attribute__ ((unused)))
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+set_env_limn_ro (const char *intername, const char *suffix,
|
||||
+ const char *value, grub_size_t len)
|
||||
+{
|
||||
+ char *varname, *varvalue;
|
||||
+ char *ptr;
|
||||
+ varname = grub_xasprintf ("net_%s_%s", intername, suffix);
|
||||
+ if (!varname)
|
||||
+ return;
|
||||
+ for (ptr = varname; *ptr; ptr++)
|
||||
+ if (*ptr == ':')
|
||||
+ *ptr = '_';
|
||||
+ varvalue = grub_malloc (len + 1);
|
||||
+ if (!varvalue)
|
||||
+ {
|
||||
+ grub_free (varname);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ grub_memcpy (varvalue, value, len);
|
||||
+ varvalue[len] = 0;
|
||||
+ grub_env_set (varname, varvalue);
|
||||
+ grub_register_variable_hook (varname, 0, grub_env_write_readonly);
|
||||
+ grub_env_export (varname);
|
||||
+ grub_free (varname);
|
||||
+ grub_free (varvalue);
|
||||
+}
|
||||
+
|
||||
+static char
|
||||
+hexdigit (grub_uint8_t val)
|
||||
+{
|
||||
+ if (val < 10)
|
||||
+ return val + '0';
|
||||
+ return val + 'a' - 10;
|
||||
+}
|
||||
+
|
||||
static const void *
|
||||
find_dhcp_option (const struct grub_net_bootp_packet *bp, grub_size_t size,
|
||||
grub_uint8_t opt_code, grub_uint8_t *opt_len)
|
||||
@@ -152,6 +195,9 @@ again:
|
||||
if (i + taglength >= size)
|
||||
return NULL;
|
||||
|
||||
+ grub_dprintf("net", "DHCP option %u (0x%02x) found with length %u.\n",
|
||||
+ tagtype, tagtype, taglength);
|
||||
+
|
||||
/* FIXME RFC 3396 options concatentation */
|
||||
if (tagtype == opt_code)
|
||||
{
|
||||
@@ -354,6 +400,37 @@ grub_net_configure_by_dhcp_ack (const char *name,
|
||||
}
|
||||
grub_net_add_ipv4_local (inter, mask);
|
||||
|
||||
+ opt = find_dhcp_option (bp, size, GRUB_NET_BOOTP_CLIENT_ID, &opt_len);
|
||||
+ if (opt)
|
||||
+ {
|
||||
+ set_env_limn_ro (name, "clientid", (char *) opt, opt_len);
|
||||
+ }
|
||||
+
|
||||
+ opt = find_dhcp_option (bp, size, GRUB_NET_BOOTP_CLIENT_UUID, &opt_len);
|
||||
+ if (opt && opt_len == 17)
|
||||
+ {
|
||||
+ /* The format is 9cfe245e-d0c8-bd45-a79f-54ea5fbd3d97 */
|
||||
+
|
||||
+ opt += 1;
|
||||
+ opt_len -= 1;
|
||||
+
|
||||
+ char *val = grub_malloc (2 * opt_len + 4 + 1);
|
||||
+ int i = 0;
|
||||
+ int j = 0;
|
||||
+ for (i = 0; i < opt_len; i++)
|
||||
+ {
|
||||
+ val[2 * i + j] = hexdigit (opt[i] >> 4);
|
||||
+ val[2 * i + 1 + j] = hexdigit (opt[i] & 0xf);
|
||||
+
|
||||
+ if ((i == 3) || (i == 5) || (i == 7) || (i == 9))
|
||||
+ {
|
||||
+ j++;
|
||||
+ val[2 * i + 1+ j] = '-';
|
||||
+ }
|
||||
+ }
|
||||
+ set_env_limn_ro (name, "clientuuid", (char *) val, 2 * opt_len + 4);
|
||||
+ }
|
||||
+
|
||||
/* We do not implement dead gateway detection and the first entry SHOULD
|
||||
be preferred one */
|
||||
opt = find_dhcp_option (bp, size, GRUB_NET_BOOTP_ROUTER, &opt_len);
|
||||
@@ -631,14 +708,6 @@ grub_net_process_dhcp (struct grub_net_buff *nb,
|
||||
}
|
||||
}
|
||||
|
||||
-static char
|
||||
-hexdigit (grub_uint8_t val)
|
||||
-{
|
||||
- if (val < 10)
|
||||
- return val + '0';
|
||||
- return val + 'a' - 10;
|
||||
-}
|
||||
-
|
||||
static grub_err_t
|
||||
grub_cmd_dhcpopt (struct grub_command *cmd __attribute__ ((unused)),
|
||||
int argc, char **args)
|
||||
diff --git a/include/grub/net.h b/include/grub/net.h
|
||||
index 4a9069a..556c54e 100644
|
||||
--- a/include/grub/net.h
|
||||
+++ b/include/grub/net.h
|
||||
@@ -462,6 +462,8 @@ enum
|
||||
GRUB_NET_BOOTP_DOMAIN = 0x0f,
|
||||
GRUB_NET_BOOTP_ROOT_PATH = 0x11,
|
||||
GRUB_NET_BOOTP_EXTENSIONS_PATH = 0x12,
|
||||
+ GRUB_NET_BOOTP_CLIENT_ID = 0x3d,
|
||||
+ GRUB_NET_BOOTP_CLIENT_UUID = 0x61,
|
||||
GRUB_NET_DHCP_REQUESTED_IP_ADDRESS = 50,
|
||||
GRUB_NET_DHCP_OVERLOAD = 52,
|
||||
GRUB_NET_DHCP_MESSAGE_TYPE = 53,
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
From 07241ef86e2d39264a89c5a3d789cb0cc9f41c81 Mon Sep 17 00:00:00 2001
|
||||
From: Prarit Bhargava <prarit@redhat.com>
|
||||
Date: Wed, 12 Mar 2014 10:58:16 -0400
|
||||
Subject: [PATCH 020/220] Fix bad test on GRUB_DISABLE_SUBMENU.
|
||||
|
||||
The file /etc/grub.d/10_linux does
|
||||
|
||||
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
|
||||
|
||||
when it should do
|
||||
|
||||
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
|
||||
|
||||
which results in submenus in /boot/grub2/grub.cfg when
|
||||
GRUB_DISABLE_SUBMENU="yes".
|
||||
|
||||
Resolves: rhbz#1063414
|
||||
---
|
||||
util/grub.d/10_linux.in | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 4532266..58defdb 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -261,7 +261,11 @@ while [ "x$list" != "x" ] ; do
|
||||
fi
|
||||
fi
|
||||
|
||||
- if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
|
||||
+ if [ "x${GRUB_DISABLE_SUBMENU}" = "xyes" ] || [ "x${GRUB_DISABLE_SUBMENU}" = "xy" ]; then
|
||||
+ GRUB_DISABLE_SUBMENU="true"
|
||||
+ fi
|
||||
+
|
||||
+ if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
|
||||
linux_entry "${OS}" "${version}" simple \
|
||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,20 +1,22 @@
|
||||
From 98acf7f62203f6dda6e735743ce4e4f410d451e1 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 1 Oct 2012 13:24:37 -0400
|
||||
Subject: [PATCH 024/220] Pass "\x[[:hex:]][[:hex:]]" straight through
|
||||
unmolested.
|
||||
Subject: [PATCH] Pass "\x[[:hex:]][[:hex:]]" straight through unmolested.
|
||||
|
||||
Don't munge raw spaces when we're doing our cmdline escaping (#923374)
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/commands/wildcard.c | 16 +++++++++++++++-
|
||||
grub-core/lib/cmdline.c | 34 ++++++++++++++++++++++++++++++++--
|
||||
grub-core/lib/cmdline.c | 25 +++++++++++++++++++++++--
|
||||
grub-core/script/execute.c | 43 +++++++++++++++++++++++++++++++++++++------
|
||||
3 files changed, 84 insertions(+), 9 deletions(-)
|
||||
3 files changed, 75 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/grub-core/commands/wildcard.c b/grub-core/commands/wildcard.c
|
||||
index 4a106ca..560d437 100644
|
||||
index cc3290311f0..8f67a4be7f0 100644
|
||||
--- a/grub-core/commands/wildcard.c
|
||||
+++ b/grub-core/commands/wildcard.c
|
||||
@@ -462,6 +462,12 @@ check_file (const char *dir, const char *basename)
|
||||
@@ -488,6 +488,12 @@ check_file (const char *dir, const char *basename)
|
||||
return ctx.found;
|
||||
}
|
||||
|
||||
@ -27,7 +29,7 @@ index 4a106ca..560d437 100644
|
||||
static void
|
||||
unescape (char *out, const char *in, const char *end)
|
||||
{
|
||||
@@ -470,7 +476,15 @@ unescape (char *out, const char *in, const char *end)
|
||||
@@ -496,7 +502,15 @@ unescape (char *out, const char *in, const char *end)
|
||||
|
||||
for (optr = out, iptr = in; iptr < end;)
|
||||
{
|
||||
@ -45,7 +47,7 @@ index 4a106ca..560d437 100644
|
||||
*optr++ = iptr[1];
|
||||
iptr += 2;
|
||||
diff --git a/grub-core/lib/cmdline.c b/grub-core/lib/cmdline.c
|
||||
index ed0b149..e0fb0a9 100644
|
||||
index ed0b149dca5..8e2294d8ff6 100644
|
||||
--- a/grub-core/lib/cmdline.c
|
||||
+++ b/grub-core/lib/cmdline.c
|
||||
@@ -20,6 +20,12 @@
|
||||
@ -76,21 +78,12 @@ index ed0b149..e0fb0a9 100644
|
||||
size++;
|
||||
else if (*c == ' ')
|
||||
space = 1;
|
||||
@@ -86,7 +98,25 @@ grub_create_loader_cmdline (int argc, char *argv[], char *buf,
|
||||
@@ -86,7 +98,16 @@ grub_create_loader_cmdline (int argc, char *argv[], char *buf,
|
||||
|
||||
while (*c)
|
||||
{
|
||||
- if (*c == '\\' || *c == '\'' || *c == '"')
|
||||
+ if (*c == ' ')
|
||||
+ {
|
||||
+ *buf++ = '\\';
|
||||
+ *buf++ = 'x';
|
||||
+ *buf++ = '2';
|
||||
+ *buf++ = '0';
|
||||
+ c++;
|
||||
+ continue;
|
||||
+ }
|
||||
+ else if (*c == '\\' && *(c+1) == 'x' &&
|
||||
+ if (*c == '\\' && *(c+1) == 'x' &&
|
||||
+ is_hex(*(c+2)) && is_hex(*(c+3)))
|
||||
+ {
|
||||
+ *buf++ = *c++;
|
||||
@ -104,7 +97,7 @@ index ed0b149..e0fb0a9 100644
|
||||
|
||||
*buf++ = *c;
|
||||
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
|
||||
index 0d05d6b..ba38b5e 100644
|
||||
index ad80399246a..0c6dd9c5201 100644
|
||||
--- a/grub-core/script/execute.c
|
||||
+++ b/grub-core/script/execute.c
|
||||
@@ -56,6 +56,12 @@ static struct grub_script_scope *scope = 0;
|
||||
@ -178,6 +171,3 @@ index 0d05d6b..ba38b5e 100644
|
||||
break;
|
||||
case '$':
|
||||
if (escaped)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
From bfa8c75e6921c3584538c7ecef354f7136133af3 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Wed, 12 Jun 2013 11:51:49 -0400
|
||||
Subject: [PATCH 021/220] Add support for UEFI operating systems returned by
|
||||
os-prober
|
||||
|
||||
os-prober returns UEFI operating systems in the form:
|
||||
|
||||
path:long-name:name
|
||||
|
||||
where path is the path under the EFI directory on the ESP. This is in
|
||||
contrast to legacy OSes, where path is the device string. Handle this case.
|
||||
---
|
||||
util/grub.d/30_os-prober.in | 21 ++++++++++++++++++---
|
||||
1 file changed, 18 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
||||
index 515a68c..9b8f596 100644
|
||||
--- a/util/grub.d/30_os-prober.in
|
||||
+++ b/util/grub.d/30_os-prober.in
|
||||
@@ -328,8 +328,23 @@ EOF
|
||||
EOF
|
||||
;;
|
||||
*)
|
||||
- # TRANSLATORS: %s is replaced by OS name.
|
||||
- gettext_printf "%s is not yet supported by grub-mkconfig.\n" " ${LONGNAME}" >&2
|
||||
- ;;
|
||||
+ case ${DEVICE} in
|
||||
+ *.efi)
|
||||
+ cat << EOF
|
||||
+menuentry '$(echo "${LONGNAME}" | grub_quote)' {
|
||||
+EOF
|
||||
+ save_default_entry | grub_add_tab
|
||||
+ cat << EOF
|
||||
+ chainloader /EFI/${DEVICE}
|
||||
+ boot
|
||||
+}
|
||||
+EOF
|
||||
+ ;;
|
||||
+ *)
|
||||
+ echo -n " "
|
||||
+ # TRANSLATORS: %s is replaced by OS name.
|
||||
+ gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2
|
||||
+ ;;
|
||||
+ esac
|
||||
esac
|
||||
done
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
From 6f68e870cac4b87ef7caf2bd305de9ffa1907791 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 22 Jan 2013 06:31:38 +0100
|
||||
Subject: [PATCH 027/220] blscfg: add blscfg module to parse Boot Loader
|
||||
Specification snippets
|
||||
Subject: [PATCH] blscfg: add blscfg module to parse Boot Loader Specification
|
||||
snippets
|
||||
|
||||
The BootLoaderSpec (BLS) defines a scheme where different bootloaders can
|
||||
share a format for boot items and a configuration directory that accepts
|
||||
@ -14,27 +14,28 @@ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Signed-off-by: Will Thompson <wjt@endlessm.com>
|
||||
---
|
||||
grub-core/Makefile.core.def | 11 +
|
||||
grub-core/commands/blscfg.c | 1096 ++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/commands/blscfg.c | 1177 ++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/commands/legacycfg.c | 5 +-
|
||||
grub-core/commands/loadenv.c | 77 +--
|
||||
grub-core/commands/loadenv.h | 93 ++++
|
||||
grub-core/commands/menuentry.c | 20 +-
|
||||
grub-core/normal/main.c | 6 +
|
||||
grub-core/commands/loadenv.h | 93 ++++
|
||||
include/grub/compiler.h | 2 +
|
||||
include/grub/menu.h | 13 +
|
||||
include/grub/normal.h | 2 +-
|
||||
10 files changed, 1243 insertions(+), 82 deletions(-)
|
||||
10 files changed, 1324 insertions(+), 82 deletions(-)
|
||||
create mode 100644 grub-core/commands/blscfg.c
|
||||
create mode 100644 grub-core/commands/loadenv.h
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 41b5e16..57e253a 100644
|
||||
index c865a08b027..c15e91943b9 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -812,6 +812,16 @@ module = {
|
||||
@@ -814,6 +814,16 @@ module = {
|
||||
common = commands/blocklist.c;
|
||||
};
|
||||
|
||||
module = {
|
||||
+module = {
|
||||
+ name = blscfg;
|
||||
+ common = commands/blscfg.c;
|
||||
+ common = commands/loadenv.h;
|
||||
@ -44,11 +45,10 @@ index 41b5e16..57e253a 100644
|
||||
+ enable = emu;
|
||||
+};
|
||||
+
|
||||
+module = {
|
||||
module = {
|
||||
name = boot;
|
||||
common = commands/boot.c;
|
||||
i386_pc = lib/i386/pc/biosnum.c;
|
||||
@@ -988,6 +998,7 @@ module = {
|
||||
@@ -980,6 +990,7 @@ module = {
|
||||
module = {
|
||||
name = loadenv;
|
||||
common = commands/loadenv.c;
|
||||
@ -58,10 +58,10 @@ index 41b5e16..57e253a 100644
|
||||
|
||||
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
|
||||
new file mode 100644
|
||||
index 0000000..54458b1
|
||||
index 00000000000..e907a6a5d28
|
||||
--- /dev/null
|
||||
+++ b/grub-core/commands/blscfg.c
|
||||
@@ -0,0 +1,1096 @@
|
||||
@@ -0,0 +1,1177 @@
|
||||
+/*-*- Mode: C; c-basic-offset: 2; indent-tabs-mode: t -*-*/
|
||||
+
|
||||
+/* bls.c - implementation of the boot loader spec */
|
||||
@ -227,8 +227,8 @@ index 0000000..54458b1
|
||||
+
|
||||
+ /* loop through each version segment of str1 and str2 and compare them */
|
||||
+ while (*one || *two) {
|
||||
+ while (*one && !grub_isalnum(*one) && *one != '~') one++;
|
||||
+ while (*two && !grub_isalnum(*two) && *two != '~') two++;
|
||||
+ while (*one && !grub_isalnum(*one) && *one != '~' && *one != '+') one++;
|
||||
+ while (*two && !grub_isalnum(*two) && *two != '~' && *two != '+') two++;
|
||||
+
|
||||
+ /* handle the tilde separator, it sorts before everything else */
|
||||
+ if (*one == '~' || *two == '~') {
|
||||
@ -239,6 +239,21 @@ index 0000000..54458b1
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Handle plus separator. Concept is the same as tilde,
|
||||
+ * except that if one of the strings ends (base version),
|
||||
+ * the other is considered as higher version.
|
||||
+ */
|
||||
+ if (*one == '+' || *two == '+') {
|
||||
+ if (!*one) return -1;
|
||||
+ if (!*two) return 1;
|
||||
+ if (*one != '+') goto_return (1);
|
||||
+ if (*two != '+') goto_return (-1);
|
||||
+ one++;
|
||||
+ two++;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ /* If we ran to the end of either, we are finished with the loop */
|
||||
+ if (!(*one && *two)) break;
|
||||
+
|
||||
@ -649,43 +664,52 @@ index 0000000..54458b1
|
||||
+ list[nlist] = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (!nlist)
|
||||
+ {
|
||||
+ grub_free (list);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (num)
|
||||
+ *num = nlist;
|
||||
+
|
||||
+ return list;
|
||||
+}
|
||||
+
|
||||
+static char *field_append(bool is_var, char *buffer, char *start, char *end)
|
||||
+static char *field_append(bool is_var, char *buffer, const char *start, const char *end)
|
||||
+{
|
||||
+ char *temp = grub_strndup(start, end - start + 1);
|
||||
+ const char *field = temp;
|
||||
+ char *tmp = grub_strndup(start, end - start + 1);
|
||||
+ const char *field = tmp;
|
||||
+ int term = is_var ? 2 : 1;
|
||||
+
|
||||
+ if (is_var) {
|
||||
+ field = grub_env_get (temp);
|
||||
+ field = grub_env_get (tmp);
|
||||
+ if (!field)
|
||||
+ return buffer;
|
||||
+ }
|
||||
+
|
||||
+ if (!buffer) {
|
||||
+ buffer = grub_strdup(field);
|
||||
+ if (!buffer)
|
||||
+ return NULL;
|
||||
+ } else {
|
||||
+ buffer = grub_realloc (buffer, grub_strlen(buffer) + grub_strlen(field));
|
||||
+ if (!buffer)
|
||||
+ return NULL;
|
||||
+ if (!buffer)
|
||||
+ buffer = grub_zalloc (grub_strlen(field) + term);
|
||||
+ else
|
||||
+ buffer = grub_realloc (buffer, grub_strlen(buffer) + grub_strlen(field) + term);
|
||||
+
|
||||
+ grub_stpcpy (buffer + grub_strlen(buffer), field);
|
||||
+ }
|
||||
+ if (!buffer)
|
||||
+ return NULL;
|
||||
+
|
||||
+ tmp = buffer + grub_strlen(buffer);
|
||||
+ tmp = grub_stpcpy (tmp, field);
|
||||
+
|
||||
+ if (is_var)
|
||||
+ tmp = grub_stpcpy (tmp, " ");
|
||||
+
|
||||
+ return buffer;
|
||||
+}
|
||||
+
|
||||
+static char *expand_val(char *value)
|
||||
+static char *expand_val(const char *value)
|
||||
+{
|
||||
+ char *buffer = NULL;
|
||||
+ char *start = value;
|
||||
+ char *end = value;
|
||||
+ const char *start = value;
|
||||
+ const char *end = value;
|
||||
+ bool is_var = false;
|
||||
+
|
||||
+ if (!value)
|
||||
@ -706,6 +730,8 @@ index 0000000..54458b1
|
||||
+ buffer = field_append(is_var, buffer, start, end);
|
||||
+ is_var = false;
|
||||
+ start = value;
|
||||
+ if (*start == ' ')
|
||||
+ start++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@ -762,6 +788,8 @@ index 0000000..54458b1
|
||||
+ const char *early_initrd = NULL;
|
||||
+ char **early_initrds = NULL;
|
||||
+ char *initrd_prefix = NULL;
|
||||
+ char *devicetree = NULL;
|
||||
+ char *dt = NULL;
|
||||
+ char *id = entry->filename;
|
||||
+ char *dotconf = id;
|
||||
+ char *hotkey = NULL;
|
||||
@ -773,6 +801,7 @@ index 0000000..54458b1
|
||||
+
|
||||
+ char *src = NULL;
|
||||
+ int i, index;
|
||||
+ bool add_dt_prefix = false;
|
||||
+
|
||||
+ grub_dprintf("blscfg", "%s got here\n", __func__);
|
||||
+ clinux = bls_get_val (entry, "linux", NULL);
|
||||
@ -800,6 +829,14 @@ index 0000000..54458b1
|
||||
+
|
||||
+ initrds = bls_make_list (entry, "initrd", NULL);
|
||||
+
|
||||
+ devicetree = expand_val (bls_get_val (entry, "devicetree", NULL));
|
||||
+
|
||||
+ if (!devicetree)
|
||||
+ {
|
||||
+ devicetree = expand_val (grub_env_get("devicetree"));
|
||||
+ add_dt_prefix = true;
|
||||
+ }
|
||||
+
|
||||
+ hotkey = bls_get_val (entry, "grub_hotkey", NULL);
|
||||
+ users = expand_val (bls_get_val (entry, "grub_users", NULL));
|
||||
+ classes = bls_make_list (entry, "grub_class", NULL);
|
||||
@ -865,7 +902,6 @@ index 0000000..54458b1
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ tmp = grub_stpcpy(initrd, "initrd");
|
||||
+ for (i = 0; early_initrds != NULL && early_initrds[i] != NULL; i++)
|
||||
+ {
|
||||
@ -885,21 +921,68 @@ index 0000000..54458b1
|
||||
+ tmp = grub_stpcpy (tmp, "\n");
|
||||
+ }
|
||||
+
|
||||
+ src = grub_xasprintf ("load_video\n"
|
||||
+ if (devicetree)
|
||||
+ {
|
||||
+ char *prefix = NULL;
|
||||
+ int dt_size;
|
||||
+
|
||||
+ if (add_dt_prefix)
|
||||
+ {
|
||||
+ prefix = grub_strrchr (clinux, '/');
|
||||
+ prefix = grub_strndup(clinux, prefix - clinux + 1);
|
||||
+ if (!prefix)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
+ goto finish;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ dt_size = sizeof("devicetree " GRUB_BOOT_DEVICE) + grub_strlen(devicetree) + 1;
|
||||
+
|
||||
+ if (add_dt_prefix)
|
||||
+ {
|
||||
+ dt_size += grub_strlen(prefix);
|
||||
+ }
|
||||
+
|
||||
+ dt = grub_malloc (dt_size);
|
||||
+ if (!dt)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
+ goto finish;
|
||||
+ }
|
||||
+ char *tmp = dt;
|
||||
+ tmp = grub_stpcpy (dt, "devicetree");
|
||||
+ tmp = grub_stpcpy (tmp, " " GRUB_BOOT_DEVICE);
|
||||
+ if (add_dt_prefix)
|
||||
+ tmp = grub_stpcpy (tmp, prefix);
|
||||
+ tmp = grub_stpcpy (tmp, devicetree);
|
||||
+ tmp = grub_stpcpy (tmp, "\n");
|
||||
+
|
||||
+ grub_free(prefix);
|
||||
+ }
|
||||
+
|
||||
+ grub_dprintf ("blscfg2", "devicetree %s for id:\"%s\"\n", dt, id);
|
||||
+
|
||||
+ const char *sdval = grub_env_get("save_default");
|
||||
+ bool savedefault = ((NULL != sdval) && (grub_strcmp(sdval, "true") == 0));
|
||||
+ src = grub_xasprintf ("%sload_video\n"
|
||||
+ "set gfxpayload=keep\n"
|
||||
+ "insmod gzio\n"
|
||||
+ "linux %s%s%s%s\n"
|
||||
+ "%s",
|
||||
+ "%s%s",
|
||||
+ savedefault ? "savedefault\n" : "",
|
||||
+ GRUB_BOOT_DEVICE, clinux, options ? " " : "", options ? options : "",
|
||||
+ initrd ? initrd : "");
|
||||
+ initrd ? initrd : "", dt ? dt : "");
|
||||
+
|
||||
+ grub_normal_add_menu_entry (argc, argv, classes, id, users, hotkey, NULL, src, 0, &index, entry);
|
||||
+ grub_dprintf ("blscfg", "Added entry %d id:\"%s\"\n", index, id);
|
||||
+
|
||||
+finish:
|
||||
+ grub_free (dt);
|
||||
+ grub_free (initrd);
|
||||
+ grub_free (initrd_prefix);
|
||||
+ grub_free (early_initrds);
|
||||
+ grub_free (devicetree);
|
||||
+ grub_free (initrds);
|
||||
+ grub_free (options);
|
||||
+ grub_free (classes);
|
||||
@ -1009,14 +1092,12 @@ index 0000000..54458b1
|
||||
+ if (!devid) {
|
||||
+#ifdef GRUB_MACHINE_EMU
|
||||
+ devid = "host";
|
||||
+#elif defined(GRUB_MACHINE_EFI)
|
||||
+ devid = grub_env_get ("root");
|
||||
+#else
|
||||
+ devid = grub_env_get ("boot");
|
||||
+ devid = grub_env_get ("root");
|
||||
+#endif
|
||||
+ if (!devid)
|
||||
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND,
|
||||
+ N_("variable `%s' isn't set"), "boot");
|
||||
+ N_("variable `%s' isn't set"), "root");
|
||||
+ }
|
||||
+
|
||||
+ grub_dprintf ("blscfg", "opening %s\n", devid);
|
||||
@ -1159,10 +1240,10 @@ index 0000000..54458b1
|
||||
+ grub_unregister_extcmd (oldcmd);
|
||||
+}
|
||||
diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c
|
||||
index db7a8f0..891eac5 100644
|
||||
index cc5971f4dbd..782761c31aa 100644
|
||||
--- a/grub-core/commands/legacycfg.c
|
||||
+++ b/grub-core/commands/legacycfg.c
|
||||
@@ -133,7 +133,7 @@ legacy_file (const char *filename)
|
||||
@@ -143,7 +143,7 @@ legacy_file (const char *filename)
|
||||
args[0] = oldname;
|
||||
grub_normal_add_menu_entry (1, args, NULL, NULL, "legacy",
|
||||
NULL, NULL,
|
||||
@ -1171,7 +1252,7 @@ index db7a8f0..891eac5 100644
|
||||
grub_free (args);
|
||||
entrysrc[0] = 0;
|
||||
grub_free (oldname);
|
||||
@@ -186,7 +186,8 @@ legacy_file (const char *filename)
|
||||
@@ -205,7 +205,8 @@ legacy_file (const char *filename)
|
||||
}
|
||||
args[0] = entryname;
|
||||
grub_normal_add_menu_entry (1, args, NULL, NULL, NULL,
|
||||
@ -1182,7 +1263,7 @@ index db7a8f0..891eac5 100644
|
||||
}
|
||||
|
||||
diff --git a/grub-core/commands/loadenv.c b/grub-core/commands/loadenv.c
|
||||
index 3fd664a..163b9a0 100644
|
||||
index 3fd664aac33..163b9a09042 100644
|
||||
--- a/grub-core/commands/loadenv.c
|
||||
+++ b/grub-core/commands/loadenv.c
|
||||
@@ -28,6 +28,8 @@
|
||||
@ -1276,9 +1357,105 @@ index 3fd664a..163b9a0 100644
|
||||
static grub_err_t
|
||||
grub_cmd_load_env (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
diff --git a/grub-core/commands/menuentry.c b/grub-core/commands/menuentry.c
|
||||
index 720e6d8ea3b..b194123eb67 100644
|
||||
--- a/grub-core/commands/menuentry.c
|
||||
+++ b/grub-core/commands/menuentry.c
|
||||
@@ -78,7 +78,7 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
||||
char **classes, const char *id,
|
||||
const char *users, const char *hotkey,
|
||||
const char *prefix, const char *sourcecode,
|
||||
- int submenu)
|
||||
+ int submenu, int *index, struct bls_entry *bls)
|
||||
{
|
||||
int menu_hotkey = 0;
|
||||
char **menu_args = NULL;
|
||||
@@ -149,9 +149,12 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
||||
if (! menu_title)
|
||||
goto fail;
|
||||
|
||||
+ grub_dprintf ("menu", "id:\"%s\"\n", id);
|
||||
+ grub_dprintf ("menu", "title:\"%s\"\n", menu_title);
|
||||
menu_id = grub_strdup (id ? : menu_title);
|
||||
if (! menu_id)
|
||||
goto fail;
|
||||
+ grub_dprintf ("menu", "menu_id:\"%s\"\n", menu_id);
|
||||
|
||||
/* Save argc, args to pass as parameters to block arg later. */
|
||||
menu_args = grub_calloc (argc + 1, sizeof (char *));
|
||||
@@ -170,8 +173,12 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
||||
}
|
||||
|
||||
/* Add the menu entry at the end of the list. */
|
||||
+ int ind=0;
|
||||
while (*last)
|
||||
- last = &(*last)->next;
|
||||
+ {
|
||||
+ ind++;
|
||||
+ last = &(*last)->next;
|
||||
+ }
|
||||
|
||||
*last = grub_zalloc (sizeof (**last));
|
||||
if (! *last)
|
||||
@@ -188,8 +195,11 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
||||
(*last)->args = menu_args;
|
||||
(*last)->sourcecode = menu_sourcecode;
|
||||
(*last)->submenu = submenu;
|
||||
+ (*last)->bls = bls;
|
||||
|
||||
menu->size++;
|
||||
+ if (index)
|
||||
+ *index = ind;
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
fail:
|
||||
@@ -286,7 +296,8 @@ grub_cmd_menuentry (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
users,
|
||||
ctxt->state[2].arg, 0,
|
||||
ctxt->state[3].arg,
|
||||
- ctxt->extcmd->cmd->name[0] == 's');
|
||||
+ ctxt->extcmd->cmd->name[0] == 's',
|
||||
+ NULL, NULL);
|
||||
|
||||
src = args[argc - 1];
|
||||
args[argc - 1] = NULL;
|
||||
@@ -303,7 +314,8 @@ grub_cmd_menuentry (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
ctxt->state[0].args, ctxt->state[4].arg,
|
||||
users,
|
||||
ctxt->state[2].arg, prefix, src + 1,
|
||||
- ctxt->extcmd->cmd->name[0] == 's');
|
||||
+ ctxt->extcmd->cmd->name[0] == 's', NULL,
|
||||
+ NULL);
|
||||
|
||||
src[len - 1] = ch;
|
||||
args[argc - 1] = src;
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 62571e6dfcc..7ca2e5400b1 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <grub/net.h>
|
||||
#include <grub/normal.h>
|
||||
#include <grub/dl.h>
|
||||
+#include <grub/menu.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/file.h>
|
||||
#include <grub/mm.h>
|
||||
@@ -70,6 +71,11 @@ grub_normal_free_menu (grub_menu_t menu)
|
||||
grub_free (entry->args);
|
||||
}
|
||||
|
||||
+ if (entry->bls)
|
||||
+ {
|
||||
+ entry->bls->visible = 0;
|
||||
+ }
|
||||
+
|
||||
grub_free ((void *) entry->id);
|
||||
grub_free ((void *) entry->users);
|
||||
grub_free ((void *) entry->title);
|
||||
diff --git a/grub-core/commands/loadenv.h b/grub-core/commands/loadenv.h
|
||||
new file mode 100644
|
||||
index 0000000..952f461
|
||||
index 00000000000..952f46121bd
|
||||
--- /dev/null
|
||||
+++ b/grub-core/commands/loadenv.h
|
||||
@@ -0,0 +1,93 @@
|
||||
@ -1375,115 +1552,19 @@ index 0000000..952f461
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/grub-core/commands/menuentry.c b/grub-core/commands/menuentry.c
|
||||
index 2c5363d..9faf2be 100644
|
||||
--- a/grub-core/commands/menuentry.c
|
||||
+++ b/grub-core/commands/menuentry.c
|
||||
@@ -78,7 +78,7 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
||||
char **classes, const char *id,
|
||||
const char *users, const char *hotkey,
|
||||
const char *prefix, const char *sourcecode,
|
||||
- int submenu)
|
||||
+ int submenu, int *index, struct bls_entry *bls)
|
||||
{
|
||||
int menu_hotkey = 0;
|
||||
char **menu_args = NULL;
|
||||
@@ -149,9 +149,12 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
||||
if (! menu_title)
|
||||
goto fail;
|
||||
|
||||
+ grub_dprintf ("menu", "id:\"%s\"\n", id);
|
||||
+ grub_dprintf ("menu", "title:\"%s\"\n", menu_title);
|
||||
menu_id = grub_strdup (id ? : menu_title);
|
||||
if (! menu_id)
|
||||
goto fail;
|
||||
+ grub_dprintf ("menu", "menu_id:\"%s\"\n", menu_id);
|
||||
|
||||
/* Save argc, args to pass as parameters to block arg later. */
|
||||
menu_args = grub_malloc (sizeof (char*) * (argc + 1));
|
||||
@@ -170,8 +173,12 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
||||
}
|
||||
|
||||
/* Add the menu entry at the end of the list. */
|
||||
+ int ind=0;
|
||||
while (*last)
|
||||
- last = &(*last)->next;
|
||||
+ {
|
||||
+ ind++;
|
||||
+ last = &(*last)->next;
|
||||
+ }
|
||||
|
||||
*last = grub_zalloc (sizeof (**last));
|
||||
if (! *last)
|
||||
@@ -188,8 +195,11 @@ grub_normal_add_menu_entry (int argc, const char **args,
|
||||
(*last)->args = menu_args;
|
||||
(*last)->sourcecode = menu_sourcecode;
|
||||
(*last)->submenu = submenu;
|
||||
+ (*last)->bls = bls;
|
||||
|
||||
menu->size++;
|
||||
+ if (index)
|
||||
+ *index = ind;
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
fail:
|
||||
@@ -286,7 +296,8 @@ grub_cmd_menuentry (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
users,
|
||||
ctxt->state[2].arg, 0,
|
||||
ctxt->state[3].arg,
|
||||
- ctxt->extcmd->cmd->name[0] == 's');
|
||||
+ ctxt->extcmd->cmd->name[0] == 's',
|
||||
+ NULL, NULL);
|
||||
|
||||
src = args[argc - 1];
|
||||
args[argc - 1] = NULL;
|
||||
@@ -303,7 +314,8 @@ grub_cmd_menuentry (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
ctxt->state[0].args, ctxt->state[4].arg,
|
||||
users,
|
||||
ctxt->state[2].arg, prefix, src + 1,
|
||||
- ctxt->extcmd->cmd->name[0] == 's');
|
||||
+ ctxt->extcmd->cmd->name[0] == 's', NULL,
|
||||
+ NULL);
|
||||
|
||||
src[len - 1] = ch;
|
||||
args[argc - 1] = src;
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 9ef9848..a326b19 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <grub/kernel.h>
|
||||
#include <grub/normal.h>
|
||||
#include <grub/dl.h>
|
||||
+#include <grub/menu.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/file.h>
|
||||
#include <grub/mm.h>
|
||||
@@ -70,6 +71,11 @@ grub_normal_free_menu (grub_menu_t menu)
|
||||
grub_free (entry->args);
|
||||
}
|
||||
|
||||
+ if (entry->bls)
|
||||
+ {
|
||||
+ entry->bls->visible = 0;
|
||||
+ }
|
||||
+
|
||||
grub_free ((void *) entry->id);
|
||||
grub_free ((void *) entry->users);
|
||||
grub_free ((void *) entry->title);
|
||||
diff --git a/include/grub/compiler.h b/include/grub/compiler.h
|
||||
index c9e1d7a..9859ff4 100644
|
||||
index 8f3be3ae706..ebafec68957 100644
|
||||
--- a/include/grub/compiler.h
|
||||
+++ b/include/grub/compiler.h
|
||||
@@ -48,4 +48,6 @@
|
||||
# define WARN_UNUSED_RESULT
|
||||
@@ -56,4 +56,6 @@
|
||||
# define CLANG_PREREQ(maj,min) 0
|
||||
#endif
|
||||
|
||||
+#define UNUSED __attribute__((__unused__))
|
||||
+
|
||||
#endif /* ! GRUB_COMPILER_HEADER */
|
||||
diff --git a/include/grub/menu.h b/include/grub/menu.h
|
||||
index ee2b5e9..0acdc2a 100644
|
||||
index ee2b5e91045..0acdc2aa6bf 100644
|
||||
--- a/include/grub/menu.h
|
||||
+++ b/include/grub/menu.h
|
||||
@@ -20,6 +20,16 @@
|
||||
@ -1514,7 +1595,7 @@ index ee2b5e9..0acdc2a 100644
|
||||
typedef struct grub_menu_entry *grub_menu_entry_t;
|
||||
|
||||
diff --git a/include/grub/normal.h b/include/grub/normal.h
|
||||
index 218cbab..8839ad8 100644
|
||||
index 218cbabccaf..8839ad85a19 100644
|
||||
--- a/include/grub/normal.h
|
||||
+++ b/include/grub/normal.h
|
||||
@@ -145,7 +145,7 @@ grub_normal_add_menu_entry (int argc, const char **args, char **classes,
|
||||
@ -1526,6 +1607,3 @@ index 218cbab..8839ad8 100644
|
||||
|
||||
grub_err_t
|
||||
grub_normal_set_password (const char *user, const char *password);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 5c649924a8e4d233f922c21408eeeaac5b30bc73 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 14 Jan 2014 13:12:23 -0500
|
||||
Subject: [PATCH 028/220] Add devicetree loading
|
||||
Subject: [PATCH] Add devicetree loading
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
|
||||
@ -20,10 +20,10 @@ Signed-off-by: David A. Marlin <dmarlin@redhat.com>
|
||||
2 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 9ecbcfb..c645351 100644
|
||||
index d3e879b8e5c..8ea2315ebc2 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -254,7 +254,8 @@ export GRUB_DEFAULT \
|
||||
@@ -248,7 +248,8 @@ export GRUB_DEFAULT \
|
||||
GRUB_ENABLE_CRYPTODISK \
|
||||
GRUB_BADRAM \
|
||||
GRUB_OS_PROBER_SKIP_LIST \
|
||||
@ -34,23 +34,23 @@ index 9ecbcfb..c645351 100644
|
||||
if test "x${grub_cfg}" != "x"; then
|
||||
rm -f "${grub_cfg}.new"
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 58defdb..dd31284 100644
|
||||
index e8b01c0d0c7..dc75a1c30bf 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -155,6 +155,13 @@ EOF
|
||||
@@ -153,6 +153,13 @@ EOF
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
echo '$(echo "$message" | grub_quote)'
|
||||
initrd $(echo $initrd_path)
|
||||
EOF
|
||||
fi
|
||||
+EOF
|
||||
+ fi
|
||||
+ if test -n "${fdt}" ; then
|
||||
+ message="$(gettext_printf "Loading fdt ...")"
|
||||
+ sed "s/^/$submenu_indentation/" << EOF
|
||||
+ echo '$(echo "$message" | grub_quote)'
|
||||
+ devicetree ${rel_dirname}/${fdt}
|
||||
+EOF
|
||||
+ fi
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
@@ -236,6 +243,14 @@ while [ "x$list" != "x" ] ; do
|
||||
gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
|
||||
fi
|
||||
@ -66,6 +66,3 @@ index 58defdb..dd31284 100644
|
||||
config=
|
||||
for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
|
||||
if test -e "${i}" ; then
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 29aa9344700bc787778391d6176c2b3b220838e6 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 28 Oct 2013 10:09:27 -0400
|
||||
Subject: [PATCH 038/220] Enable pager by default. (#985860)
|
||||
Subject: [PATCH] Enable pager by default. (#985860)
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
@ -9,7 +9,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
|
||||
index 93a9023..858b526 100644
|
||||
index 93a90233ead..858b526c925 100644
|
||||
--- a/util/grub.d/00_header.in
|
||||
+++ b/util/grub.d/00_header.in
|
||||
@@ -43,6 +43,8 @@ if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_
|
||||
@ -21,6 +21,3 @@ index 93a9023..858b526 100644
|
||||
if [ -s \$prefix/grubenv ]; then
|
||||
load_env
|
||||
fi
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From b2d841ee307560bbc0a3c4fe4a5516fb8e00dd65 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 14 Mar 2011 14:27:42 -0400
|
||||
Subject: [PATCH 040/220] Don't say "GNU/Linux" in generated menus.
|
||||
Subject: [PATCH] Don't say "GNU/Linux" in generated menus.
|
||||
|
||||
---
|
||||
util/grub.d/10_linux.in | 4 ++--
|
||||
@ -9,7 +9,7 @@ Subject: [PATCH 040/220] Don't say "GNU/Linux" in generated menus.
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index ceb413f..2b402d8 100644
|
||||
index dc75a1c30bf..4a499c53a61 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
@ -25,7 +25,7 @@ index ceb413f..2b402d8 100644
|
||||
fi
|
||||
|
||||
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
|
||||
index 96179ea..47e0d3f 100644
|
||||
index 3b1f4704921..ada20775a14 100644
|
||||
--- a/util/grub.d/20_linux_xen.in
|
||||
+++ b/util/grub.d/20_linux_xen.in
|
||||
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
@ -40,6 +40,3 @@ index 96179ea..47e0d3f 100644
|
||||
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
|
||||
fi
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
From dcfc32257387a45d41600d52f2393fee402b7271 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
||||
Date: Mon, 13 Jan 2014 21:50:59 -0500
|
||||
Subject: [PATCH 043/220] Add .eh_frame to list of relocations stripped
|
||||
Subject: [PATCH] Add .eh_frame to list of relocations stripped
|
||||
|
||||
---
|
||||
conf/Makefile.common | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/conf/Makefile.common b/conf/Makefile.common
|
||||
index 6cd71cb..4ba729e 100644
|
||||
index 2a1a886f6d5..191b1a70c6b 100644
|
||||
--- a/conf/Makefile.common
|
||||
+++ b/conf/Makefile.common
|
||||
@@ -38,7 +38,7 @@ CFLAGS_KERNEL = $(CFLAGS_PLATFORM) -ffreestanding
|
||||
@ -20,6 +20,3 @@ index 6cd71cb..4ba729e 100644
|
||||
|
||||
CFLAGS_MODULE = $(CFLAGS_PLATFORM) -ffreestanding
|
||||
LDFLAGS_MODULE = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r,-d
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
From 29e1ec69b76c2e5d95cf339e60461f22cb0aeed6 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Tue, 27 Nov 2012 16:58:39 -0200
|
||||
Subject: [PATCH 025/220] Add %X option to printf functions.
|
||||
|
||||
---
|
||||
grub-core/kern/misc.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
|
||||
index cd63a8c..2656a67 100644
|
||||
--- a/grub-core/kern/misc.c
|
||||
+++ b/grub-core/kern/misc.c
|
||||
@@ -588,7 +588,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r)
|
||||
static inline char *
|
||||
grub_lltoa (char *str, int c, unsigned long long n)
|
||||
{
|
||||
- unsigned base = (c == 'x') ? 16 : 10;
|
||||
+ unsigned base = ((c == 'x') || (c == 'X')) ? 16 : 10;
|
||||
char *p;
|
||||
|
||||
if ((long long) n < 0 && c == 'd')
|
||||
@@ -603,7 +603,7 @@ grub_lltoa (char *str, int c, unsigned long long n)
|
||||
do
|
||||
{
|
||||
unsigned d = (unsigned) (n & 0xf);
|
||||
- *p++ = (d > 9) ? d + 'a' - 10 : d + '0';
|
||||
+ *p++ = (d > 9) ? d + ((c == 'x') ? 'a' : 'A') - 10 : d + '0';
|
||||
}
|
||||
while (n >>= 4);
|
||||
else
|
||||
@@ -676,6 +676,7 @@ parse_printf_args (const char *fmt0, struct printf_args *args,
|
||||
{
|
||||
case 'p':
|
||||
case 'x':
|
||||
+ case 'X':
|
||||
case 'u':
|
||||
case 'd':
|
||||
case 'c':
|
||||
@@ -762,6 +763,7 @@ parse_printf_args (const char *fmt0, struct printf_args *args,
|
||||
switch (c)
|
||||
{
|
||||
case 'x':
|
||||
+ case 'X':
|
||||
case 'u':
|
||||
args->ptr[curn].type = UNSIGNED_INT + longfmt;
|
||||
break;
|
||||
@@ -900,6 +902,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0,
|
||||
c = 'x';
|
||||
/* Fall through. */
|
||||
case 'x':
|
||||
+ case 'X':
|
||||
case 'u':
|
||||
case 'd':
|
||||
{
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 226cdd8a7722f5e1a60f21c5a2aea74f458d612d Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 11 Feb 2014 11:14:50 -0500
|
||||
Subject: [PATCH 045/220] Don't require a password to boot entries generated by
|
||||
Subject: [PATCH] Don't require a password to boot entries generated by
|
||||
grub-mkconfig.
|
||||
|
||||
When we set a password, we just want that to mean you can't /edit/ an entry.
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 2b402d8..d35b0f4 100644
|
||||
index 4a499c53a61..cf8d1186981 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -26,7 +26,7 @@ datarootdir="@datarootdir@"
|
||||
@ -26,6 +26,3 @@ index 2b402d8..d35b0f4 100644
|
||||
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
OS="$(sed 's, release .*$,,g' /etc/system-release)"
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,203 +0,0 @@
|
||||
From 0b390eb5dbd310c6c1a92e001b35981c90f27565 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Tue, 27 Nov 2012 17:22:07 -0200
|
||||
Subject: [PATCH 026/220] Search for specific config file for netboot
|
||||
|
||||
This patch implements a search for a specific configuration when the config
|
||||
file is on a remoteserver. It uses the following order:
|
||||
1) DHCP client UUID option.
|
||||
2) MAC address (in lower case hexadecimal with dash separators);
|
||||
3) IP (in upper case hexadecimal) or IPv6;
|
||||
4) The original grub.cfg file.
|
||||
|
||||
This procedure is similar to what is used by pxelinux and yaboot:
|
||||
http://www.syslinux.org/wiki/index.php/PXELINUX#config
|
||||
|
||||
This should close the bugzilla:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=873406
|
||||
---
|
||||
grub-core/net/net.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/normal/main.c | 18 ++++++--
|
||||
include/grub/net.h | 3 ++
|
||||
3 files changed, 135 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
|
||||
index d5d726a..0645456 100644
|
||||
--- a/grub-core/net/net.c
|
||||
+++ b/grub-core/net/net.c
|
||||
@@ -1735,6 +1735,124 @@ grub_net_restore_hw (void)
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
+grub_err_t
|
||||
+grub_net_search_configfile (char *config)
|
||||
+{
|
||||
+ grub_size_t config_len;
|
||||
+ char *suffix;
|
||||
+
|
||||
+ auto int search_through (grub_size_t num_tries, grub_size_t slice_size);
|
||||
+ int search_through (grub_size_t num_tries, grub_size_t slice_size)
|
||||
+ {
|
||||
+ while (num_tries-- > 0)
|
||||
+ {
|
||||
+ grub_dprintf ("net", "probe %s\n", config);
|
||||
+
|
||||
+ grub_file_t file;
|
||||
+ file = grub_file_open (config, GRUB_FILE_TYPE_CONFIG);
|
||||
+
|
||||
+ if (file)
|
||||
+ {
|
||||
+ grub_file_close (file);
|
||||
+ grub_dprintf ("net", "found!\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (grub_errno == GRUB_ERR_IO)
|
||||
+ grub_errno = GRUB_ERR_NONE;
|
||||
+ }
|
||||
+
|
||||
+ if (grub_strlen (suffix) < slice_size)
|
||||
+ break;
|
||||
+
|
||||
+ config[grub_strlen (config) - slice_size] = '\0';
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ config_len = grub_strlen (config);
|
||||
+ config[config_len] = '-';
|
||||
+ suffix = config + config_len + 1;
|
||||
+
|
||||
+ struct grub_net_network_level_interface *inf;
|
||||
+ FOR_NET_NETWORK_LEVEL_INTERFACES (inf)
|
||||
+ {
|
||||
+ /* By the Client UUID. */
|
||||
+
|
||||
+ char client_uuid_var[sizeof ("net_") + grub_strlen (inf->name) +
|
||||
+ sizeof ("_clientuuid") + 1];
|
||||
+ grub_snprintf (client_uuid_var, sizeof (client_uuid_var),
|
||||
+ "net_%s_clientuuid", inf->name);
|
||||
+
|
||||
+ const char *client_uuid;
|
||||
+ client_uuid = grub_env_get (client_uuid_var);
|
||||
+
|
||||
+ if (client_uuid)
|
||||
+ {
|
||||
+ grub_strcpy (suffix, client_uuid);
|
||||
+ if (search_through (1, 0) == 0) return GRUB_ERR_NONE;
|
||||
+ }
|
||||
+
|
||||
+ /* By the MAC address. */
|
||||
+
|
||||
+ /* Add ethernet type */
|
||||
+ grub_strcpy (suffix, "01-");
|
||||
+
|
||||
+ grub_net_hwaddr_to_str (&inf->hwaddress, suffix + 3);
|
||||
+
|
||||
+ char *ptr;
|
||||
+ for (ptr = suffix; *ptr; ptr++)
|
||||
+ if (*ptr == ':')
|
||||
+ *ptr = '-';
|
||||
+
|
||||
+ if (search_through (1, 0) == 0) return GRUB_ERR_NONE;
|
||||
+
|
||||
+ /* By IP address */
|
||||
+
|
||||
+ switch ((&inf->address)->type)
|
||||
+ {
|
||||
+ case GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4:
|
||||
+ {
|
||||
+ grub_uint32_t n = grub_be_to_cpu32 ((&inf->address)->ipv4);
|
||||
+ grub_snprintf (suffix, GRUB_NET_MAX_STR_ADDR_LEN, "%02X%02X%02X%02X", \
|
||||
+ ((n >> 24) & 0xff), ((n >> 16) & 0xff), \
|
||||
+ ((n >> 8) & 0xff), ((n >> 0) & 0xff));
|
||||
+
|
||||
+ if (search_through (8, 1) == 0) return GRUB_ERR_NONE;
|
||||
+ break;
|
||||
+ }
|
||||
+ case GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6:
|
||||
+ {
|
||||
+ char buf[GRUB_NET_MAX_STR_ADDR_LEN];
|
||||
+ struct grub_net_network_level_address base;
|
||||
+ base.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6;
|
||||
+ grub_memcpy (&base.ipv6, ((&inf->address)->ipv6), 16);
|
||||
+ grub_net_addr_to_str (&base, buf);
|
||||
+
|
||||
+ for (ptr = buf; *ptr; ptr++)
|
||||
+ if (*ptr == ':')
|
||||
+ *ptr = '-';
|
||||
+
|
||||
+ grub_snprintf (suffix, GRUB_NET_MAX_STR_ADDR_LEN, "%s", buf);
|
||||
+ if (search_through (1, 0) == 0) return GRUB_ERR_NONE;
|
||||
+ break;
|
||||
+ }
|
||||
+ case GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV:
|
||||
+ return grub_error (GRUB_ERR_BUG, "shouldn't reach here");
|
||||
+ default:
|
||||
+ return grub_error (GRUB_ERR_BUG,
|
||||
+ "unsupported address type %d", (&inf->address)->type);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Remove the remaining minus sign at the end. */
|
||||
+ config[config_len] = '\0';
|
||||
+
|
||||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
static struct grub_preboot *fini_hnd;
|
||||
|
||||
static grub_command_t cmd_addaddr, cmd_deladdr, cmd_addroute, cmd_delroute;
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 394bfbe..9ef9848 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <grub/charset.h>
|
||||
#include <grub/script_sh.h>
|
||||
#include <grub/bufio.h>
|
||||
+#include <grub/net.h>
|
||||
#ifdef GRUB_MACHINE_IEEE1275
|
||||
#include <grub/ieee1275/ieee1275.h>
|
||||
#endif
|
||||
@@ -365,10 +366,19 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
|
||||
prefix = grub_env_get ("prefix");
|
||||
if (prefix)
|
||||
- {
|
||||
- config = grub_xasprintf ("%s/grub.cfg", prefix);
|
||||
- if (! config)
|
||||
- goto quit;
|
||||
+ {
|
||||
+ grub_size_t config_len;
|
||||
+ config_len = grub_strlen (prefix) +
|
||||
+ sizeof ("/grub.cfg-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
|
||||
+ config = grub_malloc (config_len);
|
||||
+
|
||||
+ if (! config)
|
||||
+ goto quit;
|
||||
+
|
||||
+ grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
+
|
||||
+ if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0)
|
||||
+ grub_net_search_configfile (config);
|
||||
|
||||
grub_enter_normal_mode (config);
|
||||
grub_free (config);
|
||||
diff --git a/include/grub/net.h b/include/grub/net.h
|
||||
index 556c54e..ff6d347 100644
|
||||
--- a/include/grub/net.h
|
||||
+++ b/include/grub/net.h
|
||||
@@ -578,4 +578,7 @@ extern char *grub_net_default_server;
|
||||
|
||||
#define VLANTAG_IDENTIFIER 0x8100
|
||||
|
||||
+grub_err_t
|
||||
+grub_net_search_configfile (char *config);
|
||||
+
|
||||
#endif /* ! GRUB_NET_HEADER */
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
From 4e27eb84b310a600b89481245735a7b053f2250c Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 4 Mar 2014 11:00:23 -0500
|
||||
Subject: [PATCH 047/220] Replace a lot of man pages with slightly nicer ones.
|
||||
Subject: [PATCH] Replace a lot of man pages with slightly nicer ones.
|
||||
|
||||
Replace a bunch of machine generated ones with ones that look nicer.
|
||||
---
|
||||
conf/Makefile.extra-dist | 1 -
|
||||
configure.ac | 23 ++++++
|
||||
conf/Makefile.extra-dist | 1 -
|
||||
docs/Makefile.am | 2 -
|
||||
docs/man/grub-bios-setup.h2m | 6 --
|
||||
docs/man/grub-editenv.h2m | 5 --
|
||||
@ -44,7 +44,7 @@ Replace a bunch of machine generated ones with ones that look nicer.
|
||||
util/grub-file.1 | 165 ++++++++++++++++++++++++++++++++++++++
|
||||
util/grub-fstest.1 | 99 +++++++++++++++++++++++
|
||||
util/grub-glue-efi.1 | 31 +++++++
|
||||
util/grub-install.8 | 129 +++++++++++++++++++++++++++++
|
||||
util/grub-install.8 | 128 +++++++++++++++++++++++++++++
|
||||
util/grub-kbdcomp.1 | 19 +++++
|
||||
util/grub-macbless.1 | 22 +++++
|
||||
util/grub-menulst2cfg.1 | 12 +++
|
||||
@ -64,7 +64,7 @@ Replace a bunch of machine generated ones with ones that look nicer.
|
||||
util/grub-script-check.1 | 21 +++++
|
||||
util/grub-set-default.8 | 21 +++++
|
||||
util/grub-sparc64-setup.8 | 12 +++
|
||||
59 files changed, 1319 insertions(+), 147 deletions(-)
|
||||
59 files changed, 1318 insertions(+), 147 deletions(-)
|
||||
delete mode 100644 docs/man/grub-bios-setup.h2m
|
||||
delete mode 100644 docs/man/grub-editenv.h2m
|
||||
delete mode 100644 docs/man/grub-emu.h2m
|
||||
@ -121,23 +121,11 @@ Replace a bunch of machine generated ones with ones that look nicer.
|
||||
create mode 100644 util/grub-set-default.8
|
||||
create mode 100644 util/grub-sparc64-setup.8
|
||||
|
||||
diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
|
||||
index 46c4e95..58d7d95 100644
|
||||
--- a/conf/Makefile.extra-dist
|
||||
+++ b/conf/Makefile.extra-dist
|
||||
@@ -11,7 +11,6 @@ EXTRA_DIST += unicode
|
||||
EXTRA_DIST += util/import_gcry.py
|
||||
EXTRA_DIST += util/import_unicode.py
|
||||
|
||||
-EXTRA_DIST += docs/man
|
||||
EXTRA_DIST += docs/autoiso.cfg
|
||||
EXTRA_DIST += docs/grub.cfg
|
||||
EXTRA_DIST += docs/osdetect.cfg
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d283af6..8df400e 100644
|
||||
index 8331f95b645..bec8535af70 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -74,6 +74,29 @@ grub_TRANSFORM([grub-set-default])
|
||||
@@ -77,6 +77,29 @@ grub_TRANSFORM([grub-set-default])
|
||||
grub_TRANSFORM([grub-sparc64-setup])
|
||||
grub_TRANSFORM([grub-render-label])
|
||||
grub_TRANSFORM([grub-file])
|
||||
@ -167,8 +155,20 @@ index d283af6..8df400e 100644
|
||||
|
||||
# Optimization flag. Allow user to override.
|
||||
if test "x$TARGET_CFLAGS" = x; then
|
||||
diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
|
||||
index 8f1485d52a5..b909f2c073a 100644
|
||||
--- a/conf/Makefile.extra-dist
|
||||
+++ b/conf/Makefile.extra-dist
|
||||
@@ -11,7 +11,6 @@ EXTRA_DIST += unicode
|
||||
EXTRA_DIST += util/import_gcry.py
|
||||
EXTRA_DIST += util/import_unicode.py
|
||||
|
||||
-EXTRA_DIST += docs/man
|
||||
EXTRA_DIST += docs/autoiso.cfg
|
||||
EXTRA_DIST += docs/grub.cfg
|
||||
EXTRA_DIST += docs/osdetect.cfg
|
||||
diff --git a/docs/Makefile.am b/docs/Makefile.am
|
||||
index 93eb396..ab28f19 100644
|
||||
index 93eb3962765..ab28f199694 100644
|
||||
--- a/docs/Makefile.am
|
||||
+++ b/docs/Makefile.am
|
||||
@@ -5,5 +5,3 @@ info_TEXINFOS = grub.texi grub-dev.texi
|
||||
@ -179,7 +179,7 @@ index 93eb396..ab28f19 100644
|
||||
-
|
||||
diff --git a/docs/man/grub-bios-setup.h2m b/docs/man/grub-bios-setup.h2m
|
||||
deleted file mode 100644
|
||||
index ac6ede3..0000000
|
||||
index ac6ede36296..00000000000
|
||||
--- a/docs/man/grub-bios-setup.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,6 +0,0 @@
|
||||
@ -191,7 +191,7 @@ index ac6ede3..0000000
|
||||
-.BR grub-mkrescue (1)
|
||||
diff --git a/docs/man/grub-editenv.h2m b/docs/man/grub-editenv.h2m
|
||||
deleted file mode 100644
|
||||
index 3859d3d..0000000
|
||||
index 3859d3d4c4f..00000000000
|
||||
--- a/docs/man/grub-editenv.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,5 +0,0 @@
|
||||
@ -202,7 +202,7 @@ index 3859d3d..0000000
|
||||
-.BR grub-set-default (8)
|
||||
diff --git a/docs/man/grub-emu.h2m b/docs/man/grub-emu.h2m
|
||||
deleted file mode 100644
|
||||
index ef1c000..0000000
|
||||
index ef1c000656a..00000000000
|
||||
--- a/docs/man/grub-emu.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,6 +0,0 @@
|
||||
@ -214,7 +214,7 @@ index ef1c000..0000000
|
||||
-rather than this program.
|
||||
diff --git a/docs/man/grub-file.h2m b/docs/man/grub-file.h2m
|
||||
deleted file mode 100644
|
||||
index e09bb4d..0000000
|
||||
index e09bb4d3101..00000000000
|
||||
--- a/docs/man/grub-file.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,2 +0,0 @@
|
||||
@ -222,7 +222,7 @@ index e09bb4d..0000000
|
||||
-grub-file \- check file type
|
||||
diff --git a/docs/man/grub-fstest.h2m b/docs/man/grub-fstest.h2m
|
||||
deleted file mode 100644
|
||||
index 9676b15..0000000
|
||||
index 9676b159afd..00000000000
|
||||
--- a/docs/man/grub-fstest.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -232,7 +232,7 @@ index 9676b15..0000000
|
||||
-.BR grub-probe (8)
|
||||
diff --git a/docs/man/grub-glue-efi.h2m b/docs/man/grub-glue-efi.h2m
|
||||
deleted file mode 100644
|
||||
index c1c6ded..0000000
|
||||
index c1c6ded49ff..00000000000
|
||||
--- a/docs/man/grub-glue-efi.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -242,7 +242,7 @@ index c1c6ded..0000000
|
||||
-grub-glue-efi processes ia32 and amd64 EFI images and glues them according to Apple format.
|
||||
diff --git a/docs/man/grub-install.h2m b/docs/man/grub-install.h2m
|
||||
deleted file mode 100644
|
||||
index 8cbbc87..0000000
|
||||
index 8cbbc87a0f2..00000000000
|
||||
--- a/docs/man/grub-install.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,6 +0,0 @@
|
||||
@ -254,7 +254,7 @@ index 8cbbc87..0000000
|
||||
-.BR grub-mkrescue (1)
|
||||
diff --git a/docs/man/grub-kbdcomp.h2m b/docs/man/grub-kbdcomp.h2m
|
||||
deleted file mode 100644
|
||||
index d81f915..0000000
|
||||
index d81f9157e01..00000000000
|
||||
--- a/docs/man/grub-kbdcomp.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
@ -270,7 +270,7 @@ index d81f915..0000000
|
||||
-.BR grub-mklayout (8)
|
||||
diff --git a/docs/man/grub-macbless.h2m b/docs/man/grub-macbless.h2m
|
||||
deleted file mode 100644
|
||||
index 0197c00..0000000
|
||||
index 0197c0087d7..00000000000
|
||||
--- a/docs/man/grub-macbless.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -280,7 +280,7 @@ index 0197c00..0000000
|
||||
-.BR grub-install (1)
|
||||
diff --git a/docs/man/grub-macho2img.h2m b/docs/man/grub-macho2img.h2m
|
||||
deleted file mode 100644
|
||||
index d79aaee..0000000
|
||||
index d79aaeed8f9..00000000000
|
||||
--- a/docs/man/grub-macho2img.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -290,7 +290,7 @@ index d79aaee..0000000
|
||||
-.BR grub-mkimage (1)
|
||||
diff --git a/docs/man/grub-menulst2cfg.h2m b/docs/man/grub-menulst2cfg.h2m
|
||||
deleted file mode 100644
|
||||
index c2e0055..0000000
|
||||
index c2e0055ed7e..00000000000
|
||||
--- a/docs/man/grub-menulst2cfg.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -300,7 +300,7 @@ index c2e0055..0000000
|
||||
-.BR grub-mkconfig (8)
|
||||
diff --git a/docs/man/grub-mkconfig.h2m b/docs/man/grub-mkconfig.h2m
|
||||
deleted file mode 100644
|
||||
index 9b42f81..0000000
|
||||
index 9b42f813010..00000000000
|
||||
--- a/docs/man/grub-mkconfig.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -310,7 +310,7 @@ index 9b42f81..0000000
|
||||
-.BR grub-install (8)
|
||||
diff --git a/docs/man/grub-mkfont.h2m b/docs/man/grub-mkfont.h2m
|
||||
deleted file mode 100644
|
||||
index d46fe60..0000000
|
||||
index d46fe600eca..00000000000
|
||||
--- a/docs/man/grub-mkfont.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -320,7 +320,7 @@ index d46fe60..0000000
|
||||
-.BR grub-mkconfig (8)
|
||||
diff --git a/docs/man/grub-mkimage.h2m b/docs/man/grub-mkimage.h2m
|
||||
deleted file mode 100644
|
||||
index f0fbc2b..0000000
|
||||
index f0fbc2bb197..00000000000
|
||||
--- a/docs/man/grub-mkimage.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,6 +0,0 @@
|
||||
@ -332,7 +332,7 @@ index f0fbc2b..0000000
|
||||
-.BR grub-mknetdir (8)
|
||||
diff --git a/docs/man/grub-mklayout.h2m b/docs/man/grub-mklayout.h2m
|
||||
deleted file mode 100644
|
||||
index 1e43409..0000000
|
||||
index 1e43409c0ab..00000000000
|
||||
--- a/docs/man/grub-mklayout.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
@ -348,7 +348,7 @@ index 1e43409..0000000
|
||||
-.BR grub-mkconfig (8)
|
||||
diff --git a/docs/man/grub-mknetdir.h2m b/docs/man/grub-mknetdir.h2m
|
||||
deleted file mode 100644
|
||||
index a2ef13e..0000000
|
||||
index a2ef13ec111..00000000000
|
||||
--- a/docs/man/grub-mknetdir.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -358,7 +358,7 @@ index a2ef13e..0000000
|
||||
-.BR grub-mkimage (1)
|
||||
diff --git a/docs/man/grub-mkpasswd-pbkdf2.h2m b/docs/man/grub-mkpasswd-pbkdf2.h2m
|
||||
deleted file mode 100644
|
||||
index 4d202f3..0000000
|
||||
index 4d202f3da7e..00000000000
|
||||
--- a/docs/man/grub-mkpasswd-pbkdf2.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -368,7 +368,7 @@ index 4d202f3..0000000
|
||||
-.BR grub-mkconfig (8)
|
||||
diff --git a/docs/man/grub-mkrelpath.h2m b/docs/man/grub-mkrelpath.h2m
|
||||
deleted file mode 100644
|
||||
index d01f396..0000000
|
||||
index d01f3961e3f..00000000000
|
||||
--- a/docs/man/grub-mkrelpath.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -378,7 +378,7 @@ index d01f396..0000000
|
||||
-.BR grub-probe (8)
|
||||
diff --git a/docs/man/grub-mkrescue.h2m b/docs/man/grub-mkrescue.h2m
|
||||
deleted file mode 100644
|
||||
index a427f02..0000000
|
||||
index a427f02e3c6..00000000000
|
||||
--- a/docs/man/grub-mkrescue.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -388,7 +388,7 @@ index a427f02..0000000
|
||||
-.BR grub-mkimage (1)
|
||||
diff --git a/docs/man/grub-mkstandalone.h2m b/docs/man/grub-mkstandalone.h2m
|
||||
deleted file mode 100644
|
||||
index c773139..0000000
|
||||
index c77313978ad..00000000000
|
||||
--- a/docs/man/grub-mkstandalone.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -398,7 +398,7 @@ index c773139..0000000
|
||||
-.BR grub-mkimage (1)
|
||||
diff --git a/docs/man/grub-mount.h2m b/docs/man/grub-mount.h2m
|
||||
deleted file mode 100644
|
||||
index 8d16898..0000000
|
||||
index 8d168982d72..00000000000
|
||||
--- a/docs/man/grub-mount.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,2 +0,0 @@
|
||||
@ -406,7 +406,7 @@ index 8d16898..0000000
|
||||
-grub-mount \- export GRUB filesystem with FUSE
|
||||
diff --git a/docs/man/grub-ofpathname.h2m b/docs/man/grub-ofpathname.h2m
|
||||
deleted file mode 100644
|
||||
index 74b43ee..0000000
|
||||
index 74b43eea039..00000000000
|
||||
--- a/docs/man/grub-ofpathname.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -416,7 +416,7 @@ index 74b43ee..0000000
|
||||
-.BR grub-probe (8)
|
||||
diff --git a/docs/man/grub-pe2elf.h2m b/docs/man/grub-pe2elf.h2m
|
||||
deleted file mode 100644
|
||||
index 7ca29bd..0000000
|
||||
index 7ca29bd703c..00000000000
|
||||
--- a/docs/man/grub-pe2elf.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -426,7 +426,7 @@ index 7ca29bd..0000000
|
||||
-.BR grub-mkimage (1)
|
||||
diff --git a/docs/man/grub-probe.h2m b/docs/man/grub-probe.h2m
|
||||
deleted file mode 100644
|
||||
index 6e1ffdc..0000000
|
||||
index 6e1ffdcf937..00000000000
|
||||
--- a/docs/man/grub-probe.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -436,7 +436,7 @@ index 6e1ffdc..0000000
|
||||
-.BR grub-fstest (1)
|
||||
diff --git a/docs/man/grub-reboot.h2m b/docs/man/grub-reboot.h2m
|
||||
deleted file mode 100644
|
||||
index e4acace..0000000
|
||||
index e4acace65ce..00000000000
|
||||
--- a/docs/man/grub-reboot.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,5 +0,0 @@
|
||||
@ -447,7 +447,7 @@ index e4acace..0000000
|
||||
-.BR grub-editenv (1)
|
||||
diff --git a/docs/man/grub-render-label.h2m b/docs/man/grub-render-label.h2m
|
||||
deleted file mode 100644
|
||||
index 50ae524..0000000
|
||||
index 50ae5247c05..00000000000
|
||||
--- a/docs/man/grub-render-label.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,3 +0,0 @@
|
||||
@ -456,7 +456,7 @@ index 50ae524..0000000
|
||||
-
|
||||
diff --git a/docs/man/grub-script-check.h2m b/docs/man/grub-script-check.h2m
|
||||
deleted file mode 100644
|
||||
index 3653682..0000000
|
||||
index 3653682671a..00000000000
|
||||
--- a/docs/man/grub-script-check.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -466,7 +466,7 @@ index 3653682..0000000
|
||||
-.BR grub-mkconfig (8)
|
||||
diff --git a/docs/man/grub-set-default.h2m b/docs/man/grub-set-default.h2m
|
||||
deleted file mode 100644
|
||||
index 7945001..0000000
|
||||
index 7945001c154..00000000000
|
||||
--- a/docs/man/grub-set-default.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,5 +0,0 @@
|
||||
@ -477,7 +477,7 @@ index 7945001..0000000
|
||||
-.BR grub-editenv (1)
|
||||
diff --git a/docs/man/grub-sparc64-setup.h2m b/docs/man/grub-sparc64-setup.h2m
|
||||
deleted file mode 100644
|
||||
index 18f803a..0000000
|
||||
index 18f803a50db..00000000000
|
||||
--- a/docs/man/grub-sparc64-setup.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,6 +0,0 @@
|
||||
@ -489,7 +489,7 @@ index 18f803a..0000000
|
||||
-.BR grub-mkrescue (1)
|
||||
diff --git a/docs/man/grub-syslinux2cfg.h2m b/docs/man/grub-syslinux2cfg.h2m
|
||||
deleted file mode 100644
|
||||
index ad25c8a..0000000
|
||||
index ad25c8ab753..00000000000
|
||||
--- a/docs/man/grub-syslinux2cfg.h2m
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
@ -498,7 +498,7 @@ index ad25c8a..0000000
|
||||
-[SEE ALSO]
|
||||
-.BR grub-menulst2cfg (8)
|
||||
diff --git a/gentpl.py b/gentpl.py
|
||||
index 387588c..f05812e 100644
|
||||
index c86550d4f9e..2cba0bbbd6f 100644
|
||||
--- a/gentpl.py
|
||||
+++ b/gentpl.py
|
||||
@@ -805,10 +805,7 @@ def manpage(defn, adddeps):
|
||||
@ -515,7 +515,7 @@ index 387588c..f05812e 100644
|
||||
|
||||
diff --git a/util/grub-bios-setup.8 b/util/grub-bios-setup.8
|
||||
new file mode 100644
|
||||
index 0000000..56f582b
|
||||
index 00000000000..56f582b3d75
|
||||
--- /dev/null
|
||||
+++ b/util/grub-bios-setup.8
|
||||
@@ -0,0 +1,54 @@
|
||||
@ -575,7 +575,7 @@ index 0000000..56f582b
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-editenv.1 b/util/grub-editenv.1
|
||||
new file mode 100644
|
||||
index 0000000..d28ba03
|
||||
index 00000000000..d28ba03ba42
|
||||
--- /dev/null
|
||||
+++ b/util/grub-editenv.1
|
||||
@@ -0,0 +1,46 @@
|
||||
@ -627,7 +627,7 @@ index 0000000..d28ba03
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-file.1 b/util/grub-file.1
|
||||
new file mode 100644
|
||||
index 0000000..b29cb32
|
||||
index 00000000000..b29cb327889
|
||||
--- /dev/null
|
||||
+++ b/util/grub-file.1
|
||||
@@ -0,0 +1,165 @@
|
||||
@ -798,7 +798,7 @@ index 0000000..b29cb32
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-fstest.1 b/util/grub-fstest.1
|
||||
new file mode 100644
|
||||
index 0000000..792fa78
|
||||
index 00000000000..792fa78634c
|
||||
--- /dev/null
|
||||
+++ b/util/grub-fstest.1
|
||||
@@ -0,0 +1,99 @@
|
||||
@ -903,7 +903,7 @@ index 0000000..792fa78
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-glue-efi.1 b/util/grub-glue-efi.1
|
||||
new file mode 100644
|
||||
index 0000000..72bd555
|
||||
index 00000000000..72bd555d577
|
||||
--- /dev/null
|
||||
+++ b/util/grub-glue-efi.1
|
||||
@@ -0,0 +1,31 @@
|
||||
@ -940,10 +940,10 @@ index 0000000..72bd555
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-install.8 b/util/grub-install.8
|
||||
new file mode 100644
|
||||
index 0000000..76272a3
|
||||
index 00000000000..1db89e94b3b
|
||||
--- /dev/null
|
||||
+++ b/util/grub-install.8
|
||||
@@ -0,0 +1,129 @@
|
||||
@@ -0,0 +1,128 @@
|
||||
+.TH GRUB-INSTALL 1 "Wed Feb 26 2014"
|
||||
+.SH NAME
|
||||
+\fBgrub-install\fR \(em Install GRUB on a device.
|
||||
@ -1060,12 +1060,11 @@ index 0000000..76272a3
|
||||
+
|
||||
+.TP
|
||||
+\fB--bootloader-id\fR=\fIID\fR
|
||||
+Use \fIID\fR as the bootloader ID. This opption is only available on the EFI target platform.
|
||||
+Use \fIID\fR as the bootloader ID. This option is only available on the EFI target platform.
|
||||
+
|
||||
+.TP
|
||||
+\fB--efi-directory\fR=\fIDIR\fR
|
||||
+Use \fIDIR\fR as the EFI System Partition root. This opption is only available on the EFI ta
|
||||
+rget platform.
|
||||
+Use \fIDIR\fR as the EFI System Partition root. This option is only available on the EFI target platform.
|
||||
+
|
||||
+.TP
|
||||
+\fIINSTALL_DEVICE\fR
|
||||
@ -1075,7 +1074,7 @@ index 0000000..76272a3
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-kbdcomp.1 b/util/grub-kbdcomp.1
|
||||
new file mode 100644
|
||||
index 0000000..0bb969a
|
||||
index 00000000000..0bb969a5b43
|
||||
--- /dev/null
|
||||
+++ b/util/grub-kbdcomp.1
|
||||
@@ -0,0 +1,19 @@
|
||||
@ -1100,7 +1099,7 @@ index 0000000..0bb969a
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-macbless.1 b/util/grub-macbless.1
|
||||
new file mode 100644
|
||||
index 0000000..41a9618
|
||||
index 00000000000..41a96186f70
|
||||
--- /dev/null
|
||||
+++ b/util/grub-macbless.1
|
||||
@@ -0,0 +1,22 @@
|
||||
@ -1128,7 +1127,7 @@ index 0000000..41a9618
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-menulst2cfg.1 b/util/grub-menulst2cfg.1
|
||||
new file mode 100644
|
||||
index 0000000..91e2ef8
|
||||
index 00000000000..91e2ef87113
|
||||
--- /dev/null
|
||||
+++ b/util/grub-menulst2cfg.1
|
||||
@@ -0,0 +1,12 @@
|
||||
@ -1146,7 +1145,7 @@ index 0000000..91e2ef8
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mkconfig.8 b/util/grub-mkconfig.8
|
||||
new file mode 100644
|
||||
index 0000000..a2d1f57
|
||||
index 00000000000..a2d1f577b9b
|
||||
--- /dev/null
|
||||
+++ b/util/grub-mkconfig.8
|
||||
@@ -0,0 +1,17 @@
|
||||
@ -1169,7 +1168,7 @@ index 0000000..a2d1f57
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mkfont.1 b/util/grub-mkfont.1
|
||||
new file mode 100644
|
||||
index 0000000..3494857
|
||||
index 00000000000..3494857987d
|
||||
--- /dev/null
|
||||
+++ b/util/grub-mkfont.1
|
||||
@@ -0,0 +1,87 @@
|
||||
@ -1262,7 +1261,7 @@ index 0000000..3494857
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mkimage.1 b/util/grub-mkimage.1
|
||||
new file mode 100644
|
||||
index 0000000..4dea4f5
|
||||
index 00000000000..4dea4f54597
|
||||
--- /dev/null
|
||||
+++ b/util/grub-mkimage.1
|
||||
@@ -0,0 +1,95 @@
|
||||
@ -1363,7 +1362,7 @@ index 0000000..4dea4f5
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mklayout.1 b/util/grub-mklayout.1
|
||||
new file mode 100644
|
||||
index 0000000..d1bbc2e
|
||||
index 00000000000..d1bbc2ec515
|
||||
--- /dev/null
|
||||
+++ b/util/grub-mklayout.1
|
||||
@@ -0,0 +1,27 @@
|
||||
@ -1396,7 +1395,7 @@ index 0000000..d1bbc2e
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mknetdir.1 b/util/grub-mknetdir.1
|
||||
new file mode 100644
|
||||
index 0000000..fa7e8d4
|
||||
index 00000000000..fa7e8d4ef0d
|
||||
--- /dev/null
|
||||
+++ b/util/grub-mknetdir.1
|
||||
@@ -0,0 +1,12 @@
|
||||
@ -1414,7 +1413,7 @@ index 0000000..fa7e8d4
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mkpasswd-pbkdf2.1 b/util/grub-mkpasswd-pbkdf2.1
|
||||
new file mode 100644
|
||||
index 0000000..73c437c
|
||||
index 00000000000..73c437c15d8
|
||||
--- /dev/null
|
||||
+++ b/util/grub-mkpasswd-pbkdf2.1
|
||||
@@ -0,0 +1,27 @@
|
||||
@ -1447,7 +1446,7 @@ index 0000000..73c437c
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mkrelpath.1 b/util/grub-mkrelpath.1
|
||||
new file mode 100644
|
||||
index 0000000..85f1113
|
||||
index 00000000000..85f1113621d
|
||||
--- /dev/null
|
||||
+++ b/util/grub-mkrelpath.1
|
||||
@@ -0,0 +1,12 @@
|
||||
@ -1465,7 +1464,7 @@ index 0000000..85f1113
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mkrescue.1 b/util/grub-mkrescue.1
|
||||
new file mode 100644
|
||||
index 0000000..4ed9fc7
|
||||
index 00000000000..4ed9fc723fd
|
||||
--- /dev/null
|
||||
+++ b/util/grub-mkrescue.1
|
||||
@@ -0,0 +1,123 @@
|
||||
@ -1594,7 +1593,7 @@ index 0000000..4ed9fc7
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mkstandalone.1 b/util/grub-mkstandalone.1
|
||||
new file mode 100644
|
||||
index 0000000..ba2d2bd
|
||||
index 00000000000..ba2d2bdf279
|
||||
--- /dev/null
|
||||
+++ b/util/grub-mkstandalone.1
|
||||
@@ -0,0 +1,100 @@
|
||||
@ -1700,7 +1699,7 @@ index 0000000..ba2d2bd
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-ofpathname.8 b/util/grub-ofpathname.8
|
||||
new file mode 100644
|
||||
index 0000000..bf3743a
|
||||
index 00000000000..bf3743aeba1
|
||||
--- /dev/null
|
||||
+++ b/util/grub-ofpathname.8
|
||||
@@ -0,0 +1,12 @@
|
||||
@ -1718,7 +1717,7 @@ index 0000000..bf3743a
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-probe.8 b/util/grub-probe.8
|
||||
new file mode 100644
|
||||
index 0000000..04e26c8
|
||||
index 00000000000..04e26c832bb
|
||||
--- /dev/null
|
||||
+++ b/util/grub-probe.8
|
||||
@@ -0,0 +1,80 @@
|
||||
@ -1804,7 +1803,7 @@ index 0000000..04e26c8
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-reboot.8 b/util/grub-reboot.8
|
||||
new file mode 100644
|
||||
index 0000000..faa5e4e
|
||||
index 00000000000..faa5e4eece2
|
||||
--- /dev/null
|
||||
+++ b/util/grub-reboot.8
|
||||
@@ -0,0 +1,21 @@
|
||||
@ -1831,7 +1830,7 @@ index 0000000..faa5e4e
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-render-label.1 b/util/grub-render-label.1
|
||||
new file mode 100644
|
||||
index 0000000..4d51c8a
|
||||
index 00000000000..4d51c8abf01
|
||||
--- /dev/null
|
||||
+++ b/util/grub-render-label.1
|
||||
@@ -0,0 +1,51 @@
|
||||
@ -1888,7 +1887,7 @@ index 0000000..4d51c8a
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-script-check.1 b/util/grub-script-check.1
|
||||
new file mode 100644
|
||||
index 0000000..0f1f625
|
||||
index 00000000000..0f1f625b05d
|
||||
--- /dev/null
|
||||
+++ b/util/grub-script-check.1
|
||||
@@ -0,0 +1,21 @@
|
||||
@ -1915,7 +1914,7 @@ index 0000000..0f1f625
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-set-default.8 b/util/grub-set-default.8
|
||||
new file mode 100644
|
||||
index 0000000..a96265a
|
||||
index 00000000000..a96265a1509
|
||||
--- /dev/null
|
||||
+++ b/util/grub-set-default.8
|
||||
@@ -0,0 +1,21 @@
|
||||
@ -1942,7 +1941,7 @@ index 0000000..a96265a
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-sparc64-setup.8 b/util/grub-sparc64-setup.8
|
||||
new file mode 100644
|
||||
index 0000000..37ea2dd
|
||||
index 00000000000..37ea2dd5eaa
|
||||
--- /dev/null
|
||||
+++ b/util/grub-sparc64-setup.8
|
||||
@@ -0,0 +1,12 @@
|
||||
@ -1958,6 +1957,3 @@ index 0000000..37ea2dd
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.BR "info grub"
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
From 612e9b3820efe48896ba9faf320e4f042d053dc2 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
||||
Date: Wed, 19 Feb 2014 15:58:43 -0500
|
||||
Subject: [PATCH 048/220] use fw_path prefix when fallback searching for grub
|
||||
config
|
||||
Subject: [PATCH] use fw_path prefix when fallback searching for grub config
|
||||
|
||||
When PXE booting via UEFI firmware, grub was searching for grub.cfg
|
||||
in the fw_path directory where the grub application was found. If
|
||||
@ -18,10 +17,10 @@ Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 7f61c5b..8add30e 100644
|
||||
index 7ca2e5400b1..02577502116 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -349,7 +349,7 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -347,7 +347,7 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
char *config;
|
||||
const char *prefix, *fw_path;
|
||||
|
||||
@ -30,7 +29,7 @@ index 7f61c5b..8add30e 100644
|
||||
if (fw_path)
|
||||
{
|
||||
config = grub_xasprintf ("%s/grub.cfg", fw_path);
|
||||
@@ -372,7 +372,8 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -370,7 +370,8 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,6 +39,3 @@ index 7f61c5b..8add30e 100644
|
||||
if (prefix)
|
||||
{
|
||||
grub_size_t config_len;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,179 +0,0 @@
|
||||
From 88cba3a10617ef55989762a4195599a399dca957 Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Wed, 15 May 2013 13:30:20 -0400
|
||||
Subject: [PATCH 029/220] Don't write messages to the screen
|
||||
|
||||
Writing messages to the screen before the menus or boot splash
|
||||
happens so quickly it looks like something is wrong and isn't
|
||||
very appealing.
|
||||
---
|
||||
grub-core/boot/i386/pc/boot.S | 3 ---
|
||||
grub-core/boot/i386/pc/diskboot.S | 5 -----
|
||||
grub-core/gettext/gettext.c | 25 +++++--------------------
|
||||
grub-core/kern/main.c | 5 -----
|
||||
util/grub.d/10_linux.in | 7 -------
|
||||
5 files changed, 5 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
|
||||
index 2bd0b2d..ea167fe 100644
|
||||
--- a/grub-core/boot/i386/pc/boot.S
|
||||
+++ b/grub-core/boot/i386/pc/boot.S
|
||||
@@ -249,9 +249,6 @@ real_start:
|
||||
/* save drive reference first thing! */
|
||||
pushw %dx
|
||||
|
||||
- /* print a notification message on the screen */
|
||||
- MSG(notification_string)
|
||||
-
|
||||
/* set %si to the disk address packet */
|
||||
movw $disk_address_packet, %si
|
||||
|
||||
diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
|
||||
index c1addc0..68d31de 100644
|
||||
--- a/grub-core/boot/i386/pc/diskboot.S
|
||||
+++ b/grub-core/boot/i386/pc/diskboot.S
|
||||
@@ -50,11 +50,6 @@ _start:
|
||||
/* save drive reference first thing! */
|
||||
pushw %dx
|
||||
|
||||
- /* print a notification message on the screen */
|
||||
- pushw %si
|
||||
- MSG(notification_string)
|
||||
- popw %si
|
||||
-
|
||||
/* this sets up for the first run through "bootloop" */
|
||||
movw $LOCAL(firstlist), %di
|
||||
|
||||
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
|
||||
index 4d02e62..84d520c 100644
|
||||
--- a/grub-core/gettext/gettext.c
|
||||
+++ b/grub-core/gettext/gettext.c
|
||||
@@ -434,16 +434,12 @@ static char *
|
||||
grub_gettext_env_write_lang (struct grub_env_var *var
|
||||
__attribute__ ((unused)), const char *val)
|
||||
{
|
||||
- grub_err_t err;
|
||||
+ grub_err_t __attribute__((__unused__)) err;
|
||||
err = grub_gettext_init_ext (&main_context, val, grub_env_get ("locale_dir"),
|
||||
grub_env_get ("prefix"));
|
||||
- if (err)
|
||||
- grub_print_error ();
|
||||
|
||||
err = grub_gettext_init_ext (&secondary_context, val,
|
||||
grub_env_get ("secondary_locale_dir"), 0);
|
||||
- if (err)
|
||||
- grub_print_error ();
|
||||
|
||||
return grub_strdup (val);
|
||||
}
|
||||
@@ -451,23 +447,19 @@ grub_gettext_env_write_lang (struct grub_env_var *var
|
||||
void
|
||||
grub_gettext_reread_prefix (const char *val)
|
||||
{
|
||||
- grub_err_t err;
|
||||
+ grub_err_t __attribute__((__unused__)) err;
|
||||
err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"),
|
||||
grub_env_get ("locale_dir"),
|
||||
val);
|
||||
- if (err)
|
||||
- grub_print_error ();
|
||||
}
|
||||
|
||||
static char *
|
||||
read_main (struct grub_env_var *var
|
||||
__attribute__ ((unused)), const char *val)
|
||||
{
|
||||
- grub_err_t err;
|
||||
+ grub_err_t __attribute__((__unused__)) err;
|
||||
err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), val,
|
||||
grub_env_get ("prefix"));
|
||||
- if (err)
|
||||
- grub_print_error ();
|
||||
return grub_strdup (val);
|
||||
}
|
||||
|
||||
@@ -475,12 +467,9 @@ static char *
|
||||
read_secondary (struct grub_env_var *var
|
||||
__attribute__ ((unused)), const char *val)
|
||||
{
|
||||
- grub_err_t err;
|
||||
+ grub_err_t __attribute__((__unused__)) err;
|
||||
err = grub_gettext_init_ext (&secondary_context, grub_env_get ("lang"), val,
|
||||
0);
|
||||
- if (err)
|
||||
- grub_print_error ();
|
||||
-
|
||||
return grub_strdup (val);
|
||||
}
|
||||
|
||||
@@ -500,18 +489,14 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
|
||||
GRUB_MOD_INIT (gettext)
|
||||
{
|
||||
const char *lang;
|
||||
- grub_err_t err;
|
||||
+ grub_err_t __attribute__((__unused__)) err;
|
||||
|
||||
lang = grub_env_get ("lang");
|
||||
|
||||
err = grub_gettext_init_ext (&main_context, lang, grub_env_get ("locale_dir"),
|
||||
grub_env_get ("prefix"));
|
||||
- if (err)
|
||||
- grub_print_error ();
|
||||
err = grub_gettext_init_ext (&secondary_context, lang,
|
||||
grub_env_get ("secondary_locale_dir"), 0);
|
||||
- if (err)
|
||||
- grub_print_error ();
|
||||
|
||||
grub_register_variable_hook ("locale_dir", NULL, read_main);
|
||||
grub_register_variable_hook ("secondary_locale_dir", NULL, read_secondary);
|
||||
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
||||
index 8ab7794..da47b18 100644
|
||||
--- a/grub-core/kern/main.c
|
||||
+++ b/grub-core/kern/main.c
|
||||
@@ -268,11 +268,6 @@ grub_main (void)
|
||||
|
||||
grub_boot_time ("After machine init.");
|
||||
|
||||
- /* Hello. */
|
||||
- grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
|
||||
- grub_printf ("Welcome to GRUB!\n\n");
|
||||
- grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
||||
-
|
||||
grub_load_config ();
|
||||
|
||||
grub_boot_time ("Before loading embedded modules.");
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index dd31284..ceb413f 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -138,27 +138,20 @@ linux_entry ()
|
||||
fi
|
||||
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
|
||||
fi
|
||||
- message="$(gettext_printf "Loading Linux %s ..." ${version})"
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
- echo '$(echo "$message" | grub_quote)'
|
||||
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
||||
EOF
|
||||
if test -n "${initrd}" ; then
|
||||
- # TRANSLATORS: ramdisk isn't identifier. Should be translated.
|
||||
- message="$(gettext_printf "Loading initial ramdisk ...")"
|
||||
initrd_path=
|
||||
for i in ${initrd}; do
|
||||
initrd_path="${initrd_path} ${rel_dirname}/${i}"
|
||||
done
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
- echo '$(echo "$message" | grub_quote)'
|
||||
initrd $(echo $initrd_path)
|
||||
EOF
|
||||
fi
|
||||
if test -n "${fdt}" ; then
|
||||
- message="$(gettext_printf "Loading fdt ...")"
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
- echo '$(echo "$message" | grub_quote)'
|
||||
devicetree ${rel_dirname}/${fdt}
|
||||
EOF
|
||||
fi
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,19 +1,18 @@
|
||||
From 03c186bcadb3cae7a86d1674de33c6a2b8d81089 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2019 17:33:22 +0200
|
||||
Subject: [PATCH 049/220] Try mac/guid/etc before grub.cfg on tftp config
|
||||
files.
|
||||
Subject: [PATCH] Try mac/guid/etc before grub.cfg on tftp config files.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/normal/main.c | 80 ++++++++++++++++++++++++++-----------------------
|
||||
1 file changed, 43 insertions(+), 37 deletions(-)
|
||||
grub-core/normal/main.c | 97 ++++++++++++++++++++++++++-----------------------
|
||||
1 file changed, 51 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 8add30e..d93bee6 100644
|
||||
index 02577502116..880d0ebd454 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -347,53 +347,59 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -345,61 +345,66 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
/* Guess the config filename. It is necessary to make CONFIG static,
|
||||
so that it won't get broken by longjmp. */
|
||||
char *config;
|
||||
@ -42,39 +41,55 @@ index 8add30e..d93bee6 100644
|
||||
- }
|
||||
- }
|
||||
+ const char *prefix;
|
||||
+ const char *net_search_cfg;
|
||||
+ int disable_net_search = 0;
|
||||
|
||||
+ prefix = grub_env_get ("fw_path");
|
||||
if (! prefix)
|
||||
prefix = grub_env_get ("prefix");
|
||||
+
|
||||
+ net_search_cfg = grub_env_get ("feature_net_search_cfg");
|
||||
+ if (net_search_cfg && net_search_cfg[0] == 'n')
|
||||
+ disable_net_search = 1;
|
||||
+
|
||||
if (prefix)
|
||||
{
|
||||
- grub_size_t config_len;
|
||||
- int disable_net_search = 0;
|
||||
- const char *net_search_cfg;
|
||||
-
|
||||
- config_len = grub_strlen (prefix) +
|
||||
- sizeof ("/grub.cfg-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
|
||||
- sizeof ("/grub.cfg-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
|
||||
- config = grub_malloc (config_len);
|
||||
+ if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0)
|
||||
-
|
||||
- if (!config)
|
||||
- goto quit;
|
||||
-
|
||||
- grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
-
|
||||
- net_search_cfg = grub_env_get ("feature_net_search_cfg");
|
||||
- if (net_search_cfg && net_search_cfg[0] == 'n')
|
||||
- disable_net_search = 1;
|
||||
-
|
||||
if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0 &&
|
||||
!disable_net_search)
|
||||
- grub_net_search_config_file (config);
|
||||
+ {
|
||||
+ grub_size_t config_len;
|
||||
+ config_len = grub_strlen (prefix) +
|
||||
+ sizeof ("/grub.cfg-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
|
||||
+ config = grub_malloc (config_len);
|
||||
|
||||
- if (! config)
|
||||
- goto quit;
|
||||
+ if (! config)
|
||||
+ goto quit;
|
||||
|
||||
- grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
+ grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
|
||||
- if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0)
|
||||
- grub_net_search_configfile (config);
|
||||
+ grub_net_search_configfile (config);
|
||||
|
||||
- grub_enter_normal_mode (config);
|
||||
- grub_free (config);
|
||||
- }
|
||||
+ if (! config)
|
||||
+ goto quit;
|
||||
+
|
||||
+ grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
+
|
||||
+ grub_net_search_configfile (config);
|
||||
+
|
||||
+ grub_enter_normal_mode (config);
|
||||
+ grub_free (config);
|
||||
+ config = NULL;
|
||||
@ -110,6 +125,3 @@ index 8add30e..d93bee6 100644
|
||||
}
|
||||
else
|
||||
grub_enter_normal_mode (argv[0]);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
From 9af19d1f8184aad31b3094768a64722316d4f0da Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Wed, 15 May 2013 13:53:48 -0400
|
||||
Subject: [PATCH 030/220] Don't print GNU GRUB header
|
||||
|
||||
No one cares.
|
||||
---
|
||||
grub-core/normal/main.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index a326b19..09d0dfe 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -208,15 +208,16 @@ read_config_file (const char *config)
|
||||
/* Initialize the screen. */
|
||||
void
|
||||
grub_normal_init_page (struct grub_term_output *term,
|
||||
- int y)
|
||||
+ int y __attribute__((__unused__)))
|
||||
{
|
||||
+ grub_term_cls (term);
|
||||
+
|
||||
+#if 0
|
||||
grub_ssize_t msg_len;
|
||||
int posx;
|
||||
char *msg_formatted;
|
||||
grub_uint32_t *unicode_msg;
|
||||
grub_uint32_t *last_position;
|
||||
-
|
||||
- grub_term_cls (term);
|
||||
|
||||
msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION);
|
||||
if (!msg_formatted)
|
||||
@@ -241,6 +242,7 @@ grub_normal_init_page (struct grub_term_output *term,
|
||||
grub_putcode ('\n', term);
|
||||
grub_putcode ('\n', term);
|
||||
grub_free (unicode_msg);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
From 708e24f2d6ffadfa2d1b6638538ddc03a82dbbd6 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 4 Sep 2014 14:23:23 -0400
|
||||
Subject: [PATCH 053/220] Generate OS and CLASS in 10_linux from
|
||||
/etc/os-release
|
||||
Subject: [PATCH] Generate OS and CLASS in 10_linux from /etc/os-release
|
||||
|
||||
This makes us use pretty names in the titles we generate in
|
||||
grub2-mkconfig when GRUB_DISTRIBUTOR isn't set.
|
||||
@ -15,7 +14,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index d35b0f4..d12d2d7 100644
|
||||
index cf8d1186981..5f6d3c8d52d 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -29,7 +29,8 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
@ -28,6 +27,3 @@ index d35b0f4..d12d2d7 100644
|
||||
else
|
||||
OS="${GRUB_DISTRIBUTOR}"
|
||||
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From fc5204f8800ecfa4f00fab8ab8cd2720a6d5b55e Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Wed, 15 May 2013 17:49:45 -0400
|
||||
Subject: [PATCH 031/220] Don't add '*' to highlighted row
|
||||
|
||||
It is already highlighted.
|
||||
---
|
||||
grub-core/normal/menu_text.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
||||
index e22bb91..a3d1f23 100644
|
||||
--- a/grub-core/normal/menu_text.c
|
||||
+++ b/grub-core/normal/menu_text.c
|
||||
@@ -242,7 +242,7 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
|
||||
unicode_title[i] = ' ';
|
||||
|
||||
if (data->geo.num_entries > 1)
|
||||
- grub_putcode (highlight ? '*' : ' ', data->term);
|
||||
+ grub_putcode (' ', data->term);
|
||||
|
||||
grub_print_ucs4_menu (unicode_title,
|
||||
unicode_title + len,
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
From 0fe1927a2ff37806bcdca1243dd2df9cba116091 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 4 Sep 2014 15:52:08 -0400
|
||||
Subject: [PATCH 054/220] Minimize the sort ordering for .debug and -rescue-
|
||||
kernels.
|
||||
Subject: [PATCH] Minimize the sort ordering for .debug and -rescue- kernels.
|
||||
|
||||
Resolves: rhbz#1065360
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
@ -11,10 +10,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index 1001a12..1a4a578 100644
|
||||
index 301d1ac229a..0f6505bf3b6 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -249,6 +249,14 @@ version_test_gt ()
|
||||
@@ -253,6 +253,14 @@ version_test_gt ()
|
||||
*.old:*.old) ;;
|
||||
*.old:*) version_test_gt_a="`echo "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
|
||||
*:*.old) version_test_gt_b="`echo "$version_test_gt_b" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=ge ;;
|
||||
@ -29,6 +28,3 @@ index 1001a12..1a4a578 100644
|
||||
esac
|
||||
version_test_numeric "$version_test_gt_a" "$version_test_gt_cmp" "$version_test_gt_b"
|
||||
return "$?"
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
From cc62054bce6fc5f00f4e302d8fa7615d263f1f5b Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Fri, 7 Jun 2013 11:09:04 -0400
|
||||
Subject: [PATCH 032/220] Message string cleanups
|
||||
|
||||
Make use of terminology consistent. Remove jargon.
|
||||
---
|
||||
grub-core/normal/menu_text.c | 21 +++++++++------------
|
||||
1 file changed, 9 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
||||
index a3d1f23..64a8386 100644
|
||||
--- a/grub-core/normal/menu_text.c
|
||||
+++ b/grub-core/normal/menu_text.c
|
||||
@@ -157,9 +157,8 @@ print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
|
||||
|
||||
if (edit)
|
||||
{
|
||||
- ret += grub_print_message_indented_real (_("Minimum Emacs-like screen editing is \
|
||||
-supported. TAB lists completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for a \
|
||||
-command-line or ESC to discard edits and return to the GRUB menu."),
|
||||
+ ret += grub_print_message_indented_real (_("Press Ctrl-x or F10 to start, Ctrl-c or F2 for a \
|
||||
+command prompt or Escape to discard edits and return to the menu. Pressing Tab lists possible completions."),
|
||||
STANDARD_MARGIN, STANDARD_MARGIN,
|
||||
term, dry_run);
|
||||
}
|
||||
@@ -167,8 +166,8 @@ command-line or ESC to discard edits and return to the GRUB menu."),
|
||||
{
|
||||
char *msg_translated;
|
||||
|
||||
- msg_translated = grub_xasprintf (_("Use the %C and %C keys to select which "
|
||||
- "entry is highlighted."),
|
||||
+ msg_translated = grub_xasprintf (_("Use the %C and %C keys to change the "
|
||||
+ "selection."),
|
||||
GRUB_UNICODE_UPARROW,
|
||||
GRUB_UNICODE_DOWNARROW);
|
||||
if (!msg_translated)
|
||||
@@ -181,17 +180,15 @@ command-line or ESC to discard edits and return to the GRUB menu."),
|
||||
if (nested)
|
||||
{
|
||||
ret += grub_print_message_indented_real
|
||||
- (_("Press enter to boot the selected OS, "
|
||||
- "`e' to edit the commands before booting "
|
||||
- "or `c' for a command-line. ESC to return previous menu."),
|
||||
+ (_("Press 'e' to edit the selected item, "
|
||||
+ "or 'c' for a command prompt. Press Escape to return to the previous menu."),
|
||||
STANDARD_MARGIN, STANDARD_MARGIN, term, dry_run);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += grub_print_message_indented_real
|
||||
- (_("Press enter to boot the selected OS, "
|
||||
- "`e' to edit the commands before booting "
|
||||
- "or `c' for a command-line."),
|
||||
+ (_("Press 'e' to edit the selected item, "
|
||||
+ "or 'c' for a command prompt."),
|
||||
STANDARD_MARGIN, STANDARD_MARGIN, term, dry_run);
|
||||
}
|
||||
}
|
||||
@@ -443,7 +440,7 @@ menu_text_print_timeout (int timeout, void *dataptr)
|
||||
|| data->timeout_msg == TIMEOUT_TERSE_NO_MARGIN)
|
||||
msg_translated = grub_xasprintf (_("%ds"), timeout);
|
||||
else
|
||||
- msg_translated = grub_xasprintf (_("The highlighted entry will be executed automatically in %ds."), timeout);
|
||||
+ msg_translated = grub_xasprintf (_("The selected entry will be started automatically in %ds."), timeout);
|
||||
if (!msg_translated)
|
||||
{
|
||||
grub_print_error ();
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
From 75f23ba5e4f8e84b595b0b13f5f7ed744a866099 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 9 Jul 2019 10:35:16 +0200
|
||||
Subject: [PATCH 055/220] Try $prefix if $fw_path doesn't work.
|
||||
Subject: [PATCH] Try $prefix if $fw_path doesn't work.
|
||||
|
||||
Related: rhbz#1148652
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/kern/ieee1275/init.c | 30 ++++++-----
|
||||
grub-core/kern/ieee1275/init.c | 28 +++++----
|
||||
grub-core/net/net.c | 2 +-
|
||||
grub-core/normal/main.c | 118 ++++++++++++++++++++---------------------
|
||||
3 files changed, 75 insertions(+), 75 deletions(-)
|
||||
grub-core/normal/main.c | 134 ++++++++++++++++++++---------------------
|
||||
3 files changed, 82 insertions(+), 82 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
|
||||
index e71d158..0cd2a62 100644
|
||||
index e71d1584164..0cd2a627231 100644
|
||||
--- a/grub-core/kern/ieee1275/init.c
|
||||
+++ b/grub-core/kern/ieee1275/init.c
|
||||
@@ -127,23 +127,25 @@ grub_machine_get_bootlocation (char **device, char **path)
|
||||
@ -35,11 +35,10 @@ index e71d158..0cd2a62 100644
|
||||
{
|
||||
- *lastslash = '\0';
|
||||
- grub_translate_ieee1275_path (filename);
|
||||
-
|
||||
+ char *lastslash = grub_strrchr (filename, '\\');
|
||||
|
||||
- *path = filename;
|
||||
- }
|
||||
+ char *lastslash = grub_strrchr (filename, '\\');
|
||||
+
|
||||
+ /* Truncate at last directory. */
|
||||
+ if (lastslash)
|
||||
+ {
|
||||
@ -57,10 +56,10 @@ index e71d158..0cd2a62 100644
|
||||
}
|
||||
|
||||
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
|
||||
index 0645456..4b7972b 100644
|
||||
index 4d3eb5c1a52..0ef148f4adc 100644
|
||||
--- a/grub-core/net/net.c
|
||||
+++ b/grub-core/net/net.c
|
||||
@@ -1850,7 +1850,7 @@ grub_net_search_configfile (char *config)
|
||||
@@ -1869,7 +1869,7 @@ grub_net_search_config_file (char *config)
|
||||
/* Remove the remaining minus sign at the end. */
|
||||
config[config_len] = '\0';
|
||||
|
||||
@ -70,10 +69,10 @@ index 0645456..4b7972b 100644
|
||||
|
||||
static struct grub_preboot *fini_hnd;
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index d93bee6..2fe6743 100644
|
||||
index 880d0ebd454..d5df4f815b0 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -337,74 +337,72 @@ grub_enter_normal_mode (const char *config)
|
||||
@@ -335,81 +335,79 @@ grub_enter_normal_mode (const char *config)
|
||||
grub_boot_time ("Exiting normal mode");
|
||||
}
|
||||
|
||||
@ -83,12 +82,19 @@ index d93bee6..2fe6743 100644
|
||||
+ char *config;
|
||||
+ const char *prefix;
|
||||
+ grub_err_t err = GRUB_ERR_FILE_NOT_FOUND;
|
||||
+ const char *net_search_cfg;
|
||||
+ int disable_net_search = 0;
|
||||
+
|
||||
+ prefix = grub_env_get (variable);
|
||||
+ if (!prefix)
|
||||
+ return GRUB_ERR_FILE_NOT_FOUND;
|
||||
+
|
||||
+ if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0)
|
||||
+ net_search_cfg = grub_env_get ("feature_net_search_cfg");
|
||||
+ if (net_search_cfg && net_search_cfg[0] == 'n')
|
||||
+ disable_net_search = 1;
|
||||
+
|
||||
+ if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0 &&
|
||||
+ !disable_net_search)
|
||||
+ {
|
||||
+ grub_size_t config_len;
|
||||
+ config_len = grub_strlen (prefix) +
|
||||
@ -99,7 +105,7 @@ index d93bee6..2fe6743 100644
|
||||
+ return GRUB_ERR_FILE_NOT_FOUND;
|
||||
+
|
||||
+ grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
+ err = grub_net_search_configfile (config);
|
||||
+ err = grub_net_search_config_file (config);
|
||||
+ }
|
||||
+
|
||||
+ if (err != GRUB_ERR_NONE)
|
||||
@ -131,22 +137,26 @@ index d93bee6..2fe6743 100644
|
||||
int argc, char *argv[])
|
||||
{
|
||||
- if (argc == 0)
|
||||
+ if (argc)
|
||||
+ grub_enter_normal_mode (argv[0]);
|
||||
+ else
|
||||
{
|
||||
- {
|
||||
- /* Guess the config filename. It is necessary to make CONFIG static,
|
||||
- so that it won't get broken by longjmp. */
|
||||
- char *config;
|
||||
- const char *prefix;
|
||||
- const char *net_search_cfg;
|
||||
- int disable_net_search = 0;
|
||||
-
|
||||
- prefix = grub_env_get ("fw_path");
|
||||
- if (! prefix)
|
||||
- prefix = grub_env_get ("prefix");
|
||||
-
|
||||
- net_search_cfg = grub_env_get ("feature_net_search_cfg");
|
||||
- if (net_search_cfg && net_search_cfg[0] == 'n')
|
||||
- disable_net_search = 1;
|
||||
-
|
||||
- if (prefix)
|
||||
- {
|
||||
- if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0)
|
||||
- if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0 &&
|
||||
- !disable_net_search)
|
||||
- {
|
||||
- grub_size_t config_len;
|
||||
- config_len = grub_strlen (prefix) +
|
||||
@ -191,6 +201,12 @@ index d93bee6..2fe6743 100644
|
||||
- {
|
||||
- grub_enter_normal_mode (0);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
+ if (argc)
|
||||
grub_enter_normal_mode (argv[0]);
|
||||
+ else
|
||||
+ {
|
||||
+ /* Guess the config filename. */
|
||||
+ grub_err_t err;
|
||||
+ err = grub_try_normal ("fw_path");
|
||||
@ -198,14 +214,9 @@ index d93bee6..2fe6743 100644
|
||||
+ err = grub_try_normal ("prefix");
|
||||
+ if (err == GRUB_ERR_FILE_NOT_FOUND)
|
||||
+ grub_enter_normal_mode (0);
|
||||
}
|
||||
- else
|
||||
- grub_enter_normal_mode (argv[0]);
|
||||
+ }
|
||||
|
||||
-quit:
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From 9330deb86a791da573563dc319e1874af72eb97c Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Fri, 7 Jun 2013 14:08:23 -0400
|
||||
Subject: [PATCH 033/220] Fix border spacing now that we aren't displaying it
|
||||
|
||||
---
|
||||
grub-core/normal/menu_text.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
||||
index 64a8386..1062d64 100644
|
||||
--- a/grub-core/normal/menu_text.c
|
||||
+++ b/grub-core/normal/menu_text.c
|
||||
@@ -331,12 +331,12 @@ grub_menu_init_page (int nested, int edit,
|
||||
int empty_lines = 1;
|
||||
int version_msg = 1;
|
||||
|
||||
- geo->border = 1;
|
||||
- geo->first_entry_x = 1 /* margin */ + 1 /* border */;
|
||||
+ geo->border = 0;
|
||||
+ geo->first_entry_x = 0 /* margin */ + 0 /* border */;
|
||||
geo->entry_width = grub_term_width (term) - 5;
|
||||
|
||||
geo->first_entry_y = 2 /* two empty lines*/
|
||||
- + 1 /* GNU GRUB version text */ + 1 /* top border */;
|
||||
+ + 0 /* GNU GRUB version text */ + 1 /* top border */;
|
||||
|
||||
geo->timeout_lines = 2;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,34 +1,114 @@
|
||||
From e8cf594751f7bbce4ff01504197ebc25c71c2dc2 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marshall <rmarshall@redhat.com>
|
||||
Date: Mon, 16 Mar 2015 14:14:19 -0400
|
||||
Subject: [PATCH 057/220] Use Distribution Package Sort for grub2-mkconfig
|
||||
(#1124074)
|
||||
Subject: [PATCH] Use rpm's sort for grub2-mkconfig
|
||||
|
||||
Users reported that newly installed kernels on their systems installed
|
||||
with grub-mkconfig would not appear on the grub boot list in order
|
||||
starting with the most recent. Added an option for rpm-based systems to
|
||||
use the rpm-sort library to sort kernels instead.
|
||||
|
||||
Resolves rhbz#1124074
|
||||
Add an option for rpm-based systems to use the rpm-sort library to sort
|
||||
kernels. This avoids problems due to discrepancies between `sort -V`
|
||||
and rpm.
|
||||
|
||||
Signed-off-by: Robert Marshall <rmarshall@redhat.com>
|
||||
[pjones: fix --enable-rpm-sort configure option]
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
[thierry.vignaud: fix build with rpm-4.16]
|
||||
Signed-off-by: Thierry Vignaud <thierry.vignaud@gmail.com>
|
||||
[tim: fix disabling grub-rpm-sort by ./configure]
|
||||
Signed-off-by: Tim Landscheidt <tim@tim-landscheidt.de>
|
||||
[javierm: don't check for rpmvercmp in librpm]
|
||||
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
[rharwood: commit message]
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
Makefile.util.def | 16 +++
|
||||
configure.ac | 29 +++++
|
||||
configure.ac | 37 ++++++
|
||||
Makefile.util.def | 17 +++
|
||||
util/grub-rpm-sort.c | 281 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
util/grub-mkconfig_lib.in | 11 +-
|
||||
util/grub-rpm-sort.8 | 12 ++
|
||||
util/grub-rpm-sort.c | 281 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 348 insertions(+), 1 deletion(-)
|
||||
create mode 100644 util/grub-rpm-sort.8
|
||||
5 files changed, 357 insertions(+), 1 deletion(-)
|
||||
create mode 100644 util/grub-rpm-sort.c
|
||||
create mode 100644 util/grub-rpm-sort.8
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index bec8535af70..643a13f9147 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -72,6 +72,7 @@ grub_TRANSFORM([grub-mkrelpath])
|
||||
grub_TRANSFORM([grub-mkrescue])
|
||||
grub_TRANSFORM([grub-probe])
|
||||
grub_TRANSFORM([grub-reboot])
|
||||
+grub_TRANSFORM([grub-rpm-sort])
|
||||
grub_TRANSFORM([grub-script-check])
|
||||
grub_TRANSFORM([grub-set-default])
|
||||
grub_TRANSFORM([grub-sparc64-setup])
|
||||
@@ -95,6 +96,7 @@ grub_TRANSFORM([grub-mkrescue.1])
|
||||
grub_TRANSFORM([grub-mkstandalone.3])
|
||||
grub_TRANSFORM([grub-ofpathname.3])
|
||||
grub_TRANSFORM([grub-probe.3])
|
||||
+grub_TRANSFORM([grub-rpm-sort.8])
|
||||
grub_TRANSFORM([grub-reboot.3])
|
||||
grub_TRANSFORM([grub-render-label.3])
|
||||
grub_TRANSFORM([grub-script-check.3])
|
||||
@@ -1860,6 +1862,35 @@ fi
|
||||
|
||||
AC_SUBST([LIBDEVMAPPER])
|
||||
|
||||
+AC_ARG_ENABLE([rpm-sort],
|
||||
+ [AS_HELP_STRING([--enable-rpm-sort],
|
||||
+ [enable native rpm sorting of kernels in grub (default=guessed)])])
|
||||
+if test x"$enable_rpm_sort" = xno ; then
|
||||
+ rpm_sort_excuse="explicitly disabled"
|
||||
+else
|
||||
+ enable_rpm_sort=yes
|
||||
+fi
|
||||
+
|
||||
+if test x"$rpm_sort_excuse" = x ; then
|
||||
+ # Check for rpmlib header.
|
||||
+ AC_CHECK_HEADER([rpm/rpmlib.h], [],
|
||||
+ [rpm_sort_excuse="need rpm/rpmlib header"])
|
||||
+fi
|
||||
+
|
||||
+if test x"$rpm_sort_excuse" = x ; then
|
||||
+ # Check for rpmio library.
|
||||
+ AC_CHECK_LIB([rpmio], [rpmvercmp], [],
|
||||
+ [rpm_sort_excuse="rpmio missing rpmvercmp"])
|
||||
+fi
|
||||
+
|
||||
+if test x"$rpm_sort_excuse" = x ; then
|
||||
+ LIBRPM="-lrpmio";
|
||||
+ AC_DEFINE([HAVE_RPMIO], [1],
|
||||
+ [Define to 1 if you have the rpmio library.])
|
||||
+fi
|
||||
+
|
||||
+AC_SUBST([LIBRPM])
|
||||
+
|
||||
LIBGEOM=
|
||||
if test x$host_kernel = xkfreebsd; then
|
||||
AC_CHECK_LIB([geom], [geom_gettree], [],
|
||||
@@ -2047,6 +2078,7 @@ AM_CONDITIONAL([COND_GRUB_EMU_SDL], [test x$enable_grub_emu_sdl = xyes])
|
||||
AM_CONDITIONAL([COND_GRUB_EMU_PCI], [test x$enable_grub_emu_pci = xyes])
|
||||
AM_CONDITIONAL([COND_GRUB_MKFONT], [test x$enable_grub_mkfont = xyes])
|
||||
AM_CONDITIONAL([COND_GRUB_MOUNT], [test x$enable_grub_mount = xyes])
|
||||
+AM_CONDITIONAL([COND_GRUB_RPM_SORT], [test x$enable_rpm_sort = xyes])
|
||||
AM_CONDITIONAL([COND_HAVE_FONT_SOURCE], [test x$FONT_SOURCE != x])
|
||||
if test x$FONT_SOURCE != x ; then
|
||||
HAVE_FONT_SOURCE=1
|
||||
@@ -2168,6 +2200,11 @@ echo grub-mount: Yes
|
||||
else
|
||||
echo grub-mount: No "($grub_mount_excuse)"
|
||||
fi
|
||||
+if [ x"$rpm_sort_excuse" = x ]; then
|
||||
+echo grub-rpm-sort: Yes
|
||||
+else
|
||||
+echo grub-rpm-sort: No "($rpm_sort_excuse)"
|
||||
+fi
|
||||
if [ x"$starfield_excuse" = x ]; then
|
||||
echo starfield theme: Yes
|
||||
echo With DejaVuSans font from $DJVU_FONT_SOURCE
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 1f298d0..843ce09 100644
|
||||
index 2c9b283a230..bc10cc79722 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -696,6 +696,22 @@ program = {
|
||||
@@ -703,6 +703,23 @@ program = {
|
||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||
};
|
||||
|
||||
@ -46,122 +126,15 @@ index 1f298d0..843ce09 100644
|
||||
+ ldadd = libgrubkern.a;
|
||||
+ ldadd = grub-core/lib/gnulib/libgnu.a;
|
||||
+ ldadd = '$(LIBDEVMAPPER) $(LIBRPM)';
|
||||
+ condition = COND_GRUB_RPM_SORT;
|
||||
+};
|
||||
+
|
||||
script = {
|
||||
name = grub-mkconfig;
|
||||
common = util/grub-mkconfig.in;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8df400e..6927615 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -69,6 +69,7 @@ grub_TRANSFORM([grub-mkrelpath])
|
||||
grub_TRANSFORM([grub-mkrescue])
|
||||
grub_TRANSFORM([grub-probe])
|
||||
grub_TRANSFORM([grub-reboot])
|
||||
+grub_TRANSFORM([grub-rpm-sort])
|
||||
grub_TRANSFORM([grub-script-check])
|
||||
grub_TRANSFORM([grub-set-default])
|
||||
grub_TRANSFORM([grub-sparc64-setup])
|
||||
@@ -92,6 +93,7 @@ grub_TRANSFORM([grub-mkrescue.1])
|
||||
grub_TRANSFORM([grub-mkstandalone.3])
|
||||
grub_TRANSFORM([grub-ofpathname.3])
|
||||
grub_TRANSFORM([grub-probe.3])
|
||||
+grub_TRANSFORM([grub-rpm-sort.8])
|
||||
grub_TRANSFORM([grub-reboot.3])
|
||||
grub_TRANSFORM([grub-render-label.3])
|
||||
grub_TRANSFORM([grub-script-check.3])
|
||||
@@ -1802,6 +1804,33 @@ fi
|
||||
|
||||
AC_SUBST([LIBDEVMAPPER])
|
||||
|
||||
+AC_ARG_ENABLE([rpm-sort],
|
||||
+ [AS_HELP_STRING([--enable-rpm-sort],
|
||||
+ [enable native rpm sorting of kernels in grub (default=guessed)])])
|
||||
+if test x"$enable_rpm_sort" = xno ; then
|
||||
+ rpm_sort_excuse="explicitly disabled"
|
||||
+fi
|
||||
+
|
||||
+if test x"$rpm_sort_excuse" = x ; then
|
||||
+ # Check for rpmlib header.
|
||||
+ AC_CHECK_HEADER([rpm/rpmlib.h], [],
|
||||
+ [rpm_sort_excuse="need rpm/rpmlib header"])
|
||||
+fi
|
||||
+
|
||||
+if test x"$rpm_sort_excuse" = x ; then
|
||||
+ # Check for rpm library.
|
||||
+ AC_CHECK_LIB([rpm], [rpmvercmp], [],
|
||||
+ [rpm_sort_excuse="rpmlib missing rpmvercmp"])
|
||||
+fi
|
||||
+
|
||||
+if test x"$rpm_sort_excuse" = x ; then
|
||||
+ LIBRPM="-lrpm";
|
||||
+ AC_DEFINE([HAVE_RPM], [1],
|
||||
+ [Define to 1 if you have the rpm library.])
|
||||
+fi
|
||||
+
|
||||
+AC_SUBST([LIBRPM])
|
||||
+
|
||||
LIBGEOM=
|
||||
if test x$host_kernel = xkfreebsd; then
|
||||
AC_CHECK_LIB([geom], [geom_gettree], [],
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index 1a4a578..113a41f 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -33,6 +33,9 @@ fi
|
||||
if test "x$grub_mkrelpath" = x; then
|
||||
grub_mkrelpath="${bindir}/@grub_mkrelpath@"
|
||||
fi
|
||||
+if test "x$grub_rpm_sort" = x; then
|
||||
+ grub_rpm_sort="${sbindir}/@grub_rpm_sort@"
|
||||
+fi
|
||||
|
||||
if which gettext >/dev/null 2>/dev/null; then
|
||||
:
|
||||
@@ -214,6 +217,12 @@ version_sort ()
|
||||
esac
|
||||
}
|
||||
|
||||
+if [ "x$grub_rpm_sort" != x -a -x "$grub_rpm_sort" ]; then
|
||||
+ kernel_sort="$grub_rpm_sort"
|
||||
+else
|
||||
+ kernel_sort=version_sort
|
||||
+fi
|
||||
+
|
||||
version_test_numeric ()
|
||||
{
|
||||
version_test_numeric_a="$1"
|
||||
@@ -230,7 +239,7 @@ version_test_numeric ()
|
||||
version_test_numeric_a="$version_test_numeric_b"
|
||||
version_test_numeric_b="$version_test_numeric_c"
|
||||
fi
|
||||
- if (echo "$version_test_numeric_a" ; echo "$version_test_numeric_b") | version_sort | head -n 1 | grep -qx "$version_test_numeric_b" ; then
|
||||
+ if (echo "$version_test_numeric_a" ; echo "$version_test_numeric_b") | "$kernel_sort" | head -n 1 | grep -qx "$version_test_numeric_b" ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
diff --git a/util/grub-rpm-sort.8 b/util/grub-rpm-sort.8
|
||||
new file mode 100644
|
||||
index 0000000..8ce2148
|
||||
--- /dev/null
|
||||
+++ b/util/grub-rpm-sort.8
|
||||
@@ -0,0 +1,12 @@
|
||||
+.TH GRUB-RPM-SORT 8 "Wed Feb 26 2014"
|
||||
+.SH NAME
|
||||
+\fBgrub-rpm-sort\fR \(em Sort input according to RPM version compare.
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+\fBgrub-rpm-sort\fR [OPTIONS].
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+You should not normally run this program directly. Use grub-mkconfig instead.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-rpm-sort.c b/util/grub-rpm-sort.c
|
||||
new file mode 100644
|
||||
index 0000000..f33bd1e
|
||||
index 00000000000..f33bd1ed568
|
||||
--- /dev/null
|
||||
+++ b/util/grub-rpm-sort.c
|
||||
@@ -0,0 +1,281 @@
|
||||
@ -446,6 +419,57 @@ index 0000000..f33bd1e
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index 0f6505bf3b6..42c2ea9ba50 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -33,6 +33,9 @@ fi
|
||||
if test "x$grub_mkrelpath" = x; then
|
||||
grub_mkrelpath="${bindir}/@grub_mkrelpath@"
|
||||
fi
|
||||
+if test "x$grub_rpm_sort" = x; then
|
||||
+ grub_rpm_sort="${sbindir}/@grub_rpm_sort@"
|
||||
+fi
|
||||
|
||||
if command -v gettext >/dev/null; then
|
||||
:
|
||||
@@ -218,6 +221,12 @@ version_sort ()
|
||||
esac
|
||||
}
|
||||
|
||||
+if [ "x$grub_rpm_sort" != x -a -x "$grub_rpm_sort" ]; then
|
||||
+ kernel_sort="$grub_rpm_sort"
|
||||
+else
|
||||
+ kernel_sort=version_sort
|
||||
+fi
|
||||
+
|
||||
version_test_numeric ()
|
||||
{
|
||||
version_test_numeric_a="$1"
|
||||
@@ -234,7 +243,7 @@ version_test_numeric ()
|
||||
version_test_numeric_a="$version_test_numeric_b"
|
||||
version_test_numeric_b="$version_test_numeric_c"
|
||||
fi
|
||||
- if (echo "$version_test_numeric_a" ; echo "$version_test_numeric_b") | version_sort | head -n 1 | grep -qx "$version_test_numeric_b" ; then
|
||||
+ if (echo "$version_test_numeric_a" ; echo "$version_test_numeric_b") | "$kernel_sort" | head -n 1 | grep -qx "$version_test_numeric_b" ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
diff --git a/util/grub-rpm-sort.8 b/util/grub-rpm-sort.8
|
||||
new file mode 100644
|
||||
index 00000000000..8ce21488448
|
||||
--- /dev/null
|
||||
+++ b/util/grub-rpm-sort.8
|
||||
@@ -0,0 +1,12 @@
|
||||
+.TH GRUB-RPM-SORT 8 "Wed Feb 26 2014"
|
||||
+.SH NAME
|
||||
+\fBgrub-rpm-sort\fR \(em Sort input according to RPM version compare.
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+\fBgrub-rpm-sort\fR [OPTIONS].
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+You should not normally run this program directly. Use grub-mkconfig instead.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.BR "info grub"
|
||||
@ -1,8 +1,8 @@
|
||||
From 95e793ef45a127c800525d629b2fdec583ae8266 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 28 Apr 2015 11:15:03 -0400
|
||||
Subject: [PATCH 059/220] Make grub2-mkconfig construct titles that look like
|
||||
the ones we want elsewhere.
|
||||
Subject: [PATCH] Make grub2-mkconfig construct titles that look like the ones
|
||||
we want elsewhere.
|
||||
|
||||
Resolves: rhbz#1215839
|
||||
|
||||
@ -12,7 +12,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 27 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index d12d2d7..12a20c9 100644
|
||||
index 5f6d3c8d52d..786dbabb4a8 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -78,6 +78,32 @@ case x"$GRUB_FS" in
|
||||
@ -67,6 +67,3 @@ index d12d2d7..12a20c9 100644
|
||||
fi
|
||||
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
|
||||
else
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
From 5e6cef121ba76d88608e6c124ff60e73cf057fe4 Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Fri, 7 Jun 2013 14:08:49 -0400
|
||||
Subject: [PATCH 034/220] Use the correct indentation for the term help text
|
||||
|
||||
That is consistent with the menu help text
|
||||
---
|
||||
grub-core/normal/main.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 09d0dfe..7f61c5b 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -432,8 +432,8 @@ grub_normal_reader_init (int nested)
|
||||
grub_normal_init_page (term, 1);
|
||||
grub_term_setcursor (term, 1);
|
||||
|
||||
- if (grub_term_width (term) > 3 + STANDARD_MARGIN + 20)
|
||||
- grub_print_message_indented (msg_formatted, 3, STANDARD_MARGIN, term);
|
||||
+ if (grub_term_width (term) > 2 * STANDARD_MARGIN + 20)
|
||||
+ grub_print_message_indented (msg_formatted, STANDARD_MARGIN, STANDARD_MARGIN, term);
|
||||
else
|
||||
grub_print_message_indented (msg_formatted, 0, 0, term);
|
||||
grub_putcode ('\n', term);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From a524d461543f57da4f36a9c9c12b329ea8b6629c Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marshall <rmarshall@redhat.com>
|
||||
Date: Thu, 25 Jun 2015 11:13:11 -0400
|
||||
Subject: [PATCH 060/220] Add friendly grub2 password config tool (#985962)
|
||||
Subject: [PATCH] Add friendly grub2 password config tool (#985962)
|
||||
|
||||
Provided a tool for users to reset the grub2 root user password
|
||||
without having to alter the grub.cfg. The hashed password now
|
||||
@ -15,8 +15,8 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
[luto: fix grub-setpassword -o's output path]
|
||||
Andy Lutomirski <luto@kernel.org>
|
||||
---
|
||||
Makefile.util.def | 13 +++++
|
||||
configure.ac | 1 +
|
||||
Makefile.util.def | 13 +++++
|
||||
util/grub-mkconfig.in | 2 +
|
||||
util/grub-set-password.8 | 28 ++++++++++
|
||||
util/grub-set-password.in | 128 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
@ -26,42 +26,11 @@ Andy Lutomirski <luto@kernel.org>
|
||||
create mode 100644 util/grub-set-password.in
|
||||
create mode 100644 util/grub.d/01_users.in
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 843ce09..e50436a 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -452,6 +452,12 @@ script = {
|
||||
};
|
||||
|
||||
script = {
|
||||
+ name = '01_users';
|
||||
+ common = util/grub.d/01_users.in;
|
||||
+ installdir = grubconf;
|
||||
+};
|
||||
+
|
||||
+script = {
|
||||
name = '10_windows';
|
||||
common = util/grub.d/10_windows.in;
|
||||
installdir = grubconf;
|
||||
@@ -734,6 +740,13 @@ script = {
|
||||
};
|
||||
|
||||
script = {
|
||||
+ name = grub-set-password;
|
||||
+ common = util/grub-set-password.in;
|
||||
+ mansection = 8;
|
||||
+ installdir = sbin;
|
||||
+};
|
||||
+
|
||||
+script = {
|
||||
name = grub-mkconfig_lib;
|
||||
common = util/grub-mkconfig_lib.in;
|
||||
installdir = noinst;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6927615..6850166 100644
|
||||
index 643a13f9147..25e1abb59b9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -69,6 +69,7 @@ grub_TRANSFORM([grub-mkrelpath])
|
||||
@@ -72,6 +72,7 @@ grub_TRANSFORM([grub-mkrelpath])
|
||||
grub_TRANSFORM([grub-mkrescue])
|
||||
grub_TRANSFORM([grub-probe])
|
||||
grub_TRANSFORM([grub-reboot])
|
||||
@ -69,11 +38,42 @@ index 6927615..6850166 100644
|
||||
grub_TRANSFORM([grub-rpm-sort])
|
||||
grub_TRANSFORM([grub-script-check])
|
||||
grub_TRANSFORM([grub-set-default])
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index bc10cc79722..8ca4c14f0b9 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -452,6 +452,12 @@ script = {
|
||||
installdir = grubconf;
|
||||
};
|
||||
|
||||
+script = {
|
||||
+ name = '01_users';
|
||||
+ common = util/grub.d/01_users.in;
|
||||
+ installdir = grubconf;
|
||||
+};
|
||||
+
|
||||
script = {
|
||||
name = '10_windows';
|
||||
common = util/grub.d/10_windows.in;
|
||||
@@ -741,6 +747,13 @@ script = {
|
||||
installdir = sbin;
|
||||
};
|
||||
|
||||
+script = {
|
||||
+ name = grub-set-password;
|
||||
+ common = util/grub-set-password.in;
|
||||
+ mansection = 8;
|
||||
+ installdir = sbin;
|
||||
+};
|
||||
+
|
||||
script = {
|
||||
name = grub-mkconfig_lib;
|
||||
common = util/grub-mkconfig_lib.in;
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index c645351..4e7a875 100644
|
||||
index 8ea2315ebc2..ba14cf6261c 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -282,6 +282,8 @@ for i in "${grub_mkconfig_dir}"/* ; do
|
||||
@@ -276,6 +276,8 @@ for i in "${grub_mkconfig_dir}"/* ; do
|
||||
*~) ;;
|
||||
# emacsen autosave files. FIXME: support other editors
|
||||
*/\#*\#) ;;
|
||||
@ -84,7 +84,7 @@ index c645351..4e7a875 100644
|
||||
echo
|
||||
diff --git a/util/grub-set-password.8 b/util/grub-set-password.8
|
||||
new file mode 100644
|
||||
index 0000000..9646546
|
||||
index 00000000000..9646546e43d
|
||||
--- /dev/null
|
||||
+++ b/util/grub-set-password.8
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -118,7 +118,7 @@ index 0000000..9646546
|
||||
+.BR "info grub2-mkpasswd-pbkdf2"
|
||||
diff --git a/util/grub-set-password.in b/util/grub-set-password.in
|
||||
new file mode 100644
|
||||
index 0000000..5ebf505
|
||||
index 00000000000..5ebf50576d6
|
||||
--- /dev/null
|
||||
+++ b/util/grub-set-password.in
|
||||
@@ -0,0 +1,128 @@
|
||||
@ -252,7 +252,7 @@ index 0000000..5ebf505
|
||||
+fi
|
||||
diff --git a/util/grub.d/01_users.in b/util/grub.d/01_users.in
|
||||
new file mode 100644
|
||||
index 0000000..db2f44b
|
||||
index 00000000000..db2f44bfb78
|
||||
--- /dev/null
|
||||
+++ b/util/grub.d/01_users.in
|
||||
@@ -0,0 +1,11 @@
|
||||
@ -267,6 +267,3 @@ index 0000000..db2f44b
|
||||
+ fi
|
||||
+fi
|
||||
+EOF
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From 7d70ca36c17e14361284f986e4c62e6523bf6b98 Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Fri, 7 Jun 2013 14:30:55 -0400
|
||||
Subject: [PATCH 035/220] Indent menu entries
|
||||
|
||||
---
|
||||
grub-core/normal/menu_text.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
||||
index 1062d64..ecc60f9 100644
|
||||
--- a/grub-core/normal/menu_text.c
|
||||
+++ b/grub-core/normal/menu_text.c
|
||||
@@ -239,7 +239,8 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
|
||||
unicode_title[i] = ' ';
|
||||
|
||||
if (data->geo.num_entries > 1)
|
||||
- grub_putcode (' ', data->term);
|
||||
+ for (i = 0; i < STANDARD_MARGIN; i++)
|
||||
+ grub_putcode (' ', data->term);
|
||||
|
||||
grub_print_ucs4_menu (unicode_title,
|
||||
unicode_title + len,
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
From 61f83fac37fb9bacac50f75e0aa7d304bfabf410 Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Fri, 7 Jun 2013 14:59:36 -0400
|
||||
Subject: [PATCH 036/220] Fix margins
|
||||
|
||||
---
|
||||
grub-core/normal/menu_text.c | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
||||
index ecc60f9..0e43f2c 100644
|
||||
--- a/grub-core/normal/menu_text.c
|
||||
+++ b/grub-core/normal/menu_text.c
|
||||
@@ -333,17 +333,15 @@ grub_menu_init_page (int nested, int edit,
|
||||
int version_msg = 1;
|
||||
|
||||
geo->border = 0;
|
||||
- geo->first_entry_x = 0 /* margin */ + 0 /* border */;
|
||||
- geo->entry_width = grub_term_width (term) - 5;
|
||||
+ geo->first_entry_x = 0; /* no margin */
|
||||
+ geo->entry_width = grub_term_width (term) - 1;
|
||||
|
||||
- geo->first_entry_y = 2 /* two empty lines*/
|
||||
- + 0 /* GNU GRUB version text */ + 1 /* top border */;
|
||||
+ geo->first_entry_y = 3; /* three empty lines*/
|
||||
|
||||
geo->timeout_lines = 2;
|
||||
|
||||
/* 3 lines for timeout message and bottom margin. 2 lines for the border. */
|
||||
geo->num_entries = grub_term_height (term) - geo->first_entry_y
|
||||
- - 1 /* bottom border */
|
||||
- 1 /* empty line before info message*/
|
||||
- geo->timeout_lines /* timeout */
|
||||
- 1 /* empty final line */;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 685960c950e661dec0d57a353ca01304b94a7092 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Josef Bacik <jbacik@fb.com>
|
||||
Date: Wed, 12 Aug 2015 08:57:55 -0700
|
||||
Subject: [PATCH 061/220] tcp: add window scaling support
|
||||
Subject: [PATCH] tcp: add window scaling support
|
||||
|
||||
Sometimes we have to provision boxes across regions, such as California to
|
||||
Sweden. The http server has a 10 minute timeout, so if we can't get our 250mb
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Josef Bacik <jbacik@fb.com>
|
||||
1 file changed, 29 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/tcp.c b/grub-core/net/tcp.c
|
||||
index e8ad34b..7d4b822 100644
|
||||
index e8ad34b84d4..7d4b822626d 100644
|
||||
--- a/grub-core/net/tcp.c
|
||||
+++ b/grub-core/net/tcp.c
|
||||
@@ -106,6 +106,18 @@ struct tcphdr
|
||||
@ -85,6 +85,3 @@ index e8ad34b..7d4b822 100644
|
||||
|
||||
tcp_socket_register (socket);
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
From 10fe905b3b3364436fe5328724b21def775aec60 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 21 Jun 2013 14:44:08 -0400
|
||||
Subject: [PATCH 037/220] Use -2 instead of -1 for our right-hand margin, so
|
||||
linewrapping works (#976643).
|
||||
|
||||
Signed-off-by: Peter Jones <grub2-owner@fedoraproject.org>
|
||||
---
|
||||
grub-core/normal/menu_text.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
||||
index 0e43f2c..537d4bf 100644
|
||||
--- a/grub-core/normal/menu_text.c
|
||||
+++ b/grub-core/normal/menu_text.c
|
||||
@@ -334,7 +334,7 @@ grub_menu_init_page (int nested, int edit,
|
||||
|
||||
geo->border = 0;
|
||||
geo->first_entry_x = 0; /* no margin */
|
||||
- geo->entry_width = grub_term_width (term) - 1;
|
||||
+ geo->entry_width = grub_term_width (term) - 2;
|
||||
|
||||
geo->first_entry_y = 3; /* three empty lines*/
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,31 +1,23 @@
|
||||
From af6fa4f3b319c6d71badfba50fcb16619c38605a Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 9 Jul 2019 11:47:37 +0200
|
||||
Subject: [PATCH 064/220] efinet and bootp: add support for dhcpv6
|
||||
Subject: [PATCH] efinet and bootp: add support for dhcpv6
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/net/bootp.c | 174 +++++++++++++++++++++++++++++++++++++
|
||||
grub-core/net/drivers/efi/efinet.c | 54 ++++++++++--
|
||||
grub-core/net/bootp.c | 173 +++++++++++++++++++++++++++++++++++++
|
||||
grub-core/net/drivers/efi/efinet.c | 53 ++++++++++--
|
||||
grub-core/net/net.c | 72 +++++++++++++++
|
||||
grub-core/net/tftp.c | 4 +
|
||||
include/grub/efi/api.h | 129 +++++++++++++++++++++++++--
|
||||
include/grub/net.h | 60 +++++++++++++
|
||||
6 files changed, 479 insertions(+), 14 deletions(-)
|
||||
6 files changed, 477 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
|
||||
index 0e6e41a..8c96959 100644
|
||||
index 6fb5627025d..e28fb6a09f9 100644
|
||||
--- a/grub-core/net/bootp.c
|
||||
+++ b/grub-core/net/bootp.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <grub/net/ip.h>
|
||||
#include <grub/net/netbuff.h>
|
||||
#include <grub/net/udp.h>
|
||||
+#include <grub/net/url.h>
|
||||
#include <grub/datetime.h>
|
||||
|
||||
struct grub_dhcp_discover_options
|
||||
@@ -935,6 +936,179 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -902,6 +902,179 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)),
|
||||
|
||||
static grub_command_t cmd_getdhcp, cmd_bootp, cmd_dhcp;
|
||||
|
||||
@ -206,16 +198,15 @@ index 0e6e41a..8c96959 100644
|
||||
grub_bootp_init (void)
|
||||
{
|
||||
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
|
||||
index 5388f95..a57189e 100644
|
||||
index 5388f952ba9..173fb63153c 100644
|
||||
--- a/grub-core/net/drivers/efi/efinet.c
|
||||
+++ b/grub-core/net/drivers/efi/efinet.c
|
||||
@@ -18,11 +18,15 @@
|
||||
@@ -18,11 +18,14 @@
|
||||
|
||||
#include <grub/net/netbuff.h>
|
||||
#include <grub/dl.h>
|
||||
+#include <grub/env.h>
|
||||
#include <grub/net.h>
|
||||
+#include <grub/net/url.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/efi/api.h>
|
||||
#include <grub/efi/efi.h>
|
||||
@ -225,7 +216,7 @@ index 5388f95..a57189e 100644
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -329,7 +333,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
@@ -329,7 +332,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
char **path)
|
||||
{
|
||||
struct grub_net_card *card;
|
||||
@ -234,7 +225,7 @@ index 5388f95..a57189e 100644
|
||||
|
||||
dp = grub_efi_get_device_path (hnd);
|
||||
if (! dp)
|
||||
@@ -340,14 +344,19 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
@@ -340,14 +343,19 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
grub_efi_device_path_t *cdp;
|
||||
struct grub_efi_pxe *pxe;
|
||||
struct grub_efi_pxe_mode *pxe_mode;
|
||||
@ -255,7 +246,7 @@ index 5388f95..a57189e 100644
|
||||
int match;
|
||||
|
||||
/* EDK2 UEFI PXE driver creates pseudo devices with type IPv4/IPv6
|
||||
@@ -356,7 +365,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
@@ -356,7 +364,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
devices. We skip them when enumerating cards, so here we need to
|
||||
find matching MAC device.
|
||||
*/
|
||||
@ -263,7 +254,7 @@ index 5388f95..a57189e 100644
|
||||
if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) != GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE
|
||||
|| (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE
|
||||
&& GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE))
|
||||
@@ -373,16 +381,46 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
@@ -373,16 +380,46 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
if (!match)
|
||||
continue;
|
||||
}
|
||||
@ -316,10 +307,10 @@ index 5388f95..a57189e 100644
|
||||
}
|
||||
}
|
||||
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
|
||||
index 4b7972b..f24f1fd 100644
|
||||
index 0ef148f4adc..22f2689aaeb 100644
|
||||
--- a/grub-core/net/net.c
|
||||
+++ b/grub-core/net/net.c
|
||||
@@ -955,6 +955,78 @@ grub_net_network_level_interface_register (struct grub_net_network_level_interfa
|
||||
@@ -960,6 +960,78 @@ grub_net_network_level_interface_register (struct grub_net_network_level_interfa
|
||||
grub_net_network_level_interfaces = inter;
|
||||
}
|
||||
|
||||
@ -399,19 +390,18 @@ index 4b7972b..f24f1fd 100644
|
||||
grub_err_t
|
||||
grub_net_add_ipv4_local (struct grub_net_network_level_interface *inter,
|
||||
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
|
||||
index 7d90bf6..1157524 100644
|
||||
index 7f44b30f521..4ab2f5c7357 100644
|
||||
--- a/grub-core/net/tftp.c
|
||||
+++ b/grub-core/net/tftp.c
|
||||
@@ -379,19 +379,23 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
return grub_errno;
|
||||
}
|
||||
@@ -358,18 +358,22 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
file->not_easily_seekable = 1;
|
||||
file->data = data;
|
||||
|
||||
+ grub_dprintf("tftp", "resolving address for %s\n", file->device->net->server);
|
||||
err = grub_net_resolve_address (file->device->net->server, &addr);
|
||||
if (err)
|
||||
{
|
||||
+ grub_dprintf("tftp", "Address resolution failed: %d\n", err);
|
||||
destroy_pq (data);
|
||||
grub_free (data);
|
||||
return err;
|
||||
}
|
||||
@ -423,14 +413,14 @@ index 7d90bf6..1157524 100644
|
||||
if (!data->sock)
|
||||
{
|
||||
+ grub_dprintf("tftp", "connection failed\n");
|
||||
destroy_pq (data);
|
||||
grub_free (data);
|
||||
return grub_errno;
|
||||
}
|
||||
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
|
||||
index addcbfa..d97cdf9 100644
|
||||
index f1a52210c0c..117469450d3 100644
|
||||
--- a/include/grub/efi/api.h
|
||||
+++ b/include/grub/efi/api.h
|
||||
@@ -572,10 +572,16 @@ typedef void *grub_efi_handle_t;
|
||||
@@ -592,10 +592,16 @@ typedef void *grub_efi_handle_t;
|
||||
typedef void *grub_efi_event_t;
|
||||
typedef grub_efi_uint64_t grub_efi_lba_t;
|
||||
typedef grub_efi_uintn_t grub_efi_tpl_t;
|
||||
@ -451,7 +441,7 @@ index addcbfa..d97cdf9 100644
|
||||
typedef grub_efi_uint64_t grub_efi_physical_address_t;
|
||||
typedef grub_efi_uint64_t grub_efi_virtual_address_t;
|
||||
|
||||
@@ -1450,16 +1456,127 @@ struct grub_efi_simple_text_output_interface
|
||||
@@ -1474,16 +1480,127 @@ struct grub_efi_simple_text_output_interface
|
||||
};
|
||||
typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output_interface_t;
|
||||
|
||||
@ -582,7 +572,7 @@ index addcbfa..d97cdf9 100644
|
||||
|
||||
typedef struct grub_efi_pxe
|
||||
diff --git a/include/grub/net.h b/include/grub/net.h
|
||||
index ff6d347..3647012 100644
|
||||
index 7ae4b6bd805..8a05ec4fe7a 100644
|
||||
--- a/include/grub/net.h
|
||||
+++ b/include/grub/net.h
|
||||
@@ -447,6 +447,51 @@ struct grub_net_bootp_packet
|
||||
@ -659,6 +649,3 @@ index ff6d347..3647012 100644
|
||||
grub_err_t
|
||||
grub_net_add_ipv4_local (struct grub_net_network_level_interface *inf,
|
||||
int mask);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 6f9c2df8b9b7905038bab5f3627806c00199ae25 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 23 Jun 2016 11:01:39 -0400
|
||||
Subject: [PATCH 065/220] Add grub-get-kernel-settings and use it in 10_linux
|
||||
Subject: [PATCH] Add grub-get-kernel-settings and use it in 10_linux
|
||||
|
||||
This patch adds grub-get-kernel-settings, which reads the system kernel
|
||||
installation configuration from /etc/sysconfig/kernel, and outputs
|
||||
@ -11,8 +11,8 @@ debug stanzas.
|
||||
|
||||
Resolves: rhbz#1226325
|
||||
---
|
||||
Makefile.util.def | 7 ++
|
||||
configure.ac | 2 +
|
||||
Makefile.util.def | 7 ++
|
||||
util/bash-completion.d/grub-completion.bash.in | 22 +++++++
|
||||
util/grub-get-kernel-settings.3 | 20 ++++++
|
||||
util/grub-get-kernel-settings.in | 88 ++++++++++++++++++++++++++
|
||||
@ -22,29 +22,11 @@ Resolves: rhbz#1226325
|
||||
create mode 100644 util/grub-get-kernel-settings.3
|
||||
create mode 100644 util/grub-get-kernel-settings.in
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index e50436a..2215cc7 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -726,6 +726,13 @@ script = {
|
||||
};
|
||||
|
||||
script = {
|
||||
+ name = grub-get-kernel-settings;
|
||||
+ common = util/grub-get-kernel-settings.in;
|
||||
+ mansection = 3;
|
||||
+ installdir = sbin;
|
||||
+};
|
||||
+
|
||||
+script = {
|
||||
name = grub-set-default;
|
||||
common = util/grub-set-default.in;
|
||||
mansection = 8;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6850166..fc3c2b4 100644
|
||||
index 25e1abb59b9..58e57a745fa 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -62,6 +62,7 @@ grub_TRANSFORM([grub-install])
|
||||
@@ -65,6 +65,7 @@ grub_TRANSFORM([grub-install])
|
||||
grub_TRANSFORM([grub-mkconfig])
|
||||
grub_TRANSFORM([grub-mkfont])
|
||||
grub_TRANSFORM([grub-mkimage])
|
||||
@ -52,7 +34,7 @@ index 6850166..fc3c2b4 100644
|
||||
grub_TRANSFORM([grub-glue-efi])
|
||||
grub_TRANSFORM([grub-mklayout])
|
||||
grub_TRANSFORM([grub-mkpasswd-pbkdf2])
|
||||
@@ -79,6 +80,7 @@ grub_TRANSFORM([grub-file])
|
||||
@@ -82,6 +83,7 @@ grub_TRANSFORM([grub-file])
|
||||
grub_TRANSFORM([grub-bios-setup.3])
|
||||
grub_TRANSFORM([grub-editenv.1])
|
||||
grub_TRANSFORM([grub-fstest.3])
|
||||
@ -60,14 +42,33 @@ index 6850166..fc3c2b4 100644
|
||||
grub_TRANSFORM([grub-glue-efi.3])
|
||||
grub_TRANSFORM([grub-install.1])
|
||||
grub_TRANSFORM([grub-kbdcomp.3])
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 8ca4c14f0b9..43a1c7453b1 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -733,6 +733,13 @@ script = {
|
||||
installdir = sbin;
|
||||
};
|
||||
|
||||
+script = {
|
||||
+ name = grub-get-kernel-settings;
|
||||
+ common = util/grub-get-kernel-settings.in;
|
||||
+ mansection = 3;
|
||||
+ installdir = sbin;
|
||||
+};
|
||||
+
|
||||
script = {
|
||||
name = grub-set-default;
|
||||
common = util/grub-set-default.in;
|
||||
diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completion.d/grub-completion.bash.in
|
||||
index 44bf135..5c4acd4 100644
|
||||
index 44bf135b9f8..5c4acd496d4 100644
|
||||
--- a/util/bash-completion.d/grub-completion.bash.in
|
||||
+++ b/util/bash-completion.d/grub-completion.bash.in
|
||||
@@ -265,6 +265,28 @@ unset __grub_sparc64_setup_program
|
||||
@@ -264,6 +264,28 @@ have ${__grub_sparc64_setup_program} && \
|
||||
unset __grub_sparc64_setup_program
|
||||
|
||||
|
||||
#
|
||||
+#
|
||||
+# grub-get-kernel-settings
|
||||
+#
|
||||
+_grub_get_kernel_settings () {
|
||||
@ -89,13 +90,12 @@ index 44bf135..5c4acd4 100644
|
||||
+unset __grub_get_kernel_settings_program
|
||||
+
|
||||
+
|
||||
+#
|
||||
#
|
||||
# grub-install
|
||||
#
|
||||
_grub_install () {
|
||||
diff --git a/util/grub-get-kernel-settings.3 b/util/grub-get-kernel-settings.3
|
||||
new file mode 100644
|
||||
index 0000000..ba33330
|
||||
index 00000000000..ba33330e28d
|
||||
--- /dev/null
|
||||
+++ b/util/grub-get-kernel-settings.3
|
||||
@@ -0,0 +1,20 @@
|
||||
@ -121,7 +121,7 @@ index 0000000..ba33330
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-get-kernel-settings.in b/util/grub-get-kernel-settings.in
|
||||
new file mode 100644
|
||||
index 0000000..7e87dfc
|
||||
index 00000000000..7e87dfccc0e
|
||||
--- /dev/null
|
||||
+++ b/util/grub-get-kernel-settings.in
|
||||
@@ -0,0 +1,88 @@
|
||||
@ -214,7 +214,7 @@ index 0000000..7e87dfc
|
||||
+ echo export GRUB_UPDATE_DEFAULT_KERNEL
|
||||
+fi
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 4e7a875..6247a0b 100644
|
||||
index ba14cf6261c..005f093809b 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -45,6 +45,7 @@ grub_probe="${sbindir}/@grub_probe@"
|
||||
@ -231,11 +231,11 @@ index 4e7a875..6247a0b 100644
|
||||
|
||||
+eval "$("${grub_get_kernel_settings}")" || true
|
||||
+
|
||||
if [ "x$GRUB_DISABLE_UUID" != "xtrue" ]; then
|
||||
if [ -z "$GRUB_DEVICE_UUID" ]; then
|
||||
GRUB_DEVICE_UUID="$GRUB_DEVICE_UUID_GENERATED"
|
||||
if [ "x${GRUB_DISABLE_UUID}" = "xtrue" ]; then
|
||||
if [ -z "${GRUB_DISABLE_LINUX_UUID}" ]; then
|
||||
GRUB_DISABLE_LINUX_UUID="true"
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 12a20c9..55f4aa7 100644
|
||||
index 786dbabb4a8..292e333324b 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -111,7 +111,8 @@ linux_entry ()
|
||||
@ -258,7 +258,7 @@ index 12a20c9..55f4aa7 100644
|
||||
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
|
||||
else
|
||||
echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
|
||||
@@ -295,11 +299,15 @@ while [ "x$list" != "x" ] ; do
|
||||
@@ -306,11 +310,15 @@ while [ "x$list" != "x" ] ; do
|
||||
fi
|
||||
|
||||
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
|
||||
@ -276,7 +276,7 @@ index 12a20c9..55f4aa7 100644
|
||||
if [ -z "$boot_device_id" ]; then
|
||||
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
|
||||
fi
|
||||
@@ -308,10 +316,15 @@ while [ "x$list" != "x" ] ; do
|
||||
@@ -319,10 +327,15 @@ while [ "x$list" != "x" ] ; do
|
||||
is_top_level=false
|
||||
fi
|
||||
|
||||
@ -294,6 +294,3 @@ index 12a20c9..55f4aa7 100644
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
fi
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
From 72ffa52429b18c75f461c5dfa339c05b4bed2788 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 28 Oct 2013 10:13:27 -0400
|
||||
Subject: [PATCH 039/220] F10 doesn't work on serial, so don't tell the user to
|
||||
hit it (#987443)
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/normal/menu_text.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
||||
index 537d4bf..452d55b 100644
|
||||
--- a/grub-core/normal/menu_text.c
|
||||
+++ b/grub-core/normal/menu_text.c
|
||||
@@ -157,7 +157,7 @@ print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
|
||||
|
||||
if (edit)
|
||||
{
|
||||
- ret += grub_print_message_indented_real (_("Press Ctrl-x or F10 to start, Ctrl-c or F2 for a \
|
||||
+ ret += grub_print_message_indented_real (_("Press Ctrl-x to start, Ctrl-c for a \
|
||||
command prompt or Escape to discard edits and return to the menu. Pressing Tab lists possible completions."),
|
||||
STANDARD_MARGIN, STANDARD_MARGIN,
|
||||
term, dry_run);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 293c75639a43d2ff06fe4824cb306ed81e1aa5af Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Masahiro Matsuya <mmatsuya@redhat.com>
|
||||
Date: Sat, 29 Oct 2016 08:35:26 +0900
|
||||
Subject: [PATCH 067/220] bz1374141 fix incorrect mask for ppc64
|
||||
Subject: [PATCH] bz1374141 fix incorrect mask for ppc64
|
||||
|
||||
The netmask configured in firmware is not respected on ppc64 (big endian).
|
||||
When 255.255.252.0 is set as netmask in firmware, the following is the value of bootpath string in grub_ieee1275_parse_bootpath().
|
||||
@ -25,12 +25,15 @@ This patch changes it as below.
|
||||
0000 0000 0000 0000 0000 0011 1111 1111 # ~grub_swap_bytes32(grub_le_to_cpu32 (subnet_mask.ipv4))
|
||||
|
||||
The count of zero with __builtin_clz can be 22. (clz counts the number of one bits preceding the most significant zero bit)
|
||||
|
||||
Signed-off-by: Masahiro Matsuya <mmatsuya@redhat.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/net/drivers/ieee1275/ofnet.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/drivers/ieee1275/ofnet.c
|
||||
index ac4e62a..3860b6f 100644
|
||||
index ac4e62a95c9..3860b6f78d8 100644
|
||||
--- a/grub-core/net/drivers/ieee1275/ofnet.c
|
||||
+++ b/grub-core/net/drivers/ieee1275/ofnet.c
|
||||
@@ -220,8 +220,7 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
|
||||
@ -43,6 +46,3 @@ index ac4e62a..3860b6f 100644
|
||||
}
|
||||
|
||||
if (gateway_addr.ipv4 != 0)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From fc5bc8610eb9e556ced1f1b91f9c4f34a51f3852 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 27 Jan 2016 09:22:42 -0500
|
||||
Subject: [PATCH 068/220] Make grub_fatal() also backtrace.
|
||||
Subject: [PATCH] Make grub_fatal() also backtrace.
|
||||
|
||||
---
|
||||
grub-core/Makefile.core.def | 3 ++
|
||||
@ -13,10 +13,10 @@ Subject: [PATCH 068/220] Make grub_fatal() also backtrace.
|
||||
create mode 100644 grub-core/lib/arm64/backtrace.c
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 99466b1..ebc5580 100644
|
||||
index c15e91943b9..058c88ac3af 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -186,6 +186,9 @@ kernel = {
|
||||
@@ -188,6 +188,9 @@ kernel = {
|
||||
|
||||
softdiv = lib/division.c;
|
||||
|
||||
@ -27,7 +27,7 @@ index 99466b1..ebc5580 100644
|
||||
i386_xen = kern/i386/dl.c;
|
||||
i386_xen_pvh = kern/i386/dl.c;
|
||||
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
|
||||
index 1c560ea..04371ac 100644
|
||||
index 63b586d09cb..a3e215155bd 100644
|
||||
--- a/grub-core/kern/misc.c
|
||||
+++ b/grub-core/kern/misc.c
|
||||
@@ -24,6 +24,7 @@
|
||||
@ -38,7 +38,7 @@ index 1c560ea..04371ac 100644
|
||||
|
||||
union printf_arg
|
||||
{
|
||||
@@ -1101,8 +1102,13 @@ grub_xasprintf (const char *fmt, ...)
|
||||
@@ -1199,8 +1200,13 @@ grub_printf_fmt_check (const char *fmt, const char *fmt_expected)
|
||||
static void __attribute__ ((noreturn))
|
||||
grub_abort (void)
|
||||
{
|
||||
@ -55,7 +55,7 @@ index 1c560ea..04371ac 100644
|
||||
#endif
|
||||
diff --git a/grub-core/lib/arm64/backtrace.c b/grub-core/lib/arm64/backtrace.c
|
||||
new file mode 100644
|
||||
index 0000000..1079b53
|
||||
index 00000000000..1079b5380e1
|
||||
--- /dev/null
|
||||
+++ b/grub-core/lib/arm64/backtrace.c
|
||||
@@ -0,0 +1,62 @@
|
||||
@ -122,7 +122,7 @@ index 0000000..1079b53
|
||||
+}
|
||||
+
|
||||
diff --git a/grub-core/lib/backtrace.c b/grub-core/lib/backtrace.c
|
||||
index 825a880..c0ad6ab 100644
|
||||
index 825a8800e25..c0ad6ab8be1 100644
|
||||
--- a/grub-core/lib/backtrace.c
|
||||
+++ b/grub-core/lib/backtrace.c
|
||||
@@ -29,6 +29,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
@ -142,7 +142,7 @@ index 825a880..c0ad6ab 100644
|
||||
}
|
||||
|
||||
diff --git a/grub-core/lib/i386/backtrace.c b/grub-core/lib/i386/backtrace.c
|
||||
index c3e03c7..c67273d 100644
|
||||
index c3e03c7275c..c67273db3ae 100644
|
||||
--- a/grub-core/lib/i386/backtrace.c
|
||||
+++ b/grub-core/lib/i386/backtrace.c
|
||||
@@ -15,11 +15,23 @@
|
||||
@ -170,6 +170,3 @@ index c3e03c7..c67273d 100644
|
||||
#include <grub/mm.h>
|
||||
#include <grub/term.h>
|
||||
#include <grub/backtrace.h>
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
From 6d92979792752de9af962a75f399768c655ce92e Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Wed, 15 May 2013 16:47:33 -0400
|
||||
Subject: [PATCH 041/220] Don't draw a border around the menu
|
||||
|
||||
It looks cleaner without it.
|
||||
---
|
||||
grub-core/normal/menu_text.c | 43 -------------------------------------------
|
||||
1 file changed, 43 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
||||
index 452d55b..1ed2bd9 100644
|
||||
--- a/grub-core/normal/menu_text.c
|
||||
+++ b/grub-core/normal/menu_text.c
|
||||
@@ -108,47 +108,6 @@ grub_print_message_indented (const char *msg, int margin_left, int margin_right,
|
||||
grub_print_message_indented_real (msg, margin_left, margin_right, term, 0);
|
||||
}
|
||||
|
||||
-static void
|
||||
-draw_border (struct grub_term_output *term, const struct grub_term_screen_geometry *geo)
|
||||
-{
|
||||
- int i;
|
||||
-
|
||||
- grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
|
||||
-
|
||||
- grub_term_gotoxy (term, (struct grub_term_coordinate) { geo->first_entry_x - 1,
|
||||
- geo->first_entry_y - 1 });
|
||||
- grub_putcode (GRUB_UNICODE_CORNER_UL, term);
|
||||
- for (i = 0; i < geo->entry_width + 1; i++)
|
||||
- grub_putcode (GRUB_UNICODE_HLINE, term);
|
||||
- grub_putcode (GRUB_UNICODE_CORNER_UR, term);
|
||||
-
|
||||
- for (i = 0; i < geo->num_entries; i++)
|
||||
- {
|
||||
- grub_term_gotoxy (term, (struct grub_term_coordinate) { geo->first_entry_x - 1,
|
||||
- geo->first_entry_y + i });
|
||||
- grub_putcode (GRUB_UNICODE_VLINE, term);
|
||||
- grub_term_gotoxy (term,
|
||||
- (struct grub_term_coordinate) { geo->first_entry_x + geo->entry_width + 1,
|
||||
- geo->first_entry_y + i });
|
||||
- grub_putcode (GRUB_UNICODE_VLINE, term);
|
||||
- }
|
||||
-
|
||||
- grub_term_gotoxy (term,
|
||||
- (struct grub_term_coordinate) { geo->first_entry_x - 1,
|
||||
- geo->first_entry_y - 1 + geo->num_entries + 1 });
|
||||
- grub_putcode (GRUB_UNICODE_CORNER_LL, term);
|
||||
- for (i = 0; i < geo->entry_width + 1; i++)
|
||||
- grub_putcode (GRUB_UNICODE_HLINE, term);
|
||||
- grub_putcode (GRUB_UNICODE_CORNER_LR, term);
|
||||
-
|
||||
- grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
|
||||
-
|
||||
- grub_term_gotoxy (term,
|
||||
- (struct grub_term_coordinate) { geo->first_entry_x - 1,
|
||||
- (geo->first_entry_y - 1 + geo->num_entries
|
||||
- + GRUB_TERM_MARGIN + 1) });
|
||||
-}
|
||||
-
|
||||
static int
|
||||
print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
|
||||
{
|
||||
@@ -406,8 +365,6 @@ grub_menu_init_page (int nested, int edit,
|
||||
|
||||
grub_term_normal_color = grub_color_menu_normal;
|
||||
grub_term_highlight_color = grub_color_menu_highlight;
|
||||
- if (geo->border)
|
||||
- draw_border (term, geo);
|
||||
grub_term_normal_color = old_color_normal;
|
||||
grub_term_highlight_color = old_color_highlight;
|
||||
geo->timeout_y = geo->first_entry_y + geo->num_entries
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From b059bbecd37f4111fa514a6b7bbda9910325a0f5 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 23 Sep 2014 09:58:49 -0400
|
||||
Subject: [PATCH 069/220] Fix up some man pages rpmdiff noticed.
|
||||
Subject: [PATCH] Fix up some man pages rpmdiff noticed.
|
||||
|
||||
---
|
||||
configure.ac | 2 ++
|
||||
@ -13,10 +13,10 @@ Subject: [PATCH 069/220] Fix up some man pages rpmdiff noticed.
|
||||
create mode 100644 util/grub-syslinux2cfg.1
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fc3c2b4..eb851b8 100644
|
||||
index 58e57a745fa..a0030632220 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -84,6 +84,7 @@ grub_TRANSFORM([grub-get-kernel-settings.3])
|
||||
@@ -87,6 +87,7 @@ grub_TRANSFORM([grub-get-kernel-settings.3])
|
||||
grub_TRANSFORM([grub-glue-efi.3])
|
||||
grub_TRANSFORM([grub-install.1])
|
||||
grub_TRANSFORM([grub-kbdcomp.3])
|
||||
@ -24,7 +24,7 @@ index fc3c2b4..eb851b8 100644
|
||||
grub_TRANSFORM([grub-menulst2cfg.1])
|
||||
grub_TRANSFORM([grub-mkconfig.1])
|
||||
grub_TRANSFORM([grub-mkfont.3])
|
||||
@@ -102,6 +103,7 @@ grub_TRANSFORM([grub-render-label.3])
|
||||
@@ -105,6 +106,7 @@ grub_TRANSFORM([grub-render-label.3])
|
||||
grub_TRANSFORM([grub-script-check.3])
|
||||
grub_TRANSFORM([grub-set-default.1])
|
||||
grub_TRANSFORM([grub-sparc64-setup.3])
|
||||
@ -34,7 +34,7 @@ index fc3c2b4..eb851b8 100644
|
||||
if test "x$TARGET_CFLAGS" = x; then
|
||||
diff --git a/util/grub-macbless.8 b/util/grub-macbless.8
|
||||
new file mode 100644
|
||||
index 0000000..ae842f3
|
||||
index 00000000000..ae842f3a606
|
||||
--- /dev/null
|
||||
+++ b/util/grub-macbless.8
|
||||
@@ -0,0 +1,26 @@
|
||||
@ -65,7 +65,7 @@ index 0000000..ae842f3
|
||||
+.SH SEE ALSO
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-mkimage.1 b/util/grub-mkimage.1
|
||||
index 4dea4f5..0eaaafe 100644
|
||||
index 4dea4f54597..0eaaafe505b 100644
|
||||
--- a/util/grub-mkimage.1
|
||||
+++ b/util/grub-mkimage.1
|
||||
@@ -17,7 +17,7 @@
|
||||
@ -79,7 +79,7 @@ index 4dea4f5..0eaaafe 100644
|
||||
.TP
|
||||
diff --git a/util/grub-syslinux2cfg.1 b/util/grub-syslinux2cfg.1
|
||||
new file mode 100644
|
||||
index 0000000..8530948
|
||||
index 00000000000..85309482718
|
||||
--- /dev/null
|
||||
+++ b/util/grub-syslinux2cfg.1
|
||||
@@ -0,0 +1,65 @@
|
||||
@ -148,6 +148,3 @@ index 0000000..8530948
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.BR "info grub"
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 13afb4d63420d8e1578efc8f5a3fe66c9c14e88a Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 9 Jul 2019 12:59:58 +0200
|
||||
Subject: [PATCH 071/220] Make our info pages say "grub2" where appropriate.
|
||||
Subject: [PATCH] Make our info pages say "grub2" where appropriate.
|
||||
|
||||
This needs to be hooked up to --program-transform=, but I haven't had
|
||||
time.
|
||||
@ -9,11 +9,11 @@ time.
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
docs/grub-dev.texi | 4 +-
|
||||
docs/grub.texi | 318 ++++++++++++++++++++++++++---------------------------
|
||||
2 files changed, 161 insertions(+), 161 deletions(-)
|
||||
docs/grub.texi | 321 ++++++++++++++++++++++++++++-------------------------
|
||||
2 files changed, 171 insertions(+), 154 deletions(-)
|
||||
|
||||
diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
|
||||
index ee389fd..e3fed73 100644
|
||||
index 6c629a23e2d..19f708ee662 100644
|
||||
--- a/docs/grub-dev.texi
|
||||
+++ b/docs/grub-dev.texi
|
||||
@@ -1,7 +1,7 @@
|
||||
@ -35,7 +35,7 @@ index ee389fd..e3fed73 100644
|
||||
|
||||
@setchapternewpage odd
|
||||
diff --git a/docs/grub.texi b/docs/grub.texi
|
||||
index 221064b..960e5f3 100644
|
||||
index 69f08d289f9..0615d0ed97e 100644
|
||||
--- a/docs/grub.texi
|
||||
+++ b/docs/grub.texi
|
||||
@@ -1,7 +1,7 @@
|
||||
@ -212,7 +212,7 @@ index 221064b..960e5f3 100644
|
||||
# @kbd{umount /mnt}
|
||||
@end group
|
||||
@end example
|
||||
@@ -689,16 +689,16 @@ floppy instead of exposing the USB drive as a hard disk (they call it
|
||||
@@ -689,30 +689,37 @@ floppy instead of exposing the USB drive as a hard disk (they call it
|
||||
@example
|
||||
# @kbd{losetup /dev/loop0 /dev/sdb1}
|
||||
# @kbd{mount /dev/loop0 /mnt/usb}
|
||||
@ -223,17 +223,14 @@ index 221064b..960e5f3 100644
|
||||
This install doesn't conflict with standard install as long as they are in
|
||||
separate directories.
|
||||
|
||||
-Note that @command{grub-install} is actually just a shell script and the
|
||||
-real task is done by other tools such as @command{grub-mkimage}. Therefore,
|
||||
+Note that @command{grub2-install} is actually just a shell script and the
|
||||
+real task is done by other tools such as @command{grub2-mkimage}. Therefore,
|
||||
you may run those commands directly to install GRUB, without using
|
||||
-@command{grub-install}. Don't do that, however, unless you are very familiar
|
||||
+you may run those commands directly to install GRUB, without using
|
||||
+@command{grub2-install}. Don't do that, however, unless you are very familiar
|
||||
with the internals of GRUB. Installing a boot loader on a running OS may be
|
||||
extremely dangerous.
|
||||
|
||||
@@ -706,20 +706,20 @@ On EFI systems for fixed disk install you have to mount EFI System Partition.
|
||||
+with the internals of GRUB. Installing a boot loader on a running OS may be
|
||||
+extremely dangerous.
|
||||
+
|
||||
On EFI systems for fixed disk install you have to mount EFI System Partition.
|
||||
If you mount it at @file{/boot/efi} then you don't need any special arguments:
|
||||
|
||||
@example
|
||||
@ -257,7 +254,7 @@ index 221064b..960e5f3 100644
|
||||
@end example
|
||||
|
||||
@node Making a GRUB bootable CD-ROM
|
||||
@@ -739,10 +739,10 @@ usually also need to include a configuration file @file{grub.cfg} and some
|
||||
@@ -732,10 +739,10 @@ usually also need to include a configuration file @file{grub.cfg} and some
|
||||
other GRUB modules.
|
||||
|
||||
To make a simple generic GRUB rescue CD, you can use the
|
||||
@ -270,7 +267,7 @@ index 221064b..960e5f3 100644
|
||||
@end example
|
||||
|
||||
You will often need to include other files in your image. To do this, first
|
||||
@@ -765,7 +765,7 @@ directory @file{iso/}.
|
||||
@@ -758,7 +765,7 @@ directory @file{iso/}.
|
||||
Finally, make the image:
|
||||
|
||||
@example
|
||||
@ -279,7 +276,7 @@ index 221064b..960e5f3 100644
|
||||
@end example
|
||||
|
||||
This produces a file named @file{grub.iso}, which then can be burned
|
||||
@@ -781,7 +781,7 @@ storage devices.
|
||||
@@ -774,7 +781,7 @@ storage devices.
|
||||
@node Device map
|
||||
@section The map between BIOS drives and OS devices
|
||||
|
||||
@ -288,7 +285,7 @@ index 221064b..960e5f3 100644
|
||||
etc.) read it to map BIOS drives to OS devices. This file consists of lines
|
||||
like this:
|
||||
|
||||
@@ -1225,23 +1225,23 @@ need to write the whole thing by hand.
|
||||
@@ -1254,23 +1261,23 @@ need to write the whole thing by hand.
|
||||
@node Simple configuration
|
||||
@section Simple configuration handling
|
||||
|
||||
@ -317,7 +314,7 @@ index 221064b..960e5f3 100644
|
||||
valid POSIX shell input; normally, it will just be a sequence of
|
||||
@samp{KEY=value} lines, but if the value contains spaces or other special
|
||||
characters then it must be quoted. For example:
|
||||
@@ -1279,7 +1279,7 @@ works it's not recommended since titles often contain unstable device names
|
||||
@@ -1308,7 +1315,7 @@ works it's not recommended since titles often contain unstable device names
|
||||
and may be translated
|
||||
|
||||
If you set this to @samp{saved}, then the default menu entry will be that
|
||||
@ -326,7 +323,7 @@ index 221064b..960e5f3 100644
|
||||
the environment block, which may not be available in all situations
|
||||
(@pxref{Environment block}).
|
||||
|
||||
@@ -1290,7 +1290,7 @@ If this option is set to @samp{true}, then, when an entry is selected, save
|
||||
@@ -1319,7 +1326,7 @@ If this option is set to @samp{true}, then, when an entry is selected, save
|
||||
it as a new default entry for use by future runs of GRUB. This is only
|
||||
useful if @samp{GRUB_DEFAULT=saved}; it is a separate option because
|
||||
@samp{GRUB_DEFAULT=saved} is useful without this option, in conjunction with
|
||||
@ -335,7 +332,7 @@ index 221064b..960e5f3 100644
|
||||
This option relies on the environment block, which may not be available in
|
||||
all situations (@pxref{Environment block}).
|
||||
|
||||
@@ -1420,7 +1420,7 @@ intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode
|
||||
@@ -1449,7 +1456,7 @@ intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode
|
||||
@end example
|
||||
|
||||
@item GRUB_DISABLE_LINUX_UUID
|
||||
@ -344,7 +341,7 @@ index 221064b..960e5f3 100644
|
||||
universally-unique identifiers (UUIDs) to identify the root filesystem to
|
||||
the Linux kernel, using a @samp{root=UUID=...} kernel parameter. This is
|
||||
usually more reliable, but in some cases it may not be appropriate. To
|
||||
@@ -1442,7 +1442,7 @@ If this option is set to @samp{true}, disable the generation of recovery
|
||||
@@ -1471,7 +1478,7 @@ If this option is set to @samp{true}, disable the generation of recovery
|
||||
mode menu entries.
|
||||
|
||||
@item GRUB_DISABLE_UUID
|
||||
@ -353,7 +350,7 @@ index 221064b..960e5f3 100644
|
||||
universally-unique identifiers (UUIDs) to identify various filesystems to
|
||||
search for files. This is usually more reliable, but in some cases it may
|
||||
not be appropriate. To disable this use of UUIDs, set this option to
|
||||
@@ -1451,12 +1451,12 @@ not be appropriate. To disable this use of UUIDs, set this option to
|
||||
@@ -1482,12 +1489,12 @@ not be appropriate. To disable this use of UUIDs, set this option to
|
||||
@item GRUB_VIDEO_BACKEND
|
||||
If graphical video support is required, either because the @samp{gfxterm}
|
||||
graphical terminal is in use or because @samp{GRUB_GFXPAYLOAD_LINUX} is set,
|
||||
@ -369,7 +366,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@item GRUB_GFXMODE
|
||||
Set the resolution used on the @samp{gfxterm} graphical terminal. Note that
|
||||
@@ -1488,7 +1488,7 @@ boot sequence. If you have problems, set this option to @samp{text} and
|
||||
@@ -1519,7 +1526,7 @@ boot sequence. If you have problems, set this option to @samp{text} and
|
||||
GRUB will tell Linux to boot in normal text mode.
|
||||
|
||||
@item GRUB_DISABLE_OS_PROBER
|
||||
@ -378,7 +375,7 @@ index 221064b..960e5f3 100644
|
||||
@command{os-prober} program, if installed, to discover other operating
|
||||
systems installed on the same system and generate appropriate menu entries
|
||||
for them. Set this option to @samp{true} to disable this.
|
||||
@@ -1498,7 +1498,7 @@ List of space-separated FS UUIDs of filesystems to be ignored from os-prober
|
||||
@@ -1529,7 +1536,7 @@ List of space-separated FS UUIDs of filesystems to be ignored from os-prober
|
||||
output. For efi chainloaders it's <UUID>@@<EFI FILE>
|
||||
|
||||
@item GRUB_DISABLE_SUBMENU
|
||||
@ -387,7 +384,7 @@ index 221064b..960e5f3 100644
|
||||
the kernel with highest version number and put all other found kernels
|
||||
or alternative menu entries for recovery mode in submenu. For entries returned
|
||||
by @command{os-prober} first entry will be put on top level and all others
|
||||
@@ -1506,11 +1506,11 @@ in submenu. If this option is set to @samp{y}, flat menu with all entries
|
||||
@@ -1537,11 +1544,11 @@ in submenu. If this option is set to @samp{true}, flat menu with all entries
|
||||
on top level will be generated instead. Changing this option will require
|
||||
changing existing values of @samp{GRUB_DEFAULT}, @samp{fallback} (@pxref{fallback})
|
||||
and @samp{default} (@pxref{default}) environment variables as well as saved
|
||||
@ -402,7 +399,7 @@ index 221064b..960e5f3 100644
|
||||
check for encrypted disks and generate additional commands needed to access
|
||||
them during boot. Note that in this case unattended boot is not possible
|
||||
because GRUB will wait for passphrase to unlock encrypted container.
|
||||
@@ -1569,7 +1569,7 @@ confusing @samp{GRUB_TIMEOUT_STYLE=countdown} or
|
||||
@@ -1600,7 +1607,7 @@ confusing @samp{GRUB_TIMEOUT_STYLE=countdown} or
|
||||
|
||||
@end table
|
||||
|
||||
@ -411,7 +408,7 @@ index 221064b..960e5f3 100644
|
||||
edit the scripts in @file{/etc/grub.d} directly.
|
||||
@file{/etc/grub.d/40_custom} is particularly useful for adding entire custom
|
||||
menu entries; simply type the menu entries you want to add at the end of
|
||||
@@ -1831,7 +1831,7 @@ images as well.
|
||||
@@ -1862,7 +1869,7 @@ images as well.
|
||||
Mount this partition on/mnt/boot and disable GRUB in all OSes and manually
|
||||
install self-compiled latest GRUB with:
|
||||
|
||||
@ -420,7 +417,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
In all the OSes install GRUB tools but disable installing GRUB in bootsector,
|
||||
so you'll have menu.lst and grub.cfg available for use. Also disable os-prober
|
||||
@@ -1841,20 +1841,20 @@ use by setting:
|
||||
@@ -1872,20 +1879,20 @@ use by setting:
|
||||
|
||||
in /etc/default/grub
|
||||
|
||||
@ -444,7 +441,7 @@ index 221064b..960e5f3 100644
|
||||
@}
|
||||
|
||||
menuentry "Windows XP" @{
|
||||
@@ -1917,15 +1917,15 @@ GRUB supports embedding a configuration file directly into the core image,
|
||||
@@ -1948,15 +1955,15 @@ GRUB supports embedding a configuration file directly into the core image,
|
||||
so that it is loaded before entering normal mode. This is useful, for
|
||||
example, when it is not straightforward to find the real configuration file,
|
||||
or when you need to debug problems with loading that file.
|
||||
@ -463,7 +460,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
After the embedded configuration file (if any) is executed, GRUB will load
|
||||
the @samp{normal} module (@pxref{normal}), which will then read the real
|
||||
@@ -1960,13 +1960,13 @@ included in the core image:
|
||||
@@ -1991,13 +1998,13 @@ included in the core image:
|
||||
@example
|
||||
@group
|
||||
search.fs_label grub root
|
||||
@ -481,7 +478,7 @@ index 221064b..960e5f3 100644
|
||||
else
|
||||
echo "Could not find an example configuration file!"
|
||||
fi
|
||||
@@ -2490,7 +2490,7 @@ grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i38
|
||||
@@ -2521,7 +2528,7 @@ grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i38
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@ -490,7 +487,7 @@ index 221064b..960e5f3 100644
|
||||
server.
|
||||
|
||||
The grub.cfg file is placed in the same directory as the path output by
|
||||
@@ -2675,7 +2675,7 @@ team are:
|
||||
@@ -2715,7 +2722,7 @@ team are:
|
||||
@end table
|
||||
|
||||
To take full advantage of this function, install GRUB into the MBR
|
||||
@ -499,7 +496,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
If you have a laptop which has a similar feature and not in the above list
|
||||
could you figure your address and contribute?
|
||||
@@ -2736,7 +2736,7 @@ bytes.
|
||||
@@ -2776,7 +2783,7 @@ bytes.
|
||||
The sole function of @file{boot.img} is to read the first sector of the core
|
||||
image from a local disk and jump to it. Because of the size restriction,
|
||||
@file{boot.img} cannot understand any file system structure, so
|
||||
@ -508,7 +505,7 @@ index 221064b..960e5f3 100644
|
||||
core image into @file{boot.img} when installing GRUB.
|
||||
|
||||
@item diskboot.img
|
||||
@@ -2766,7 +2766,7 @@ images.
|
||||
@@ -2806,7 +2813,7 @@ images.
|
||||
|
||||
@item core.img
|
||||
This is the core image of GRUB. It is built dynamically from the kernel
|
||||
@ -517,7 +514,7 @@ index 221064b..960e5f3 100644
|
||||
program. Usually, it contains enough modules to access @file{/boot/grub},
|
||||
and loads everything else (including menu handling, the ability to load
|
||||
target operating systems, and so on) from the file system at run-time. The
|
||||
@@ -2818,7 +2818,7 @@ GRUB 2 has no single Stage 2 image. Instead, it loads modules from
|
||||
@@ -2858,7 +2865,7 @@ GRUB 2 has no single Stage 2 image. Instead, it loads modules from
|
||||
In GRUB 2, images for booting from CD-ROM drives are now constructed using
|
||||
@file{cdboot.img} and @file{core.img}, making sure that the core image
|
||||
contains the @samp{iso9660} module. It is usually best to use the
|
||||
@ -526,7 +523,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@item nbgrub
|
||||
There is as yet no equivalent for @file{nbgrub} in GRUB 2; it was used by
|
||||
@@ -2974,8 +2974,8 @@ There are two ways to specify files, by @dfn{absolute file name} and by
|
||||
@@ -3014,8 +3021,8 @@ There are two ways to specify files, by @dfn{absolute file name} and by
|
||||
|
||||
An absolute file name resembles a Unix absolute file name, using
|
||||
@samp{/} for the directory separator (not @samp{\} as in DOS). One
|
||||
@ -537,7 +534,7 @@ index 221064b..960e5f3 100644
|
||||
disk. If you omit the device name in an absolute file name, GRUB uses
|
||||
GRUB's @dfn{root device} implicitly. So if you set the root device to,
|
||||
say, @samp{(hd1,1)} by the command @samp{set root=(hd1,1)} (@pxref{set}),
|
||||
@@ -2983,8 +2983,8 @@ then @code{/boot/kernel} is the same as @code{(hd1,1)/boot/kernel}.
|
||||
@@ -3023,8 +3030,8 @@ then @code{/boot/kernel} is the same as @code{(hd1,1)/boot/kernel}.
|
||||
|
||||
On ZFS filesystem the first path component must be
|
||||
@var{volume}@samp{@@}[@var{snapshot}].
|
||||
@ -548,7 +545,7 @@ index 221064b..960e5f3 100644
|
||||
@samp{snap-129}. Trailing @samp{@@} after volume name is mandatory even if
|
||||
snapshot name is omitted.
|
||||
|
||||
@@ -3387,7 +3387,7 @@ The more recent release of Minix would then be identified as
|
||||
@@ -3427,7 +3434,7 @@ The more recent release of Minix would then be identified as
|
||||
@samp{other>minix>minix-3.4.0}.
|
||||
|
||||
This variable is often set by @samp{GRUB_DEFAULT} (@pxref{Simple
|
||||
@ -557,7 +554,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
|
||||
@node fallback
|
||||
@@ -3477,7 +3477,7 @@ If this variable is set, it names the language code that the
|
||||
@@ -3517,7 +3524,7 @@ If this variable is set, it names the language code that the
|
||||
example, French would be named as @samp{fr}, and Simplified Chinese as
|
||||
@samp{zh_CN}.
|
||||
|
||||
@ -566,7 +563,7 @@ index 221064b..960e5f3 100644
|
||||
reasonable default for this variable based on the system locale.
|
||||
|
||||
|
||||
@@ -3485,10 +3485,10 @@ reasonable default for this variable based on the system locale.
|
||||
@@ -3525,10 +3532,10 @@ reasonable default for this variable based on the system locale.
|
||||
@subsection locale_dir
|
||||
|
||||
If this variable is set, it names the directory where translation files may
|
||||
@ -579,7 +576,7 @@ index 221064b..960e5f3 100644
|
||||
default for this variable if internationalization is needed and any
|
||||
translation files are available.
|
||||
|
||||
@@ -3606,7 +3606,7 @@ input. The default is not to pause output.
|
||||
@@ -3646,7 +3653,7 @@ input. The default is not to pause output.
|
||||
|
||||
The location of the @samp{/boot/grub} directory as an absolute file name
|
||||
(@pxref{File name syntax}). This is normally set by GRUB at startup based
|
||||
@ -588,7 +585,7 @@ index 221064b..960e5f3 100644
|
||||
dynamically loaded from this directory, so it must be set correctly in order
|
||||
for many parts of GRUB to work.
|
||||
|
||||
@@ -3697,17 +3697,17 @@ GRUB provides an ``environment block'' which can be used to save a small
|
||||
@@ -3737,17 +3744,17 @@ GRUB provides an ``environment block'' which can be used to save a small
|
||||
amount of state.
|
||||
|
||||
The environment block is a preallocated 1024-byte file, which normally lives
|
||||
@ -609,7 +606,7 @@ index 221064b..960e5f3 100644
|
||||
@samp{GRUB_SAVEDEFAULT} (@pxref{Simple configuration}).
|
||||
|
||||
|
||||
@@ -4398,7 +4398,7 @@ Translate @var{string} into the current language.
|
||||
@@ -4476,7 +4483,7 @@ Translate @var{string} into the current language.
|
||||
|
||||
The current language code is stored in the @samp{lang} variable in GRUB's
|
||||
environment (@pxref{lang}). Translation files in MO format are read from
|
||||
@ -618,7 +615,7 @@ index 221064b..960e5f3 100644
|
||||
@end deffn
|
||||
|
||||
|
||||
@@ -4793,7 +4793,7 @@ Define a user named @var{user} with password @var{clear-password}.
|
||||
@@ -4871,7 +4878,7 @@ Define a user named @var{user} with password @var{clear-password}.
|
||||
|
||||
@deffn Command password_pbkdf2 user hashed-password
|
||||
Define a user named @var{user} with password hash @var{hashed-password}.
|
||||
@ -627,7 +624,7 @@ index 221064b..960e5f3 100644
|
||||
to generate password hashes. @xref{Security}.
|
||||
@end deffn
|
||||
|
||||
@@ -5651,8 +5651,8 @@ The @samp{password} (@pxref{password}) and @samp{password_pbkdf2}
|
||||
@@ -5814,8 +5821,8 @@ The @samp{password} (@pxref{password}) and @samp{password_pbkdf2}
|
||||
which has an associated password. @samp{password} sets the password in
|
||||
plain text, requiring @file{grub.cfg} to be secure; @samp{password_pbkdf2}
|
||||
sets the password hashed using the Password-Based Key Derivation Function
|
||||
@ -638,7 +635,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
In order to enable authentication support, the @samp{superusers} environment
|
||||
variable must be set to a list of usernames, separated by any of spaces,
|
||||
@@ -5696,7 +5696,7 @@ menuentry "May be run by user1 or a superuser" --users user1 @{
|
||||
@@ -5860,7 +5867,7 @@ menuentry "May be run by user1 or a superuser" --users user1 @{
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@ -647,28 +644,26 @@ index 221064b..960e5f3 100644
|
||||
generating configuration files with authentication. You can use
|
||||
@file{/etc/grub.d/40_custom} to add simple superuser authentication, by
|
||||
adding @kbd{set superusers=} and @kbd{password} or @kbd{password_pbkdf2}
|
||||
@@ -5721,15 +5721,15 @@ verified with a public key currently trusted by GRUB
|
||||
validation fails, then file @file{foo} cannot be opened. This failure
|
||||
may halt or otherwise impact the boot process.
|
||||
@@ -5887,7 +5894,17 @@ may halt or otherwise impact the boot process.
|
||||
|
||||
-@comment Unfortunately --pubkey is not yet supported by grub-install,
|
||||
-@comment but we should not bring up internal detail grub-mkimage here
|
||||
An initial trusted public key can be embedded within the GRUB @file{core.img}
|
||||
using the @code{--pubkey} option to @command{grub-install}
|
||||
-(@pxref{Invoking grub-install}).
|
||||
+(@pxref{Invoking grub2-install}).
|
||||
+
|
||||
+@comment Unfortunately --pubkey is not yet supported by grub2-install,
|
||||
+@comment but we should not bring up internal detail grub2-mkimage here
|
||||
@comment in the user guide (as opposed to developer's manual).
|
||||
|
||||
@comment An initial trusted public key can be embedded within the GRUB
|
||||
@comment @file{core.img} using the @code{--pubkey} option to
|
||||
-@comment @command{grub-mkimage} (@pxref{Invoking grub-install}). Presently it
|
||||
-@comment is necessary to write a custom wrapper around @command{grub-mkimage}
|
||||
-@comment using the @code{--grub-mkimage} flag to @command{grub-install}.
|
||||
+@comment in the user guide (as opposed to developer's manual).
|
||||
+
|
||||
+@comment An initial trusted public key can be embedded within the GRUB
|
||||
+@comment @file{core.img} using the @code{--pubkey} option to
|
||||
+@comment @command{grub2-mkimage} (@pxref{Invoking grub2-install}). Presently it
|
||||
+@comment is necessary to write a custom wrapper around @command{grub2-mkimage}
|
||||
+@comment using the @code{--grub-mkimage} flag to @command{grub2-install}.
|
||||
|
||||
GRUB uses GPG-style detached signatures (meaning that a file
|
||||
@file{foo.sig} will be produced when file @file{foo} is signed), and
|
||||
@@ -5749,8 +5749,8 @@ gpg --detach-sign /path/to/file
|
||||
@@ -5907,8 +5924,8 @@ gpg --detach-sign /path/to/file
|
||||
For successful validation of all of GRUB's subcomponents and the
|
||||
loaded OS kernel, they must all be signed. One way to accomplish this
|
||||
is the following (after having already produced the desired
|
||||
@ -679,7 +674,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@example
|
||||
@group
|
||||
@@ -5772,7 +5772,7 @@ See also: @ref{check_signatures}, @ref{verify_detached}, @ref{trust},
|
||||
@@ -5930,7 +5947,7 @@ See also: @ref{check_signatures}, @ref{verify_detached}, @ref{trust},
|
||||
Note that internally signature enforcement is controlled by setting
|
||||
the environment variable @code{check_signatures} equal to
|
||||
@code{enforce}. Passing one or more @code{--pubkey} options to
|
||||
@ -688,7 +683,7 @@ index 221064b..960e5f3 100644
|
||||
equal to @code{enforce} in @file{core.img} prior to processing any
|
||||
configuration files.
|
||||
|
||||
@@ -6189,10 +6189,10 @@ Required files are:
|
||||
@@ -6388,10 +6405,10 @@ Required files are:
|
||||
|
||||
GRUB's normal start-up procedure involves setting the @samp{prefix}
|
||||
environment variable to a value set in the core image by
|
||||
@ -701,7 +696,7 @@ index 221064b..960e5f3 100644
|
||||
things GRUB is supposed to do.
|
||||
|
||||
If, instead, you only get a rescue shell, this usually means that GRUB
|
||||
@@ -6218,8 +6218,8 @@ normal
|
||||
@@ -6417,8 +6434,8 @@ normal
|
||||
|
||||
However, any problem that leaves you in the rescue shell probably means that
|
||||
GRUB was not correctly installed. It may be more useful to try to reinstall
|
||||
@ -712,7 +707,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@itemize @bullet{}
|
||||
@item
|
||||
@@ -6231,7 +6231,7 @@ is usually better to use UUIDs or file system labels and avoid depending on
|
||||
@@ -6430,7 +6447,7 @@ is usually better to use UUIDs or file system labels and avoid depending on
|
||||
drive ordering entirely.
|
||||
|
||||
@item
|
||||
@ -721,7 +716,7 @@ index 221064b..960e5f3 100644
|
||||
to a partition but GRUB has already been installed in the master boot
|
||||
record, then the GRUB installation in the partition will be ignored.
|
||||
|
||||
@@ -6262,21 +6262,21 @@ entry which claims partition start at block 0. This change will not hamper
|
||||
@@ -6461,21 +6478,21 @@ entry which claims partition start at block 0. This change will not hamper
|
||||
bootability on other machines.
|
||||
|
||||
|
||||
@ -749,7 +744,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@table @option
|
||||
@item --help
|
||||
@@ -6292,13 +6292,13 @@ separate partition or a removable disk.
|
||||
@@ -6491,13 +6508,13 @@ separate partition or a removable disk.
|
||||
If this option is not specified then it defaults to @file{/boot}, so
|
||||
|
||||
@example
|
||||
@ -765,7 +760,7 @@ index 221064b..960e5f3 100644
|
||||
@end example
|
||||
|
||||
Here is an example in which you have a separate @dfn{boot} partition which is
|
||||
@@ -6306,16 +6306,16 @@ mounted on
|
||||
@@ -6505,16 +6522,16 @@ mounted on
|
||||
@file{/mnt/boot}:
|
||||
|
||||
@example
|
||||
@ -785,7 +780,7 @@ index 221064b..960e5f3 100644
|
||||
extra space in the bootloader embedding area for Reed-Solomon
|
||||
error-correcting codes. This enables GRUB to still boot successfully
|
||||
if some blocks are corrupted. The exact amount of protection offered
|
||||
@@ -6328,17 +6328,17 @@ installation}) where GRUB does not reside in any unpartitioned space
|
||||
@@ -6527,17 +6544,17 @@ installation}) where GRUB does not reside in any unpartitioned space
|
||||
outside of the MBR. Disable the Reed-Solomon codes with this option.
|
||||
@end table
|
||||
|
||||
@ -808,7 +803,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@table @option
|
||||
@item --help
|
||||
@@ -6354,17 +6354,17 @@ it to standard output.
|
||||
@@ -6553,17 +6570,17 @@ it to standard output.
|
||||
@end table
|
||||
|
||||
|
||||
@ -830,7 +825,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@table @option
|
||||
@item -c @var{number}
|
||||
@@ -6382,23 +6382,23 @@ Length of the salt. Defaults to 64.
|
||||
@@ -6581,23 +6598,23 @@ Length of the salt. Defaults to 64.
|
||||
@end table
|
||||
|
||||
|
||||
@ -860,7 +855,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@table @option
|
||||
@item --help
|
||||
@@ -6409,17 +6409,17 @@ Print the version number of GRUB and exit.
|
||||
@@ -6608,17 +6625,17 @@ Print the version number of GRUB and exit.
|
||||
@end table
|
||||
|
||||
|
||||
@ -882,7 +877,7 @@ index 221064b..960e5f3 100644
|
||||
passed on directly to @command{xorriso} in @command{mkisofs} emulation mode.
|
||||
Options passed to @command{xorriso} will normally be interpreted as
|
||||
@command{mkisofs} options; if the option @samp{--} is used, then anything
|
||||
@@ -6434,7 +6434,7 @@ mkdir -p disk/boot/grub
|
||||
@@ -6633,7 +6650,7 @@ mkdir -p disk/boot/grub
|
||||
grub-mkrescue -o grub.iso disk
|
||||
@end example
|
||||
|
||||
@ -891,7 +886,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@table @option
|
||||
@item --help
|
||||
@@ -6462,15 +6462,15 @@ Use @var{file} as the @command{xorriso} program, rather than the built-in
|
||||
@@ -6661,15 +6678,15 @@ Use @var{file} as the @command{xorriso} program, rather than the built-in
|
||||
default.
|
||||
|
||||
@item --grub-mkimage=@var{file}
|
||||
@ -911,7 +906,7 @@ index 221064b..960e5f3 100644
|
||||
system or file system image that GRUB understands, using GRUB's file system
|
||||
drivers via FUSE. (It is only available if FUSE development files were
|
||||
present when GRUB was built.) This has a number of uses:
|
||||
@@ -6502,13 +6502,13 @@ even if nobody has yet written a FUSE module specifically for that file
|
||||
@@ -6701,13 +6718,13 @@ even if nobody has yet written a FUSE module specifically for that file
|
||||
system type.
|
||||
@end itemize
|
||||
|
||||
@ -927,7 +922,7 @@ index 221064b..960e5f3 100644
|
||||
non-option arguments (if it is given more than one image, it will treat them
|
||||
as a RAID set), and also accepts the following options:
|
||||
|
||||
@@ -6530,13 +6530,13 @@ Show debugging output for conditions matching @var{string}.
|
||||
@@ -6729,13 +6746,13 @@ Show debugging output for conditions matching @var{string}.
|
||||
@item -K prompt|@var{file}
|
||||
@itemx --zfs-key=prompt|@var{file}
|
||||
Load a ZFS encryption key. If you use @samp{prompt} as the argument,
|
||||
@ -943,7 +938,7 @@ index 221064b..960e5f3 100644
|
||||
root of the supplied file system.
|
||||
|
||||
If @var{device} is just a number, then it will be treated as a partition
|
||||
@@ -6554,10 +6554,10 @@ Print verbose messages.
|
||||
@@ -6753,10 +6770,10 @@ Print verbose messages.
|
||||
@end table
|
||||
|
||||
|
||||
@ -957,7 +952,7 @@ index 221064b..960e5f3 100644
|
||||
or device.
|
||||
|
||||
@example
|
||||
@@ -6565,7 +6565,7 @@ grub-probe --target=fs /boot/grub
|
||||
@@ -6764,7 +6781,7 @@ grub-probe --target=fs /boot/grub
|
||||
grub-probe --target=drive --device /dev/sda1
|
||||
@end example
|
||||
|
||||
@ -966,7 +961,7 @@ index 221064b..960e5f3 100644
|
||||
argument, and also accepts the following options:
|
||||
|
||||
@table @option
|
||||
@@ -6578,16 +6578,16 @@ Print the version number of GRUB and exit.
|
||||
@@ -6777,16 +6794,16 @@ Print the version number of GRUB and exit.
|
||||
@item -d
|
||||
@itemx --device
|
||||
If this option is given, then the non-option argument is a system device
|
||||
@ -986,7 +981,7 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@item -t @var{target}
|
||||
@itemx --target=@var{target}
|
||||
@@ -6640,19 +6640,19 @@ Print verbose messages.
|
||||
@@ -6839,19 +6856,19 @@ Print verbose messages.
|
||||
@end table
|
||||
|
||||
|
||||
@ -1011,6 +1006,3 @@ index 221064b..960e5f3 100644
|
||||
|
||||
@table @option
|
||||
@item --help
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
From ead897508b29261ccf87aa46e778863a351737b2 Mon Sep 17 00:00:00 2001
|
||||
From: William Jon McCann <william.jon.mccann@gmail.com>
|
||||
Date: Fri, 7 Jun 2013 10:52:32 -0400
|
||||
Subject: [PATCH 042/220] Use the standard margin for the timeout string
|
||||
|
||||
So that it aligns with the other messages
|
||||
---
|
||||
grub-core/normal/menu_text.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
||||
index 1ed2bd9..7681f7d 100644
|
||||
--- a/grub-core/normal/menu_text.c
|
||||
+++ b/grub-core/normal/menu_text.c
|
||||
@@ -372,7 +372,7 @@ grub_menu_init_page (int nested, int edit,
|
||||
if (bottom_message)
|
||||
{
|
||||
grub_term_gotoxy (term,
|
||||
- (struct grub_term_coordinate) { GRUB_TERM_MARGIN,
|
||||
+ (struct grub_term_coordinate) { STANDARD_MARGIN,
|
||||
geo->timeout_y });
|
||||
|
||||
print_message (nested, edit, term, 0);
|
||||
@@ -407,14 +407,14 @@ menu_text_print_timeout (int timeout, void *dataptr)
|
||||
if (data->timeout_msg == TIMEOUT_UNKNOWN)
|
||||
{
|
||||
data->timeout_msg = grub_print_message_indented_real (msg_translated,
|
||||
- 3, 1, data->term, 1)
|
||||
+ STANDARD_MARGIN, 1, data->term, 1)
|
||||
<= data->geo.timeout_lines ? TIMEOUT_NORMAL : TIMEOUT_TERSE;
|
||||
if (data->timeout_msg == TIMEOUT_TERSE)
|
||||
{
|
||||
grub_free (msg_translated);
|
||||
msg_translated = grub_xasprintf (_("%ds"), timeout);
|
||||
if (grub_term_width (data->term) < 10)
|
||||
- data->timeout_msg = TIMEOUT_TERSE_NO_MARGIN;
|
||||
+ data->timeout_msg = STANDARD_MARGIN;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
From 86b5e0f596cd6266c48dd1829d97f0debb5dc5c6 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 24 May 2017 12:42:32 -0400
|
||||
Subject: [PATCH 073/220] macos: just build chainloader entries, don't try any
|
||||
xnu xnu.
|
||||
Subject: [PATCH] macos: just build chainloader entries, don't try any xnu xnu.
|
||||
|
||||
Since our bugs tell us that the xnu boot entries really just don't work
|
||||
most of the time, and they create piles of extra boot entries, because
|
||||
@ -21,7 +20,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 18 insertions(+), 60 deletions(-)
|
||||
|
||||
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
||||
index 9b8f596..13a3a6b 100644
|
||||
index 1b91c102f35..4b27bd20153 100644
|
||||
--- a/util/grub.d/30_os-prober.in
|
||||
+++ b/util/grub.d/30_os-prober.in
|
||||
@@ -42,68 +42,25 @@ if [ -z "${OSPROBED}" ] ; then
|
||||
@ -105,7 +104,7 @@ index 9b8f596..13a3a6b 100644
|
||||
}
|
||||
EOF
|
||||
}
|
||||
@@ -284,11 +241,12 @@ EOF
|
||||
@@ -292,11 +249,12 @@ EOF
|
||||
echo "$title_correction_code"
|
||||
;;
|
||||
macosx)
|
||||
@ -123,6 +122,3 @@ index 9b8f596..13a3a6b 100644
|
||||
;;
|
||||
hurd)
|
||||
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
From 6fa778275c0765f9d2535118ba0a37065dded86f Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Mon, 30 Jun 2014 14:16:46 -0400
|
||||
Subject: [PATCH 044/220] Don't munge raw spaces when we're doing our cmdline
|
||||
escaping (#923374)
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/lib/cmdline.c | 11 +----------
|
||||
1 file changed, 1 insertion(+), 10 deletions(-)
|
||||
|
||||
diff --git a/grub-core/lib/cmdline.c b/grub-core/lib/cmdline.c
|
||||
index e0fb0a9..8e2294d 100644
|
||||
--- a/grub-core/lib/cmdline.c
|
||||
+++ b/grub-core/lib/cmdline.c
|
||||
@@ -98,16 +98,7 @@ grub_create_loader_cmdline (int argc, char *argv[], char *buf,
|
||||
|
||||
while (*c)
|
||||
{
|
||||
- if (*c == ' ')
|
||||
- {
|
||||
- *buf++ = '\\';
|
||||
- *buf++ = 'x';
|
||||
- *buf++ = '2';
|
||||
- *buf++ = '0';
|
||||
- c++;
|
||||
- continue;
|
||||
- }
|
||||
- else if (*c == '\\' && *(c+1) == 'x' &&
|
||||
+ if (*c == '\\' && *(c+1) == 'x' &&
|
||||
is_hex(*(c+2)) && is_hex(*(c+3)))
|
||||
{
|
||||
*buf++ = *c++;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 4f25cd0b089dadc0be92e9226fd1eb9e2dda594f Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Mahoney <jeffm@suse.com>
|
||||
Date: Tue, 9 Jul 2019 13:39:45 +0200
|
||||
Subject: [PATCH 074/220] grub2/btrfs: Add ability to boot from subvolumes
|
||||
Subject: [PATCH] grub2/btrfs: Add ability to boot from subvolumes
|
||||
|
||||
This patch adds the ability to specify a different root on a btrfs
|
||||
filesystem too boot from other than the default one.
|
||||
@ -19,12 +19,12 @@ variable and loading the config file from the subvolume.
|
||||
|
||||
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 548 +++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
grub-core/fs/btrfs.c | 552 +++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
include/grub/btrfs.h | 1 +
|
||||
2 files changed, 531 insertions(+), 18 deletions(-)
|
||||
2 files changed, 533 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 48bd3d0..6823d97 100644
|
||||
index 63203034dfc..f1fff7385b5 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -38,6 +38,9 @@
|
||||
@ -36,8 +36,8 @@ index 48bd3d0..6823d97 100644
|
||||
+#include <grub/extcmd.h>
|
||||
#include <grub/crypto.h>
|
||||
#include <grub/diskfilter.h>
|
||||
|
||||
@@ -78,9 +81,11 @@ struct grub_btrfs_superblock
|
||||
#include <grub/safemath.h>
|
||||
@@ -79,9 +82,11 @@ struct grub_btrfs_superblock
|
||||
grub_uint64_t generation;
|
||||
grub_uint64_t root_tree;
|
||||
grub_uint64_t chunk_tree;
|
||||
@ -51,7 +51,7 @@ index 48bd3d0..6823d97 100644
|
||||
struct grub_btrfs_device this_device;
|
||||
char label[0x100];
|
||||
grub_uint8_t dummy4[0x100];
|
||||
@@ -120,6 +125,7 @@ struct grub_btrfs_data
|
||||
@@ -121,6 +126,7 @@ struct grub_btrfs_data
|
||||
grub_uint64_t exttree;
|
||||
grub_size_t extsize;
|
||||
struct grub_btrfs_extent_data *extent;
|
||||
@ -59,7 +59,7 @@ index 48bd3d0..6823d97 100644
|
||||
};
|
||||
|
||||
struct grub_btrfs_chunk_item
|
||||
@@ -188,6 +194,14 @@ struct grub_btrfs_leaf_descriptor
|
||||
@@ -191,6 +197,14 @@ struct grub_btrfs_leaf_descriptor
|
||||
} *data;
|
||||
};
|
||||
|
||||
@ -74,7 +74,7 @@ index 48bd3d0..6823d97 100644
|
||||
struct grub_btrfs_time
|
||||
{
|
||||
grub_int64_t sec;
|
||||
@@ -233,6 +247,14 @@ struct grub_btrfs_extent_data
|
||||
@@ -236,6 +250,14 @@ struct grub_btrfs_extent_data
|
||||
|
||||
#define GRUB_BTRFS_OBJECT_ID_CHUNK 0x100
|
||||
|
||||
@ -89,7 +89,7 @@ index 48bd3d0..6823d97 100644
|
||||
static grub_disk_addr_t superblock_sectors[] = { 64 * 2, 64 * 1024 * 2,
|
||||
256 * 1048576 * 2, 1048576ULL * 1048576ULL * 2
|
||||
};
|
||||
@@ -1153,6 +1175,62 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data, grub_disk_addr_t addr,
|
||||
@@ -1173,6 +1195,62 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data, grub_disk_addr_t addr,
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ index 48bd3d0..6823d97 100644
|
||||
static struct grub_btrfs_data *
|
||||
grub_btrfs_mount (grub_device_t dev)
|
||||
{
|
||||
@@ -1188,6 +1266,13 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
@@ -1208,6 +1286,13 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
data->devices_attached[0].dev = dev;
|
||||
data->devices_attached[0].id = data->sblock.this_device.device_id;
|
||||
|
||||
@ -166,10 +166,11 @@ index 48bd3d0..6823d97 100644
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -1654,6 +1739,91 @@ get_root (struct grub_btrfs_data *data, struct grub_btrfs_key *key,
|
||||
@@ -1673,6 +1758,91 @@ get_root (struct grub_btrfs_data *data, struct grub_btrfs_key *key,
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
+static grub_err_t
|
||||
+find_pathname(struct grub_btrfs_data *data, grub_uint64_t objectid,
|
||||
+ grub_uint64_t fs_root, const char *name, char **pathname)
|
||||
+{
|
||||
@ -254,11 +255,10 @@ index 48bd3d0..6823d97 100644
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static grub_err_t
|
||||
static grub_err_t
|
||||
find_path (struct grub_btrfs_data *data,
|
||||
const char *path, struct grub_btrfs_key *key,
|
||||
grub_uint64_t *tree, grub_uint8_t *type)
|
||||
@@ -1671,14 +1841,26 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1691,14 +1861,26 @@ find_path (struct grub_btrfs_data *data,
|
||||
char *origpath = NULL;
|
||||
unsigned symlinks_max = 32;
|
||||
|
||||
@ -289,7 +289,7 @@ index 48bd3d0..6823d97 100644
|
||||
while (1)
|
||||
{
|
||||
while (path[0] == '/')
|
||||
@@ -1851,9 +2033,21 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1871,9 +2053,21 @@ find_path (struct grub_btrfs_data *data,
|
||||
path = path_alloc = tmp;
|
||||
if (path[0] == '/')
|
||||
{
|
||||
@ -314,45 +314,50 @@ index 48bd3d0..6823d97 100644
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -2094,6 +2288,20 @@ grub_btrfs_read (grub_file_t file, char *buf, grub_size_t len)
|
||||
@@ -2114,18 +2308,10 @@ grub_btrfs_read (grub_file_t file, char *buf, grub_size_t len)
|
||||
data->tree, file->offset, buf, len);
|
||||
}
|
||||
|
||||
-static grub_err_t
|
||||
-grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
+static char *
|
||||
+btrfs_unparse_uuid(struct grub_btrfs_data *data)
|
||||
+{
|
||||
{
|
||||
- struct grub_btrfs_data *data;
|
||||
-
|
||||
- *uuid = NULL;
|
||||
-
|
||||
- data = grub_btrfs_mount (device);
|
||||
- if (!data)
|
||||
- return grub_errno;
|
||||
-
|
||||
- *uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
|
||||
+ return grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[0]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[1]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[2]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[3]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[4]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[5]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[6]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[7]));
|
||||
grub_be_to_cpu16 (data->sblock.uuid[0]),
|
||||
grub_be_to_cpu16 (data->sblock.uuid[1]),
|
||||
grub_be_to_cpu16 (data->sblock.uuid[2]),
|
||||
@@ -2134,6 +2320,20 @@ grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
grub_be_to_cpu16 (data->sblock.uuid[5]),
|
||||
grub_be_to_cpu16 (data->sblock.uuid[6]),
|
||||
grub_be_to_cpu16 (data->sblock.uuid[7]));
|
||||
+}
|
||||
+
|
||||
static grub_err_t
|
||||
grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
{
|
||||
@@ -2105,15 +2313,7 @@ grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
if (!data)
|
||||
return grub_errno;
|
||||
|
||||
- *uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[0]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[1]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[2]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[3]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[4]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[5]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[6]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[7]));
|
||||
+static grub_err_t
|
||||
+grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
+{
|
||||
+ struct grub_btrfs_data *data;
|
||||
+
|
||||
+ *uuid = NULL;
|
||||
+
|
||||
+ data = grub_btrfs_mount (device);
|
||||
+ if (!data)
|
||||
+ return grub_errno;
|
||||
+
|
||||
+ *uuid = btrfs_unparse_uuid(data);
|
||||
|
||||
grub_btrfs_unmount (data);
|
||||
|
||||
@@ -2170,6 +2370,242 @@ grub_btrfs_embed (grub_device_t device __attribute__ ((unused)),
|
||||
@@ -2190,6 +2390,242 @@ grub_btrfs_embed (grub_device_t device __attribute__ ((unused)),
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -595,7 +600,7 @@ index 48bd3d0..6823d97 100644
|
||||
static struct grub_fs grub_btrfs_fs = {
|
||||
.name = "btrfs",
|
||||
.fs_dir = grub_btrfs_dir,
|
||||
@@ -2185,12 +2621,88 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
@@ -2205,12 +2641,88 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -685,7 +690,7 @@ index 48bd3d0..6823d97 100644
|
||||
+
|
||||
+// vim: si et sw=2:
|
||||
diff --git a/include/grub/btrfs.h b/include/grub/btrfs.h
|
||||
index 9d93fb6..234ad97 100644
|
||||
index 9d93fb6c182..234ad976771 100644
|
||||
--- a/include/grub/btrfs.h
|
||||
+++ b/include/grub/btrfs.h
|
||||
@@ -29,6 +29,7 @@ enum
|
||||
@ -696,6 +701,3 @@ index 9d93fb6..234ad97 100644
|
||||
GRUB_BTRFS_ITEM_TYPE_CHUNK = 0xe4
|
||||
};
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 2f9525397b30997f24ff1e9fd508839b6d149da5 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Wed, 18 Dec 2013 09:57:04 +0000
|
||||
Subject: [PATCH 075/220] export btrfs_subvol and btrfs_subvolid
|
||||
Subject: [PATCH] export btrfs_subvol and btrfs_subvolid
|
||||
|
||||
We should export btrfs_subvol and btrfs_subvolid to have both visible
|
||||
to subsidiary configuration files loaded using configfile.
|
||||
@ -12,10 +12,10 @@ Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 6823d97..2d099b1 100644
|
||||
index f1fff7385b5..ad1b56b716d 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -2694,6 +2694,8 @@ GRUB_MOD_INIT (btrfs)
|
||||
@@ -2714,6 +2714,8 @@ GRUB_MOD_INIT (btrfs)
|
||||
subvol_set_env);
|
||||
grub_register_variable_hook ("btrfs_subvolid", subvolid_get_env,
|
||||
subvolid_set_env);
|
||||
@ -24,6 +24,3 @@ index 6823d97..2d099b1 100644
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI (btrfs)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,52 +0,0 @@
|
||||
From a71ee9f8f976cc09c301c8c1ceb8ca0859880130 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 18 Feb 2014 09:37:49 -0500
|
||||
Subject: [PATCH 046/220] Don't emit "Booting ..." message.
|
||||
|
||||
UI team still hates this stuff, so we're disabling it for RHEL 7.
|
||||
|
||||
Resolves: rhbz#1023142
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/normal/menu.c | 4 +++-
|
||||
grub-core/normal/menu_entry.c | 3 ---
|
||||
2 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
|
||||
index 9175ad2..783bde5 100644
|
||||
--- a/grub-core/normal/menu.c
|
||||
+++ b/grub-core/normal/menu.c
|
||||
@@ -839,12 +839,14 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
||||
|
||||
/* Callback invoked immediately before a menu entry is executed. */
|
||||
static void
|
||||
-notify_booting (grub_menu_entry_t entry,
|
||||
+notify_booting (grub_menu_entry_t __attribute__((unused)) entry,
|
||||
void *userdata __attribute__((unused)))
|
||||
{
|
||||
+#if 0
|
||||
grub_printf (" ");
|
||||
grub_printf_ (N_("Booting `%s'"), entry->title);
|
||||
grub_printf ("\n\n");
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Callback invoked when a default menu entry executed because of a timeout
|
||||
diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c
|
||||
index cdf3590..5785f67 100644
|
||||
--- a/grub-core/normal/menu_entry.c
|
||||
+++ b/grub-core/normal/menu_entry.c
|
||||
@@ -1167,9 +1167,6 @@ run (struct screen *screen)
|
||||
char *dummy[1] = { NULL };
|
||||
|
||||
grub_cls ();
|
||||
- grub_printf (" ");
|
||||
- grub_printf_ (N_("Booting a command list"));
|
||||
- grub_printf ("\n\n");
|
||||
|
||||
errs_before = grub_err_printed_errors;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,17 +1,19 @@
|
||||
From 698e60b157eaa58d81150e74a3402a38047a9314 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Thu, 21 Aug 2014 03:39:11 +0000
|
||||
Subject: [PATCH 076/220] grub2-btrfs-03-follow_default
|
||||
Subject: [PATCH] grub2-btrfs-03-follow_default
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 107 ++++++++++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 76 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 2d099b1..2db89f7 100644
|
||||
index ad1b56b716d..113c1f746c9 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -1236,6 +1236,7 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
@@ -1256,6 +1256,7 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
{
|
||||
struct grub_btrfs_data *data;
|
||||
grub_err_t err;
|
||||
@ -19,7 +21,7 @@ index 2d099b1..2db89f7 100644
|
||||
|
||||
if (!dev->disk)
|
||||
{
|
||||
@@ -1266,11 +1267,14 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
@@ -1286,11 +1287,14 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
data->devices_attached[0].dev = dev;
|
||||
data->devices_attached[0].id = data->sblock.this_device.device_id;
|
||||
|
||||
@ -38,7 +40,7 @@ index 2d099b1..2db89f7 100644
|
||||
}
|
||||
|
||||
return data;
|
||||
@@ -1835,24 +1839,39 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1855,24 +1859,39 @@ find_path (struct grub_btrfs_data *data,
|
||||
grub_size_t allocated = 0;
|
||||
struct grub_btrfs_dir_item *direl = NULL;
|
||||
struct grub_btrfs_key key_out;
|
||||
@ -85,7 +87,7 @@ index 2d099b1..2db89f7 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1863,15 +1882,23 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1883,15 +1902,23 @@ find_path (struct grub_btrfs_data *data,
|
||||
|
||||
while (1)
|
||||
{
|
||||
@ -118,7 +120,7 @@ index 2d099b1..2db89f7 100644
|
||||
|
||||
if (*type != GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY)
|
||||
{
|
||||
@@ -1882,7 +1909,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1902,7 +1929,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
|
||||
if (ctokenlen == 1 && ctoken[0] == '.')
|
||||
{
|
||||
@ -129,7 +131,7 @@ index 2d099b1..2db89f7 100644
|
||||
continue;
|
||||
}
|
||||
if (ctokenlen == 2 && ctoken[0] == '.' && ctoken[1] == '.')
|
||||
@@ -1913,8 +1942,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1933,8 +1962,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
*type = GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY;
|
||||
key->object_id = key_out.offset;
|
||||
|
||||
@ -141,7 +143,7 @@ index 2d099b1..2db89f7 100644
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1983,7 +2013,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -2003,7 +2033,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -152,7 +154,7 @@ index 2d099b1..2db89f7 100644
|
||||
if (cdirel->type == GRUB_BTRFS_DIR_ITEM_TYPE_SYMLINK)
|
||||
{
|
||||
struct grub_btrfs_inode inode;
|
||||
@@ -2033,14 +2065,26 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -2053,14 +2085,26 @@ find_path (struct grub_btrfs_data *data,
|
||||
path = path_alloc = tmp;
|
||||
if (path[0] == '/')
|
||||
{
|
||||
@ -186,7 +188,7 @@ index 2d099b1..2db89f7 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2696,6 +2740,7 @@ GRUB_MOD_INIT (btrfs)
|
||||
@@ -2716,6 +2760,7 @@ GRUB_MOD_INIT (btrfs)
|
||||
subvolid_set_env);
|
||||
grub_env_export ("btrfs_subvol");
|
||||
grub_env_export ("btrfs_subvolid");
|
||||
@ -194,6 +196,3 @@ index 2d099b1..2db89f7 100644
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI (btrfs)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,19 +1,21 @@
|
||||
From d88b2fed5b13498999a6a186cf5a707ce0819f67 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Thu, 21 Aug 2014 03:39:11 +0000
|
||||
Subject: [PATCH 077/220] grub2-btrfs-04-grub2-install
|
||||
Subject: [PATCH] grub2-btrfs-04-grub2-install
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/osdep/linux/getroot.c | 7 +++++++
|
||||
grub-core/osdep/unix/config.c | 17 +++++++++++++++--
|
||||
include/grub/emu/config.h | 1 +
|
||||
util/config.c | 10 ++++++++++
|
||||
util/grub-install.c | 15 +++++++++++++++
|
||||
util/grub-mkrelpath.c | 6 ++++++
|
||||
include/grub/emu/config.h | 1 +
|
||||
6 files changed, 54 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|
||||
index 6d9f4e5..5d50dd6 100644
|
||||
index 001b818fe58..caf9b1ccd3f 100644
|
||||
--- a/grub-core/osdep/linux/getroot.c
|
||||
+++ b/grub-core/osdep/linux/getroot.c
|
||||
@@ -376,6 +376,7 @@ get_btrfs_fs_prefix (const char *mount_path)
|
||||
@ -38,7 +40,7 @@ index 6d9f4e5..5d50dd6 100644
|
||||
else if (!retry && grub_strcmp (entries[i].fstype, "autofs") == 0)
|
||||
{
|
||||
diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
|
||||
index 65effa9..b637c58 100644
|
||||
index 7d6325138ce..46a881530c0 100644
|
||||
--- a/grub-core/osdep/unix/config.c
|
||||
+++ b/grub-core/osdep/unix/config.c
|
||||
@@ -82,6 +82,19 @@ grub_util_load_config (struct grub_util_config *cfg)
|
||||
@ -72,20 +74,8 @@ index 65effa9..b637c58 100644
|
||||
|
||||
argv[2] = script;
|
||||
argv[3] = '\0';
|
||||
diff --git a/include/grub/emu/config.h b/include/grub/emu/config.h
|
||||
index 875d589..c9a7e5f 100644
|
||||
--- a/include/grub/emu/config.h
|
||||
+++ b/include/grub/emu/config.h
|
||||
@@ -37,6 +37,7 @@ struct grub_util_config
|
||||
{
|
||||
int is_cryptodisk_enabled;
|
||||
char *grub_distributor;
|
||||
+ int is_suse_btrfs_snapshot_enabled;
|
||||
};
|
||||
|
||||
void
|
||||
diff --git a/util/config.c b/util/config.c
|
||||
index ebcdd8f..f044a88 100644
|
||||
index ebcdd8f5e22..f044a880a76 100644
|
||||
--- a/util/config.c
|
||||
+++ b/util/config.c
|
||||
@@ -42,6 +42,16 @@ grub_util_parse_config (FILE *f, struct grub_util_config *cfg, int simple)
|
||||
@ -106,10 +96,10 @@ index ebcdd8f..f044a88 100644
|
||||
sizeof ("GRUB_DISTRIBUTOR=") - 1) == 0)
|
||||
{
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 8a55ad4..0e807b0 100644
|
||||
index 0fbe7f78c6d..0f66f36d23a 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -819,6 +819,8 @@ fill_core_services (const char *core_services)
|
||||
@@ -827,6 +827,8 @@ fill_core_services (const char *core_services)
|
||||
free (sysv_plist);
|
||||
}
|
||||
|
||||
@ -118,7 +108,7 @@ index 8a55ad4..0e807b0 100644
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@@ -852,6 +854,9 @@ main (int argc, char *argv[])
|
||||
@@ -860,6 +862,9 @@ main (int argc, char *argv[])
|
||||
|
||||
grub_util_load_config (&config);
|
||||
|
||||
@ -128,7 +118,7 @@ index 8a55ad4..0e807b0 100644
|
||||
if (!bootloader_id && config.grub_distributor)
|
||||
{
|
||||
char *ptr;
|
||||
@@ -1344,6 +1349,16 @@ main (int argc, char *argv[])
|
||||
@@ -1352,6 +1357,16 @@ main (int argc, char *argv[])
|
||||
fprintf (load_cfg_f, "set debug='%s'\n",
|
||||
debug_image);
|
||||
}
|
||||
@ -146,7 +136,7 @@ index 8a55ad4..0e807b0 100644
|
||||
char *install_drive = NULL;
|
||||
|
||||
diff --git a/util/grub-mkrelpath.c b/util/grub-mkrelpath.c
|
||||
index 47a241a..5db7a9a 100644
|
||||
index 47a241a391b..5db7a9a7d97 100644
|
||||
--- a/util/grub-mkrelpath.c
|
||||
+++ b/util/grub-mkrelpath.c
|
||||
@@ -40,9 +40,12 @@ struct arguments
|
||||
@ -172,6 +162,15 @@ index 47a241a..5db7a9a 100644
|
||||
case ARGP_KEY_ARG:
|
||||
if (state->arg_num == 0)
|
||||
arguments->pathname = xstrdup (arg);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
diff --git a/include/grub/emu/config.h b/include/grub/emu/config.h
|
||||
index 875d5896ce1..c9a7e5f4ade 100644
|
||||
--- a/include/grub/emu/config.h
|
||||
+++ b/include/grub/emu/config.h
|
||||
@@ -37,6 +37,7 @@ struct grub_util_config
|
||||
{
|
||||
int is_cryptodisk_enabled;
|
||||
char *grub_distributor;
|
||||
+ int is_suse_btrfs_snapshot_enabled;
|
||||
};
|
||||
|
||||
void
|
||||
@ -1,7 +1,7 @@
|
||||
From 62438d289c38a88cd0d3d1efad8a52f0de44b6b3 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Thu, 21 Aug 2014 03:39:11 +0000
|
||||
Subject: [PATCH 078/220] grub2-btrfs-05-grub2-mkconfig
|
||||
Subject: [PATCH] grub2-btrfs-05-grub2-mkconfig
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
---
|
||||
@ -13,10 +13,10 @@ Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
5 files changed, 38 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 6247a0b..4649e92 100644
|
||||
index 005f093809b..535c0f02499 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -258,7 +258,8 @@ export GRUB_DEFAULT \
|
||||
@@ -252,7 +252,8 @@ export GRUB_DEFAULT \
|
||||
GRUB_BADRAM \
|
||||
GRUB_OS_PROBER_SKIP_LIST \
|
||||
GRUB_DISABLE_SUBMENU \
|
||||
@ -27,7 +27,7 @@ index 6247a0b..4649e92 100644
|
||||
if test "x${grub_cfg}" != "x"; then
|
||||
rm -f "${grub_cfg}.new"
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index 113a41f..b3aae53 100644
|
||||
index 42c2ea9ba50..fafeac95061 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -52,7 +52,11 @@ grub_warn ()
|
||||
@ -43,7 +43,7 @@ index 113a41f..b3aae53 100644
|
||||
|
||||
is_path_readable_by_grub ()
|
||||
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
|
||||
index 858b526..de727e6 100644
|
||||
index 858b526c925..de727e6ee6b 100644
|
||||
--- a/util/grub.d/00_header.in
|
||||
+++ b/util/grub.d/00_header.in
|
||||
@@ -27,6 +27,14 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
@ -90,7 +90,7 @@ index 858b526..de727e6 100644
|
||||
+EOF
|
||||
+fi
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 55f4aa7..5cab299 100644
|
||||
index 292e333324b..7bb3a211a7c 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -66,10 +66,14 @@ fi
|
||||
@ -109,7 +109,7 @@ index 55f4aa7..5cab299 100644
|
||||
xzfs)
|
||||
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
|
||||
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
|
||||
index 47e0d3f..1519ec6 100644
|
||||
index ada20775a14..e9e73b815fb 100644
|
||||
--- a/util/grub.d/20_linux_xen.in
|
||||
+++ b/util/grub.d/20_linux_xen.in
|
||||
@@ -73,10 +73,14 @@ fi
|
||||
@ -127,6 +127,3 @@ index 47e0d3f..1519ec6 100644
|
||||
fi;;
|
||||
xzfs)
|
||||
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,17 +1,19 @@
|
||||
From 226e9d1f9fde6c6ccf711ba7112135bfa1c01868 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Tue, 9 Jul 2019 13:56:16 +0200
|
||||
Subject: [PATCH 079/220] grub2-btrfs-06-subvol-mount
|
||||
Subject: [PATCH] grub2-btrfs-06-subvol-mount
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 195 +++++++++++++++++++++++++++++++++++++++-
|
||||
grub-core/osdep/linux/getroot.c | 148 +++++++++++++++++++++++++++++-
|
||||
include/grub/emu/getroot.h | 5 ++
|
||||
util/grub-install.c | 49 ++++++++++
|
||||
include/grub/emu/getroot.h | 5 ++
|
||||
4 files changed, 392 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 2db89f7..1627234 100644
|
||||
index 113c1f746c9..d323746ecfa 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -41,6 +41,7 @@
|
||||
@ -21,8 +23,8 @@ index 2db89f7..1627234 100644
|
||||
+#include <grub/list.h>
|
||||
#include <grub/crypto.h>
|
||||
#include <grub/diskfilter.h>
|
||||
|
||||
@@ -263,6 +264,12 @@ static grub_err_t
|
||||
#include <grub/safemath.h>
|
||||
@@ -266,6 +267,12 @@ static grub_err_t
|
||||
grub_btrfs_read_logical (struct grub_btrfs_data *data,
|
||||
grub_disk_addr_t addr, void *buf, grub_size_t size,
|
||||
int recursion_depth);
|
||||
@ -35,7 +37,7 @@ index 2db89f7..1627234 100644
|
||||
|
||||
static grub_err_t
|
||||
read_sblock (grub_disk_t disk, struct grub_btrfs_superblock *sb)
|
||||
@@ -1203,9 +1210,26 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path)
|
||||
@@ -1223,9 +1230,26 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path)
|
||||
grub_err_t err;
|
||||
grub_uint64_t tree = 0;
|
||||
grub_uint8_t type;
|
||||
@ -62,7 +64,7 @@ index 2db89f7..1627234 100644
|
||||
if (err)
|
||||
return grub_error(GRUB_ERR_FILE_NOT_FOUND, "couldn't locate %s\n", path);
|
||||
|
||||
@@ -2179,11 +2203,20 @@ grub_btrfs_dir (grub_device_t device, const char *path,
|
||||
@@ -2199,11 +2223,20 @@ grub_btrfs_dir (grub_device_t device, const char *path,
|
||||
int r = 0;
|
||||
grub_uint64_t tree;
|
||||
grub_uint8_t type;
|
||||
@ -84,7 +86,7 @@ index 2db89f7..1627234 100644
|
||||
if (err)
|
||||
{
|
||||
grub_btrfs_unmount (data);
|
||||
@@ -2285,11 +2318,21 @@ grub_btrfs_open (struct grub_file *file, const char *name)
|
||||
@@ -2305,11 +2338,21 @@ grub_btrfs_open (struct grub_file *file, const char *name)
|
||||
struct grub_btrfs_inode inode;
|
||||
grub_uint8_t type;
|
||||
struct grub_btrfs_key key_in;
|
||||
@ -107,7 +109,7 @@ index 2db89f7..1627234 100644
|
||||
if (err)
|
||||
{
|
||||
grub_btrfs_unmount (data);
|
||||
@@ -2460,6 +2503,150 @@ grub_cmd_btrfs_info (grub_command_t cmd __attribute__ ((unused)), int argc,
|
||||
@@ -2480,6 +2523,150 @@ grub_cmd_btrfs_info (grub_command_t cmd __attribute__ ((unused)), int argc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -258,7 +260,7 @@ index 2db89f7..1627234 100644
|
||||
static grub_err_t
|
||||
get_fs_root(struct grub_btrfs_data *data, grub_uint64_t tree,
|
||||
grub_uint64_t objectid, grub_uint64_t offset,
|
||||
@@ -2666,6 +2853,7 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
@@ -2686,6 +2873,7 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
};
|
||||
|
||||
static grub_command_t cmd_info;
|
||||
@ -266,7 +268,7 @@ index 2db89f7..1627234 100644
|
||||
static grub_extcmd_t cmd_list_subvols;
|
||||
|
||||
static char *
|
||||
@@ -2729,6 +2917,9 @@ GRUB_MOD_INIT (btrfs)
|
||||
@@ -2749,6 +2937,9 @@ GRUB_MOD_INIT (btrfs)
|
||||
cmd_info = grub_register_command("btrfs-info", grub_cmd_btrfs_info,
|
||||
"DEVICE",
|
||||
"Print BtrFS info about DEVICE.");
|
||||
@ -277,7 +279,7 @@ index 2db89f7..1627234 100644
|
||||
grub_cmd_btrfs_list_subvols, 0,
|
||||
"[-p|-n] [-o var] DEVICE",
|
||||
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|
||||
index 5d50dd6..4c5a130 100644
|
||||
index caf9b1ccd3f..28790307e00 100644
|
||||
--- a/grub-core/osdep/linux/getroot.c
|
||||
+++ b/grub-core/osdep/linux/getroot.c
|
||||
@@ -107,6 +107,14 @@ struct btrfs_ioctl_search_key
|
||||
@ -459,27 +461,11 @@ index 5d50dd6..4c5a130 100644
|
||||
char *
|
||||
grub_make_system_path_relative_to_its_root_os (const char *path)
|
||||
{
|
||||
diff --git a/include/grub/emu/getroot.h b/include/grub/emu/getroot.h
|
||||
index 73fa2d3..9c642ae 100644
|
||||
--- a/include/grub/emu/getroot.h
|
||||
+++ b/include/grub/emu/getroot.h
|
||||
@@ -53,6 +53,11 @@ char **
|
||||
grub_find_root_devices_from_mountinfo (const char *dir, char **relroot);
|
||||
#endif
|
||||
|
||||
+#ifdef __linux__
|
||||
+char *
|
||||
+grub_util_get_btrfs_subvol (const char *path, char **mount_path);
|
||||
+#endif
|
||||
+
|
||||
/* Devmapper functions provided by getroot_devmapper.c. */
|
||||
void
|
||||
grub_util_pull_devmapper (const char *os_dev);
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 0e807b0..3e718b9 100644
|
||||
index 0f66f36d23a..84ed6e88ecb 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -1561,6 +1561,55 @@ main (int argc, char *argv[])
|
||||
@@ -1569,6 +1569,55 @@ main (int argc, char *argv[])
|
||||
prefix_drive = xasprintf ("(%s)", grub_drives[0]);
|
||||
}
|
||||
|
||||
@ -535,6 +521,19 @@ index 0e807b0..3e718b9 100644
|
||||
char mkimage_target[200];
|
||||
const char *core_name = NULL;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
diff --git a/include/grub/emu/getroot.h b/include/grub/emu/getroot.h
|
||||
index 73fa2d34abb..9c642ae3fe3 100644
|
||||
--- a/include/grub/emu/getroot.h
|
||||
+++ b/include/grub/emu/getroot.h
|
||||
@@ -53,6 +53,11 @@ char **
|
||||
grub_find_root_devices_from_mountinfo (const char *dir, char **relroot);
|
||||
#endif
|
||||
|
||||
+#ifdef __linux__
|
||||
+char *
|
||||
+grub_util_get_btrfs_subvol (const char *path, char **mount_path);
|
||||
+#endif
|
||||
+
|
||||
/* Devmapper functions provided by getroot_devmapper.c. */
|
||||
void
|
||||
grub_util_pull_devmapper (const char *os_dev);
|
||||
@ -1,8 +1,8 @@
|
||||
From dea875db30d83eeed6b53c3fc72a0dbb178abb94 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Borzenkov <arvidjaar@gmail.com>
|
||||
Date: Tue, 21 Jun 2016 16:44:17 +0000
|
||||
Subject: [PATCH 080/220] Fallback to old subvol name scheme to support old
|
||||
snapshot config
|
||||
Subject: [PATCH] Fallback to old subvol name scheme to support old snapshot
|
||||
config
|
||||
|
||||
Ref: bsc#953538
|
||||
---
|
||||
@ -10,13 +10,14 @@ Ref: bsc#953538
|
||||
1 file changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 1627234..69c30e6 100644
|
||||
index d323746ecfa..673ded03522 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -1241,10 +1241,40 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path)
|
||||
@@ -1260,11 +1260,41 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path)
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
+static grub_err_t
|
||||
+lookup_root_by_name_fallback(struct grub_btrfs_data *data, const char *path)
|
||||
+{
|
||||
+ grub_err_t err;
|
||||
@ -35,7 +36,7 @@ index 1627234..69c30e6 100644
|
||||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
+static grub_err_t
|
||||
static grub_err_t
|
||||
btrfs_handle_subvol(struct grub_btrfs_data *data __attribute__ ((unused)))
|
||||
{
|
||||
if (btrfs_default_subvol)
|
||||
@ -55,6 +56,3 @@ index 1627234..69c30e6 100644
|
||||
|
||||
if (btrfs_default_subvolid)
|
||||
return lookup_root_by_id(data, btrfs_default_subvolid);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
From d876203ac9bfea1f5f0cea015dfa70ba3988d08a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 18 Feb 2014 11:34:00 -0500
|
||||
Subject: [PATCH 050/220] Fix convert function to support NVMe devices
|
||||
|
||||
This is adapted from the patch at
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1019660 , which is against
|
||||
the now very old version of convert_system_partition_to_system_disk().
|
||||
|
||||
As such, it certainly not the right thing for upstream, but should
|
||||
function for now.
|
||||
|
||||
Resolves: rhbz#1019660
|
||||
|
||||
Signed-off-by: Peter Jones <grub2-owner@fedoraproject.org>
|
||||
---
|
||||
util/getroot.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/util/getroot.c b/util/getroot.c
|
||||
index 847406f..fa3460d 100644
|
||||
--- a/util/getroot.c
|
||||
+++ b/util/getroot.c
|
||||
@@ -153,6 +153,7 @@ convert_system_partition_to_system_disk (const char *os_dev, int *is_part)
|
||||
{
|
||||
#if GRUB_UTIL_FD_STAT_IS_FUNCTIONAL
|
||||
struct stat st;
|
||||
+ char *path = xmalloc(PATH_MAX);
|
||||
|
||||
if (stat (os_dev, &st) < 0)
|
||||
{
|
||||
@@ -165,6 +166,24 @@ convert_system_partition_to_system_disk (const char *os_dev, int *is_part)
|
||||
|
||||
*is_part = 0;
|
||||
|
||||
+ if (realpath(os_dev, path))
|
||||
+ {
|
||||
+ if ((strncmp ("/dev/nvme", path, 9) == 0))
|
||||
+ {
|
||||
+ char *p = path + 5;
|
||||
+ p = strchr(p, 'p');
|
||||
+ if (p)
|
||||
+ {
|
||||
+ *is_part = 1;
|
||||
+ *p = '\0';
|
||||
+ }
|
||||
+ return path;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ grub_free (path);
|
||||
+ *is_part = 0;
|
||||
+
|
||||
if (grub_util_device_is_mapped_stat (&st))
|
||||
return grub_util_devmapper_part_to_disk (&st, is_part, os_dev);
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
From a2099170d2f7e9cca6a743c15b6cb649b88fd873 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2019 21:46:52 +0200
|
||||
Subject: [PATCH 051/220] Add grub_util_readlink()
|
||||
|
||||
Add grub_util_readlink(). This requires pulling in stat and readlink from
|
||||
gnulib, which pulls in stat and related headers, but after that the
|
||||
implementation is straightforward.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
grub-core/osdep/windows/hostdisk.c | 6 ++++++
|
||||
include/grub/osdep/hostfile_aros.h | 6 ++++++
|
||||
include/grub/osdep/hostfile_unix.h | 6 ++++++
|
||||
include/grub/osdep/hostfile_windows.h | 2 ++
|
||||
4 files changed, 20 insertions(+)
|
||||
|
||||
diff --git a/grub-core/osdep/windows/hostdisk.c b/grub-core/osdep/windows/hostdisk.c
|
||||
index 3551007..87a106c 100644
|
||||
--- a/grub-core/osdep/windows/hostdisk.c
|
||||
+++ b/grub-core/osdep/windows/hostdisk.c
|
||||
@@ -365,6 +365,12 @@ grub_util_mkdir (const char *dir)
|
||||
free (windows_name);
|
||||
}
|
||||
|
||||
+ssize_t
|
||||
+grub_util_readlink (const char *name, char *buf, size_t bufsize)
|
||||
+{
|
||||
+ return readlink(name, buf, bufsize);
|
||||
+}
|
||||
+
|
||||
int
|
||||
grub_util_rename (const char *from, const char *to)
|
||||
{
|
||||
diff --git a/include/grub/osdep/hostfile_aros.h b/include/grub/osdep/hostfile_aros.h
|
||||
index a059c0f..161fbb7 100644
|
||||
--- a/include/grub/osdep/hostfile_aros.h
|
||||
+++ b/include/grub/osdep/hostfile_aros.h
|
||||
@@ -68,6 +68,12 @@ grub_util_rename (const char *from, const char *to)
|
||||
return rename (from, to);
|
||||
}
|
||||
|
||||
+static inline ssize_t
|
||||
+grub_util_readlink (const char *name, char *buf, size_t bufsize)
|
||||
+{
|
||||
+ return readlink(name, buf, bufsize);
|
||||
+}
|
||||
+
|
||||
#define grub_util_mkdir(a) mkdir ((a), 0755)
|
||||
|
||||
struct grub_util_fd
|
||||
diff --git a/include/grub/osdep/hostfile_unix.h b/include/grub/osdep/hostfile_unix.h
|
||||
index 9ffe46f..17cd3aa 100644
|
||||
--- a/include/grub/osdep/hostfile_unix.h
|
||||
+++ b/include/grub/osdep/hostfile_unix.h
|
||||
@@ -71,6 +71,12 @@ grub_util_rename (const char *from, const char *to)
|
||||
return rename (from, to);
|
||||
}
|
||||
|
||||
+static inline ssize_t
|
||||
+grub_util_readlink (const char *name, char *buf, size_t bufsize)
|
||||
+{
|
||||
+ return readlink(name, buf, bufsize);
|
||||
+}
|
||||
+
|
||||
#define grub_util_mkdir(a) mkdir ((a), 0755)
|
||||
|
||||
#if defined (__NetBSD__)
|
||||
diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h
|
||||
index bf6451b..8c92d05 100644
|
||||
--- a/include/grub/osdep/hostfile_windows.h
|
||||
+++ b/include/grub/osdep/hostfile_windows.h
|
||||
@@ -41,6 +41,8 @@ typedef struct grub_util_fd_dir *grub_util_fd_dir_t;
|
||||
|
||||
int
|
||||
grub_util_rename (const char *from, const char *to);
|
||||
+ssize_t
|
||||
+grub_util_readlink (const char *name, char *buf, size_t bufsize);
|
||||
int
|
||||
grub_util_unlink (const char *name);
|
||||
void
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,18 +1,19 @@
|
||||
From 0a31b397d0d3bc28e19401abe9b675fe7d3bb526 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Thu, 11 May 2017 08:56:57 +0000
|
||||
Subject: [PATCH 081/220] Grub not working correctly with btrfs snapshots
|
||||
(bsc#1026511)
|
||||
Subject: [PATCH] Grub not working correctly with btrfs snapshots (bsc#1026511)
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 238 insertions(+)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 69c30e6..ba99d04 100644
|
||||
index 673ded03522..2b21cbaa67e 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -2867,6 +2867,238 @@ out:
|
||||
@@ -2887,6 +2887,238 @@ out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -251,7 +252,7 @@ index 69c30e6..ba99d04 100644
|
||||
static struct grub_fs grub_btrfs_fs = {
|
||||
.name = "btrfs",
|
||||
.fs_dir = grub_btrfs_dir,
|
||||
@@ -2885,6 +3117,7 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
@@ -2905,6 +3137,7 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
static grub_command_t cmd_info;
|
||||
static grub_command_t cmd_mount_subvol;
|
||||
static grub_extcmd_t cmd_list_subvols;
|
||||
@ -259,7 +260,7 @@ index 69c30e6..ba99d04 100644
|
||||
|
||||
static char *
|
||||
subvolid_set_env (struct grub_env_var *var __attribute__ ((unused)),
|
||||
@@ -2955,6 +3188,11 @@ GRUB_MOD_INIT (btrfs)
|
||||
@@ -2975,6 +3208,11 @@ GRUB_MOD_INIT (btrfs)
|
||||
"[-p|-n] [-o var] DEVICE",
|
||||
"Print list of BtrFS subvolumes on "
|
||||
"DEVICE.", options);
|
||||
@ -271,6 +272,3 @@ index 69c30e6..ba99d04 100644
|
||||
grub_register_variable_hook ("btrfs_subvol", subvol_get_env,
|
||||
subvol_set_env);
|
||||
grub_register_variable_hook ("btrfs_subvolid", subvolid_get_env,
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 67fceb3fe4d6a167f26478fa2c3fdbac9a9bc871 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 1 Jun 2017 09:59:56 -0400
|
||||
Subject: [PATCH 082/220] Add grub_efi_allocate_pool() and grub_efi_free_pool()
|
||||
Subject: [PATCH] Add grub_efi_allocate_pool() and grub_efi_free_pool()
|
||||
wrappers.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 32 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
|
||||
index 090c862..5e2b479 100644
|
||||
index 585fa6662b6..03f9a9d0118 100644
|
||||
--- a/include/grub/efi/efi.h
|
||||
+++ b/include/grub/efi/efi.h
|
||||
@@ -24,6 +24,10 @@
|
||||
@ -58,7 +58,7 @@ index 090c862..5e2b479 100644
|
||||
grub_efi_loaded_image_t *EXPORT_FUNC(grub_efi_get_loaded_image) (grub_efi_handle_t image_handle);
|
||||
void EXPORT_FUNC(grub_efi_print_device_path) (grub_efi_device_path_t *dp);
|
||||
char *EXPORT_FUNC(grub_efi_get_filename) (grub_efi_device_path_t *dp);
|
||||
@@ -109,10 +140,7 @@ void grub_efi_init (void);
|
||||
@@ -115,10 +146,7 @@ void grub_efi_init (void);
|
||||
void grub_efi_fini (void);
|
||||
void grub_efi_set_prefix (void);
|
||||
|
||||
@ -70,6 +70,3 @@ index 090c862..5e2b479 100644
|
||||
extern int EXPORT_VAR(grub_efi_is_finished);
|
||||
|
||||
struct grub_net_card;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,108 +0,0 @@
|
||||
From 33c5ef791304cd9c320dd0e6ec67e2bd5e7e8d30 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 3 Sep 2014 10:38:00 -0400
|
||||
Subject: [PATCH 052/220] Make editenv chase symlinks including those across
|
||||
devices.
|
||||
|
||||
This lets us make /boot/grub2/grubenv a symlink to
|
||||
/boot/efi/EFI/fedora/grubenv even though they're different mount points,
|
||||
which allows /usr/bin/grub2-editenv to be the same across platforms
|
||||
(i.e. UEFI vs BIOS).
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
Makefile.util.def | 11 +++++++++++
|
||||
util/editenv.c | 46 ++++++++++++++++++++++++++++++++++++++++++++--
|
||||
2 files changed, 55 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 8717774..1f298d0 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -240,8 +240,19 @@ program = {
|
||||
|
||||
common = util/grub-editenv.c;
|
||||
common = util/editenv.c;
|
||||
+ common = util/grub-install-common.c;
|
||||
common = grub-core/osdep/init.c;
|
||||
+ common = grub-core/osdep/compress.c;
|
||||
+ extra_dist = grub-core/osdep/unix/compress.c;
|
||||
+ extra_dist = grub-core/osdep/basic/compress.c;
|
||||
+ common = util/mkimage.c;
|
||||
+ common = util/grub-mkimage32.c;
|
||||
+ common = util/grub-mkimage64.c;
|
||||
+ common = grub-core/osdep/config.c;
|
||||
+ common = util/config.c;
|
||||
+ common = util/resolve.c;
|
||||
|
||||
+ ldadd = '$(LIBLZMA)';
|
||||
ldadd = libgrubmods.a;
|
||||
ldadd = libgrubgcry.a;
|
||||
ldadd = libgrubkern.a;
|
||||
diff --git a/util/editenv.c b/util/editenv.c
|
||||
index eb2d0c0..e61dc12 100644
|
||||
--- a/util/editenv.c
|
||||
+++ b/util/editenv.c
|
||||
@@ -37,6 +37,7 @@ grub_util_create_envblk_file (const char *name)
|
||||
FILE *fp;
|
||||
char *buf;
|
||||
char *namenew;
|
||||
+ char *rename_target = xstrdup(name);
|
||||
|
||||
buf = xmalloc (DEFAULT_ENVBLK_SIZE);
|
||||
|
||||
@@ -60,7 +61,48 @@ grub_util_create_envblk_file (const char *name)
|
||||
free (buf);
|
||||
fclose (fp);
|
||||
|
||||
- if (grub_util_rename (namenew, name) < 0)
|
||||
- grub_util_error (_("cannot rename the file %s to %s"), namenew, name);
|
||||
+ ssize_t size = 1;
|
||||
+ while (1)
|
||||
+ {
|
||||
+ char *linkbuf;
|
||||
+ ssize_t retsize;
|
||||
+
|
||||
+ linkbuf = xmalloc(size+1);
|
||||
+ retsize = grub_util_readlink (rename_target, linkbuf, size);
|
||||
+ if (retsize < 0 && (errno == ENOENT || errno == EINVAL))
|
||||
+ {
|
||||
+ free (linkbuf);
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (retsize < 0)
|
||||
+ {
|
||||
+ grub_util_error (_("cannot rename the file %s to %s: %m"), namenew, name);
|
||||
+ free (linkbuf);
|
||||
+ free (namenew);
|
||||
+ return;
|
||||
+ }
|
||||
+ else if (retsize == size)
|
||||
+ {
|
||||
+ free(linkbuf);
|
||||
+ size += 128;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ free (rename_target);
|
||||
+ linkbuf[retsize] = '\0';
|
||||
+ rename_target = linkbuf;
|
||||
+ }
|
||||
+
|
||||
+ int rc = grub_util_rename (namenew, rename_target);
|
||||
+ if (rc < 0 && errno == EXDEV)
|
||||
+ {
|
||||
+ rc = grub_install_copy_file (namenew, rename_target, 1);
|
||||
+ grub_util_unlink (namenew);
|
||||
+ }
|
||||
+
|
||||
+ if (rc < 0)
|
||||
+ grub_util_error (_("cannot rename the file %s to %s: %m"), namenew, name);
|
||||
+
|
||||
free (namenew);
|
||||
+ free (rename_target);
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 2a70ee4ec02463e5eda6137de9e3e7d9f1b2021a Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 1 Jun 2017 10:06:38 -0400
|
||||
Subject: [PATCH 083/220] Use grub_efi_...() memory helpers where reasonable.
|
||||
Subject: [PATCH] Use grub_efi_...() memory helpers where reasonable.
|
||||
|
||||
This uses grub_efi_allocate_pool(), grub_efi_free_pool(), and
|
||||
grub_efi_free_pages() instead of open-coded efi_call_N() calls, so we
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 9 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
|
||||
index 5aa3a5d..3a724a9 100644
|
||||
index 07c4937898d..89ac84cc663 100644
|
||||
--- a/grub-core/loader/efi/chainloader.c
|
||||
+++ b/grub-core/loader/efi/chainloader.c
|
||||
@@ -65,7 +65,7 @@ grub_chainloader_unload (void)
|
||||
@ -34,7 +34,7 @@ index 5aa3a5d..3a724a9 100644
|
||||
|
||||
grub_loader_unset ();
|
||||
|
||||
@@ -506,10 +506,9 @@ grub_efi_get_media_file_path (grub_efi_device_path_t *dp)
|
||||
@@ -527,10 +527,9 @@ grub_efi_get_media_file_path (grub_efi_device_path_t *dp)
|
||||
static grub_efi_boolean_t
|
||||
handle_image (void *data, grub_efi_uint32_t datasize)
|
||||
{
|
||||
@ -46,7 +46,7 @@ index 5aa3a5d..3a724a9 100644
|
||||
char *buffer_aligned = NULL;
|
||||
grub_efi_uint32_t i;
|
||||
struct grub_pe32_section_table *section;
|
||||
@@ -520,8 +519,6 @@ handle_image (void *data, grub_efi_uint32_t datasize)
|
||||
@@ -541,8 +540,6 @@ handle_image (void *data, grub_efi_uint32_t datasize)
|
||||
int found_entry_point = 0;
|
||||
int rc;
|
||||
|
||||
@ -55,7 +55,7 @@ index 5aa3a5d..3a724a9 100644
|
||||
rc = read_header (data, datasize, &context);
|
||||
if (rc < 0)
|
||||
{
|
||||
@@ -561,8 +558,8 @@ handle_image (void *data, grub_efi_uint32_t datasize)
|
||||
@@ -582,8 +579,8 @@ handle_image (void *data, grub_efi_uint32_t datasize)
|
||||
grub_dprintf ("chain", "image size is %08"PRIxGRUB_UINT64_T", datasize is %08x\n",
|
||||
context.image_size, datasize);
|
||||
|
||||
@ -66,7 +66,7 @@ index 5aa3a5d..3a724a9 100644
|
||||
|
||||
if (efi_status != GRUB_EFI_SUCCESS)
|
||||
{
|
||||
@@ -794,14 +791,14 @@ handle_image (void *data, grub_efi_uint32_t datasize)
|
||||
@@ -815,14 +812,14 @@ handle_image (void *data, grub_efi_uint32_t datasize)
|
||||
|
||||
grub_dprintf ("chain", "entry_point returned %ld\n", efi_status);
|
||||
grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t));
|
||||
@ -83,7 +83,7 @@ index 5aa3a5d..3a724a9 100644
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -809,10 +806,7 @@ error_exit:
|
||||
@@ -830,10 +827,7 @@ error_exit:
|
||||
static grub_err_t
|
||||
grub_secureboot_chainloader_unload (void)
|
||||
{
|
||||
@ -95,7 +95,7 @@ index 5aa3a5d..3a724a9 100644
|
||||
grub_free (file_path);
|
||||
grub_free (cmdline);
|
||||
cmdline = 0;
|
||||
@@ -1079,7 +1073,7 @@ fail:
|
||||
@@ -1100,7 +1094,7 @@ fail:
|
||||
grub_free (file_path);
|
||||
|
||||
if (address)
|
||||
@ -104,6 +104,3 @@ index 5aa3a5d..3a724a9 100644
|
||||
|
||||
if (cmdline)
|
||||
grub_free (cmdline);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
From aa6edc58113ecb1ff34417fa4702ff10b4e32ded Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 1 Jun 2017 10:07:50 -0400
|
||||
Subject: [PATCH 084/220] Add PRIxGRUB_EFI_STATUS and use it.
|
||||
Subject: [PATCH] Add PRIxGRUB_EFI_STATUS and use it.
|
||||
|
||||
This avoids syntax checkers getting confused about if it's llx or lx.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/loader/efi/chainloader.c | 3 ++-
|
||||
include/grub/efi/api.h | 8 ++++++++
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
include/grub/efi/api.h | 9 +++++++++
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
|
||||
index 3a724a9..f4ddbed 100644
|
||||
index 89ac84cc663..ac8dfd40c61 100644
|
||||
--- a/grub-core/loader/efi/chainloader.c
|
||||
+++ b/grub-core/loader/efi/chainloader.c
|
||||
@@ -789,7 +789,8 @@ handle_image (void *data, grub_efi_uint32_t datasize)
|
||||
@@ -810,7 +810,8 @@ handle_image (void *data, grub_efi_uint32_t datasize)
|
||||
efi_status = efi_call_2 (entry_point, grub_efi_image_handle,
|
||||
grub_efi_system_table);
|
||||
|
||||
@ -26,13 +26,15 @@ index 3a724a9..f4ddbed 100644
|
||||
efi_status = grub_efi_free_pool (buffer);
|
||||
|
||||
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
|
||||
index d97cdf9..955973e 100644
|
||||
index 117469450d3..99628801478 100644
|
||||
--- a/include/grub/efi/api.h
|
||||
+++ b/include/grub/efi/api.h
|
||||
@@ -527,6 +527,14 @@ typedef grub_uint8_t grub_efi_char8_t;
|
||||
@@ -546,7 +546,16 @@ typedef grub_uint64_t grub_efi_uint64_t;
|
||||
typedef grub_uint8_t grub_efi_char8_t;
|
||||
typedef grub_uint16_t grub_efi_char16_t;
|
||||
|
||||
typedef grub_efi_intn_t grub_efi_status_t;
|
||||
+
|
||||
typedef grub_efi_uintn_t grub_efi_status_t;
|
||||
+/* Make grub_efi_status_t reasonably printable. */
|
||||
+#if GRUB_CPU_SIZEOF_VOID_P == 8
|
||||
+#define PRIxGRUB_EFI_STATUS "lx"
|
||||
@ -44,6 +46,3 @@ index d97cdf9..955973e 100644
|
||||
|
||||
#define GRUB_EFI_ERROR_CODE(value) \
|
||||
((((grub_efi_status_t) 1) << (sizeof (grub_efi_status_t) * 8 - 1)) | (value))
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
From 7fba6daaf2d9cc2c96176020212dadad593c340f Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 26 Jun 2017 12:44:59 -0400
|
||||
Subject: [PATCH 087/220] don't use int for efi status
|
||||
Subject: [PATCH] don't use int for efi status
|
||||
|
||||
---
|
||||
grub-core/kern/efi/efi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
||||
index a1af9b4..2cf6a5a 100644
|
||||
index 05d8237a9b2..ae9885edb84 100644
|
||||
--- a/grub-core/kern/efi/efi.c
|
||||
+++ b/grub-core/kern/efi/efi.c
|
||||
@@ -166,7 +166,7 @@ grub_reboot (void)
|
||||
@@ -167,7 +167,7 @@ grub_reboot (void)
|
||||
void
|
||||
grub_exit (int retval)
|
||||
{
|
||||
@ -20,6 +20,3 @@ index a1af9b4..2cf6a5a 100644
|
||||
|
||||
if (retval == 0)
|
||||
rc = GRUB_EFI_SUCCESS;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,70 +0,0 @@
|
||||
From c2361e2d8c4b0d15eb78605097a9d2fa38c06d76 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marshall <rmarshall@redhat.com>
|
||||
Date: Mon, 16 Mar 2015 16:34:51 -0400
|
||||
Subject: [PATCH 056/220] Update info with grub.cfg netboot selection order
|
||||
(#1148650)
|
||||
|
||||
Added documentation to the grub info page that specifies the order
|
||||
netboot clients will use to select a grub configuration file.
|
||||
|
||||
Resolves rhbz#1148650
|
||||
---
|
||||
docs/grub.texi | 42 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 42 insertions(+)
|
||||
|
||||
diff --git a/docs/grub.texi b/docs/grub.texi
|
||||
index 6f52430..221064b 100644
|
||||
--- a/docs/grub.texi
|
||||
+++ b/docs/grub.texi
|
||||
@@ -2493,6 +2493,48 @@ grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i38
|
||||
Then follow instructions printed out by grub-mknetdir on configuring your DHCP
|
||||
server.
|
||||
|
||||
+The grub.cfg file is placed in the same directory as the path output by
|
||||
+grub-mknetdir hereafter referred to as FWPATH. GRUB will search for its
|
||||
+configuration files in order using the following rules where the appended
|
||||
+value corresponds to a value on the client machine.
|
||||
+
|
||||
+@example
|
||||
+@group
|
||||
+@samp{(FWPATH)}/grub.cfg-@samp{(UUID OF NIC)}
|
||||
+@samp{(FWPATH)}/grub.cfg-@samp{(MAC ADDRESS OF NIC)}
|
||||
+@samp{(FWPATH)}/grub.cfg-@samp{(IPv4 OR IPv6 ADDRESS)}
|
||||
+@samp{(FWPATH)}/grub.cfg
|
||||
+@end group
|
||||
+@end example
|
||||
+
|
||||
+The client will only attempt to look up an IPv6 address config once, however,
|
||||
+it will try the IPv4 multiple times. The concrete example below shows what
|
||||
+would happen under the IPv4 case.
|
||||
+
|
||||
+@example
|
||||
+@group
|
||||
+UUID: 7726a678-7fc0-4853-a4f6-c85ac36a120a
|
||||
+MAC: 52:54:00:ec:33:81
|
||||
+IPV4: 10.0.0.130 (0A000082)
|
||||
+@end group
|
||||
+@end example
|
||||
+
|
||||
+@example
|
||||
+@group
|
||||
+@samp{(FWPATH)}/grub.cfg-7726a678-7fc0-4853-a4f6-c85ac36a120a
|
||||
+@samp{(FWPATH)}/grub.cfg-52-54-00-ec-33-81
|
||||
+@samp{(FWPATH)}/grub.cfg-0A000082
|
||||
+@samp{(FWPATH)}/grub.cfg-0A00008
|
||||
+@samp{(FWPATH)}/grub.cfg-0A0000
|
||||
+@samp{(FWPATH)}/grub.cfg-0A000
|
||||
+@samp{(FWPATH)}/grub.cfg-0A00
|
||||
+@samp{(FWPATH)}/grub.cfg-0A0
|
||||
+@samp{(FWPATH)}/grub.cfg-0A
|
||||
+@samp{(FWPATH)}/grub.cfg-0
|
||||
+@samp{(FWPATH)}/grub.cfg
|
||||
+@end group
|
||||
+@end example
|
||||
+
|
||||
After GRUB has started, files on the TFTP server will be accessible via the
|
||||
@samp{(tftp)} device.
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
From c0d5d9ca9964f2d634a25014821199e1f4ea7be1 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 26 Jun 2017 12:46:23 -0400
|
||||
Subject: [PATCH 088/220] make GRUB_MOD_INIT() declare its function prototypes.
|
||||
Subject: [PATCH] make GRUB_MOD_INIT() declare its function prototypes.
|
||||
|
||||
---
|
||||
include/grub/dl.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/grub/dl.h b/include/grub/dl.h
|
||||
index f03c035..90dc9bb 100644
|
||||
index b3753c9ca26..91933b85f2c 100644
|
||||
--- a/include/grub/dl.h
|
||||
+++ b/include/grub/dl.h
|
||||
@@ -54,6 +54,7 @@ grub_mod_fini (void)
|
||||
@ -27,6 +27,3 @@ index f03c035..90dc9bb 100644
|
||||
void \
|
||||
grub_##name##_fini (void) { grub_mod_fini (); } \
|
||||
static void \
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 36ceae144ede50b60f1256e0b57ceb7ed5be8eee Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 20 Apr 2017 13:29:06 -0400
|
||||
Subject: [PATCH 091/220] Don't guess /boot/efi/ as HFS+ on ppc machines in
|
||||
Subject: [PATCH] Don't guess /boot/efi/ as HFS+ on ppc machines in
|
||||
grub-install
|
||||
|
||||
This should never be trying this, and since we've consolidated the
|
||||
@ -16,10 +16,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 1 insertion(+), 11 deletions(-)
|
||||
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 3e718b9..37fcdac 100644
|
||||
index 84ed6e88ecb..a2bec7446cb 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -1182,18 +1182,8 @@ main (int argc, char *argv[])
|
||||
@@ -1190,18 +1190,8 @@ main (int argc, char *argv[])
|
||||
char *d;
|
||||
|
||||
is_guess = 1;
|
||||
@ -39,6 +39,3 @@ index 3e718b9..37fcdac 100644
|
||||
if (!grub_util_is_directory (d))
|
||||
{
|
||||
free (d);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 9 Jul 2019 14:31:19 +0200
|
||||
Subject: [PATCH] 20_linux_xen: load xen or multiboot{,2} modules as needed.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
util/grub.d/20_linux_xen.in | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
|
||||
index e9e73b815fb..c23b064be6c 100644
|
||||
--- a/util/grub.d/20_linux_xen.in
|
||||
+++ b/util/grub.d/20_linux_xen.in
|
||||
@@ -153,6 +153,7 @@ linux_entry_xsm ()
|
||||
else
|
||||
xen_rm_opts="no-real-mode edd=off"
|
||||
fi
|
||||
+ insmod ${xen_module}
|
||||
${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
|
||||
echo '$(echo "$lmessage" | grub_quote)'
|
||||
${module_loader} ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
|
||||
@@ -166,6 +167,7 @@ EOF
|
||||
done
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
echo '$(echo "$message" | grub_quote)'
|
||||
+ insmod ${xen_module}
|
||||
${module_loader} --nounzip $(echo $initrd_path)
|
||||
EOF
|
||||
fi
|
||||
@@ -253,13 +255,16 @@ while [ "x${xen_list}" != "x" ] ; do
|
||||
echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
|
||||
fi
|
||||
if ($grub_file --is-arm64-efi $current_xen); then
|
||||
+ xen_module="xen_boot"
|
||||
xen_loader="xen_hypervisor"
|
||||
module_loader="xen_module"
|
||||
else
|
||||
if ($grub_file --is-x86-multiboot2 $current_xen); then
|
||||
+ xen_module="multiboot2"
|
||||
xen_loader="multiboot2"
|
||||
module_loader="module2"
|
||||
else
|
||||
+ xen_module="multiboot"
|
||||
xen_loader="multiboot"
|
||||
module_loader="module"
|
||||
fi
|
||||
@ -1,39 +0,0 @@
|
||||
From 186a94f0f82bbebcbf607573ba792647acebf9cd Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 30 Jun 2015 15:50:41 -0400
|
||||
Subject: [PATCH 058/220] Handle rssd storage devices.
|
||||
|
||||
Resolves: rhbz#1087962
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/osdep/linux/getroot.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|
||||
index 90d92d3..6d9f4e5 100644
|
||||
--- a/grub-core/osdep/linux/getroot.c
|
||||
+++ b/grub-core/osdep/linux/getroot.c
|
||||
@@ -921,6 +921,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
|
||||
return path;
|
||||
}
|
||||
|
||||
+ /* If this is an rssd device. */
|
||||
+ if ((strncmp ("rssd", p, 4) == 0) && p[4] >= 'a' && p[4] <= 'z')
|
||||
+ {
|
||||
+ char *pp = p + 4;
|
||||
+ while (*pp >= 'a' && *pp <= 'z')
|
||||
+ pp++;
|
||||
+ if (*pp)
|
||||
+ *is_part = 1;
|
||||
+ /* /dev/rssd[a-z]+[0-9]* */
|
||||
+ *pp = '\0';
|
||||
+ return path;
|
||||
+ }
|
||||
+
|
||||
/* If this is a loop device */
|
||||
if ((strncmp ("loop", p, 4) == 0) && p[4] >= '0' && p[4] <= '9')
|
||||
{
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
From 1742890ed8ea75a898f2bc7a47c61d6acacf4128 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 7 Nov 2017 17:12:17 -0500
|
||||
Subject: [PATCH 093/220] Make pmtimer tsc calibration not take 51 seconds to
|
||||
fail.
|
||||
Subject: [PATCH] Make pmtimer tsc calibration not take 51 seconds to fail.
|
||||
|
||||
On my laptop running at 2.4GHz, if I run a VM where tsc calibration
|
||||
using pmtimer will fail presuming a broken pmtimer, it takes ~51 seconds
|
||||
@ -64,7 +63,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
1 file changed, 89 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/i386/tsc_pmtimer.c b/grub-core/kern/i386/tsc_pmtimer.c
|
||||
index c9c3616..ca15c3a 100644
|
||||
index c9c36169978..ca15c3aacd7 100644
|
||||
--- a/grub-core/kern/i386/tsc_pmtimer.c
|
||||
+++ b/grub-core/kern/i386/tsc_pmtimer.c
|
||||
@@ -28,40 +28,101 @@
|
||||
@ -210,6 +209,3 @@ index c9c3616..ca15c3a 100644
|
||||
tsc_diff = grub_pmtimer_wait_count_tsc (pmtimer, 3580);
|
||||
if (tsc_diff == 0)
|
||||
return 0;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From d49469ac1d2173db50595517e4bb8d5fe8f2a68b Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 27 Feb 2018 13:55:35 -0500
|
||||
Subject: [PATCH 094/220] align struct efi_variable better...
|
||||
Subject: [PATCH] align struct efi_variable better...
|
||||
|
||||
---
|
||||
include/grub/efiemu/runtime.h | 2 +-
|
||||
@ -9,7 +9,7 @@ Subject: [PATCH 094/220] align struct efi_variable better...
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
|
||||
index 36d2ded..9d93ba8 100644
|
||||
index 36d2dedf47e..9d93ba88bac 100644
|
||||
--- a/include/grub/efiemu/runtime.h
|
||||
+++ b/include/grub/efiemu/runtime.h
|
||||
@@ -33,5 +33,5 @@ struct efi_variable
|
||||
@ -20,7 +20,7 @@ index 36d2ded..9d93ba8 100644
|
||||
+} GRUB_PACKED GRUB_ALIGNED(8);
|
||||
#endif /* ! GRUB_EFI_EMU_RUNTIME_HEADER */
|
||||
diff --git a/include/grub/types.h b/include/grub/types.h
|
||||
index 035a4b5..2fc4be4 100644
|
||||
index 0a3ff159136..ba446d99040 100644
|
||||
--- a/include/grub/types.h
|
||||
+++ b/include/grub/types.h
|
||||
@@ -29,6 +29,7 @@
|
||||
@ -31,6 +31,3 @@ index 035a4b5..2fc4be4 100644
|
||||
|
||||
#ifdef GRUB_BUILD
|
||||
# define GRUB_CPU_SIZEOF_VOID_P BUILD_SIZEOF_VOID_P
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
399
0061-Add-BLS-support-to-grub-mkconfig.patch
Normal file
399
0061-Add-BLS-support-to-grub-mkconfig.patch
Normal file
@ -0,0 +1,399 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 9 Dec 2016 15:40:29 -0500
|
||||
Subject: [PATCH] Add BLS support to grub-mkconfig
|
||||
|
||||
GRUB now has BootLoaderSpec support, the user can choose to use this by
|
||||
setting GRUB_ENABLE_BLSCFG to true in /etc/default/grub. On this setup,
|
||||
the boot menu entries are not added to the grub.cfg, instead BLS config
|
||||
files are parsed by blscfg command and the entries created dynamically.
|
||||
|
||||
A 10_linux_bls grub.d snippet to generate menu entries from BLS files
|
||||
is also added that can be used on platforms where the bootloader doesn't
|
||||
have BLS support and only can parse a normal grub configuration file.
|
||||
|
||||
Portions of the 10_linux_bls were taken from the ostree-grub-generator
|
||||
script that's included in the OSTree project.
|
||||
|
||||
Fixes to support multi-devices and generate a BLS section even if no
|
||||
kernels are found in the boot directory were proposed by Yclept Nemo
|
||||
and Tom Gundersen respectively.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
[javierm: remove outdated URL for BLS document]
|
||||
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
util/grub-mkconfig.8 | 4 +
|
||||
util/grub-mkconfig.in | 9 +-
|
||||
util/grub-mkconfig_lib.in | 22 ++++-
|
||||
util/grub.d/10_linux.in | 223 +++++++++++++++++++++++++++++++++++++++++++++-
|
||||
4 files changed, 252 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.8 b/util/grub-mkconfig.8
|
||||
index a2d1f577b9b..434fa4deda4 100644
|
||||
--- a/util/grub-mkconfig.8
|
||||
+++ b/util/grub-mkconfig.8
|
||||
@@ -13,5 +13,9 @@
|
||||
\fB--output\fR=\fIFILE\fR
|
||||
Write generated output to \fIFILE\fR.
|
||||
|
||||
+.TP
|
||||
+\fB--no-grubenv-update\fR
|
||||
+Do not update variables in the grubenv file.
|
||||
+
|
||||
.SH SEE ALSO
|
||||
.BR "info grub"
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 535c0f02499..f55339a3f64 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -50,6 +50,8 @@ grub_get_kernel_settings="${sbindir}/@grub_get_kernel_settings@"
|
||||
export TEXTDOMAIN=@PACKAGE@
|
||||
export TEXTDOMAINDIR="@localedir@"
|
||||
|
||||
+export GRUB_GRUBENV_UPDATE="yes"
|
||||
+
|
||||
. "${pkgdatadir}/grub-mkconfig_lib"
|
||||
|
||||
# Usage: usage
|
||||
@@ -59,6 +61,7 @@ usage () {
|
||||
gettext "Generate a grub config file"; echo
|
||||
echo
|
||||
print_option_help "-o, --output=$(gettext FILE)" "$(gettext "output generated config to FILE [default=stdout]")"
|
||||
+ print_option_help "--no-grubenv-update" "$(gettext "do not update variables in the grubenv file")"
|
||||
print_option_help "-h, --help" "$(gettext "print this message and exit")"
|
||||
print_option_help "-V, --version" "$(gettext "print the version information and exit")"
|
||||
echo
|
||||
@@ -94,6 +97,9 @@ do
|
||||
--output=*)
|
||||
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
||||
;;
|
||||
+ --no-grubenv-update)
|
||||
+ GRUB_GRUBENV_UPDATE="no"
|
||||
+ ;;
|
||||
-*)
|
||||
gettext_printf "Unrecognized option \`%s'\n" "$option" 1>&2
|
||||
usage
|
||||
@@ -253,7 +259,8 @@ export GRUB_DEFAULT \
|
||||
GRUB_OS_PROBER_SKIP_LIST \
|
||||
GRUB_DISABLE_SUBMENU \
|
||||
GRUB_DEFAULT_DTB \
|
||||
- SUSE_BTRFS_SNAPSHOT_BOOTING
|
||||
+ SUSE_BTRFS_SNAPSHOT_BOOTING \
|
||||
+ GRUB_ENABLE_BLSCFG
|
||||
|
||||
if test "x${grub_cfg}" != "x"; then
|
||||
rm -f "${grub_cfg}.new"
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index fafeac95061..d8bb4069360 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -30,6 +30,9 @@ fi
|
||||
if test "x$grub_file" = x; then
|
||||
grub_file="${bindir}/@grub_file@"
|
||||
fi
|
||||
+if test "x$grub_editenv" = x; then
|
||||
+ grub_editenv="${bindir}/@grub_editenv@"
|
||||
+fi
|
||||
if test "x$grub_mkrelpath" = x; then
|
||||
grub_mkrelpath="${bindir}/@grub_mkrelpath@"
|
||||
fi
|
||||
@@ -125,8 +128,19 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
+prepare_grub_to_access_device_with_variable ()
|
||||
+{
|
||||
+ device_variable="$1"
|
||||
+ shift
|
||||
+ prepare_grub_to_access_device "$@"
|
||||
+ unset "device_variable"
|
||||
+}
|
||||
+
|
||||
prepare_grub_to_access_device ()
|
||||
{
|
||||
+ if [ -z "$device_variable" ]; then
|
||||
+ device_variable="root"
|
||||
+ fi
|
||||
old_ifs="$IFS"
|
||||
IFS='
|
||||
'
|
||||
@@ -161,18 +175,18 @@ prepare_grub_to_access_device ()
|
||||
# otherwise set root as per value in device.map.
|
||||
fs_hint="`"${grub_probe}" --device $@ --target=compatibility_hint`"
|
||||
if [ "x$fs_hint" != x ]; then
|
||||
- echo "set root='$fs_hint'"
|
||||
+ echo "set ${device_variable}='$fs_hint'"
|
||||
fi
|
||||
if [ "x${GRUB_DISABLE_UUID}" != "xtrue" ] && fs_uuid="`"${grub_probe}" --device $@ --target=fs_uuid 2> /dev/null`" ; then
|
||||
hints="`"${grub_probe}" --device $@ --target=hints_string 2> /dev/null`" || hints=
|
||||
if [ "x$hints" != x ]; then
|
||||
echo "if [ x\$feature_platform_search_hint = xy ]; then"
|
||||
- echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
|
||||
+ echo " search --no-floppy --fs-uuid --set=${device_variable} ${hints} ${fs_uuid}"
|
||||
echo "else"
|
||||
- echo " search --no-floppy --fs-uuid --set=root ${fs_uuid}"
|
||||
+ echo " search --no-floppy --fs-uuid --set=${device_variable} ${fs_uuid}"
|
||||
echo "fi"
|
||||
else
|
||||
- echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
|
||||
+ echo "search --no-floppy --fs-uuid --set=${device_variable} ${fs_uuid}"
|
||||
fi
|
||||
fi
|
||||
IFS="$old_ifs"
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 7bb3a211a7c..6bceabf3dc9 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -82,6 +82,223 @@ case x"$GRUB_FS" in
|
||||
;;
|
||||
esac
|
||||
|
||||
+populate_header_warn()
|
||||
+{
|
||||
+if [ "x${BLS_POPULATE_MENU}" = "xtrue" ]; then
|
||||
+ bls_parser="10_linux script"
|
||||
+else
|
||||
+ bls_parser="blscfg command"
|
||||
+fi
|
||||
+cat <<EOF
|
||||
+
|
||||
+# This section was generated by a script. Do not modify the generated file - all changes
|
||||
+# will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
|
||||
+#
|
||||
+# The $bls_parser parses the BootLoaderSpec files stored in /boot/loader/entries and
|
||||
+# populates the boot menu. Please refer to the Boot Loader Specification documentation
|
||||
+# for the files format: https://systemd.io/BOOT_LOADER_SPECIFICATION/.
|
||||
+
|
||||
+EOF
|
||||
+}
|
||||
+
|
||||
+read_config()
|
||||
+{
|
||||
+ config_file=${1}
|
||||
+ title=""
|
||||
+ initrd=""
|
||||
+ options=""
|
||||
+ linux=""
|
||||
+ grub_arg=""
|
||||
+
|
||||
+ while read -r line
|
||||
+ do
|
||||
+ record=$(echo ${line} | cut -f 1 -d ' ')
|
||||
+ value=$(echo ${line} | cut -s -f2- -d ' ')
|
||||
+ case "${record}" in
|
||||
+ "title")
|
||||
+ title=${value}
|
||||
+ ;;
|
||||
+ "initrd")
|
||||
+ initrd=${value}
|
||||
+ ;;
|
||||
+ "linux")
|
||||
+ linux=${value}
|
||||
+ ;;
|
||||
+ "options")
|
||||
+ options=${value}
|
||||
+ ;;
|
||||
+ "grub_arg")
|
||||
+ grub_arg=${value}
|
||||
+ ;;
|
||||
+ esac
|
||||
+ done < ${config_file}
|
||||
+}
|
||||
+
|
||||
+blsdir="/boot/loader/entries"
|
||||
+
|
||||
+get_sorted_bls()
|
||||
+{
|
||||
+ if ! [ -d "${blsdir}" ] || ! [ -e /etc/machine-id ]; then
|
||||
+ return
|
||||
+ fi
|
||||
+
|
||||
+ read machine_id < /etc/machine-id
|
||||
+ if [ -z "${machine_id}" ]; then
|
||||
+ return
|
||||
+ fi
|
||||
+
|
||||
+ local IFS=$'\n'
|
||||
+
|
||||
+ files=($(for bls in ${blsdir}/${machine_id}-*.conf; do
|
||||
+ if ! [[ -e "${bls}" ]] ; then
|
||||
+ continue
|
||||
+ fi
|
||||
+ bls="${bls%.conf}"
|
||||
+ bls="${bls##*/}"
|
||||
+ echo "${bls}"
|
||||
+ done | ${kernel_sort} 2>/dev/null | tac)) || :
|
||||
+
|
||||
+ echo "${files[@]}"
|
||||
+}
|
||||
+
|
||||
+update_bls_cmdline()
|
||||
+{
|
||||
+ local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
+ local -a files=($(get_sorted_bls))
|
||||
+
|
||||
+ for bls in "${files[@]}"; do
|
||||
+ local options="${cmdline}"
|
||||
+ if [ -z "${bls##*debug*}" ]; then
|
||||
+ options="${options} ${GRUB_CMDLINE_LINUX_DEBUG}"
|
||||
+ fi
|
||||
+ options="$(echo "${options}" | sed -e 's/\//\\\//g')"
|
||||
+ sed -i -e "s/^options.*/options ${options}/" "${blsdir}/${bls}.conf"
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
+populate_menu()
|
||||
+{
|
||||
+ local -a files=($(get_sorted_bls))
|
||||
+
|
||||
+ gettext_printf "Generating boot entries from BLS files...\n" >&2
|
||||
+
|
||||
+ for bls in "${files[@]}"; do
|
||||
+ read_config "${blsdir}/${bls}.conf"
|
||||
+
|
||||
+ menu="${menu}menuentry '${title}' ${grub_arg} --id=${bls} {\n"
|
||||
+ menu="${menu}\t linux ${linux} ${options}\n"
|
||||
+ if [ -n "${initrd}" ] ; then
|
||||
+ menu="${menu}\t initrd ${boot_prefix}${initrd}\n"
|
||||
+ fi
|
||||
+ menu="${menu}}\n\n"
|
||||
+ done
|
||||
+ # The printf command seems to be more reliable across shells for special character (\n, \t) evaluation
|
||||
+ printf "$menu"
|
||||
+}
|
||||
+
|
||||
+# Make BLS the default if GRUB_ENABLE_BLSCFG was not set and grubby is not installed.
|
||||
+if [ -z "${GRUB_ENABLE_BLSCFG}" ] && [ -z "$(which new-kernel-pkg 2> /dev/null)" ]; then
|
||||
+ GRUB_ENABLE_BLSCFG="true"
|
||||
+fi
|
||||
+
|
||||
+if [ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]; then
|
||||
+ if [ x$dirname = x/ ]; then
|
||||
+ if [ -z "${prepare_root_cache}" ]; then
|
||||
+ prepare_grub_to_access_device ${GRUB_DEVICE}
|
||||
+ fi
|
||||
+ else
|
||||
+ if [ -z "${prepare_boot_cache}" ]; then
|
||||
+ prepare_grub_to_access_device ${GRUB_DEVICE_BOOT}
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ if [ -d /sys/firmware/efi ]; then
|
||||
+ bootefi_device="`${grub_probe} --target=device /boot/efi/`"
|
||||
+ prepare_grub_to_access_device_with_variable boot ${bootefi_device}
|
||||
+ else
|
||||
+ boot_device="`${grub_probe} --target=device /boot/`"
|
||||
+ prepare_grub_to_access_device_with_variable boot ${boot_device}
|
||||
+ fi
|
||||
+
|
||||
+ arch="$(uname -m)"
|
||||
+ if [ "x${arch}" = "xppc64le" ] && [ -d /sys/firmware/opal ]; then
|
||||
+
|
||||
+ BLS_POPULATE_MENU="true"
|
||||
+ petitboot_path="/sys/firmware/devicetree/base/ibm,firmware-versions/petitboot"
|
||||
+
|
||||
+ if test -e ${petitboot_path}; then
|
||||
+ read -r -d '' petitboot_version < ${petitboot_path}
|
||||
+ petitboot_version="$(echo ${petitboot_version//v})"
|
||||
+
|
||||
+ if test -n ${petitboot_version}; then
|
||||
+ major_version="$(echo ${petitboot_version} | cut -d . -f1)"
|
||||
+ minor_version="$(echo ${petitboot_version} | cut -d . -f2)"
|
||||
+
|
||||
+ re='^[0-9]+$'
|
||||
+ if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] &&
|
||||
+ ([[ ${major_version} -gt 1 ]] ||
|
||||
+ [[ ${major_version} -eq 1 &&
|
||||
+ ${minor_version} -ge 8 ]]); then
|
||||
+ BLS_POPULATE_MENU="false"
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ populate_header_warn
|
||||
+
|
||||
+ cat << EOF
|
||||
+# The kernelopts variable should be defined in the grubenv file. But to ensure that menu
|
||||
+# entries populated from BootLoaderSpec files that use this variable work correctly even
|
||||
+# without a grubenv file, define a fallback kernelopts variable if this has not been set.
|
||||
+#
|
||||
+# The kernelopts variable in the grubenv file can be modified using the grubby tool or by
|
||||
+# executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
|
||||
+# and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
|
||||
+# the kernelopts variable in the grubenv file and the fallback kernelopts variable.
|
||||
+if [ -z "\${kernelopts}" ]; then
|
||||
+ set kernelopts="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
+fi
|
||||
+EOF
|
||||
+
|
||||
+ update_bls_cmdline
|
||||
+
|
||||
+ if [ "x${BLS_POPULATE_MENU}" = "xtrue" ]; then
|
||||
+ populate_menu
|
||||
+ else
|
||||
+ cat << EOF
|
||||
+
|
||||
+insmod blscfg
|
||||
+blscfg
|
||||
+EOF
|
||||
+ fi
|
||||
+
|
||||
+ if [ "x${GRUB_GRUBENV_UPDATE}" = "xyes" ]; then
|
||||
+ blsdir="/boot/loader/entries"
|
||||
+ [ -d "${blsdir}" ] && GRUB_BLS_FS="$(${grub_probe} --target=fs ${blsdir})"
|
||||
+ if [ "x${GRUB_BLS_FS}" = "xbtrfs" ] || [ "x${GRUB_BLS_FS}" = "xzfs" ]; then
|
||||
+ blsdir=$(make_system_path_relative_to_its_root "${blsdir}")
|
||||
+ if [ "x${blsdir}" != "x/loader/entries" ] && [ "x${blsdir}" != "x/boot/loader/entries" ]; then
|
||||
+ ${grub_editenv} - set blsdir="${blsdir}"
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ if [ -n "${GRUB_EARLY_INITRD_LINUX_CUSTOM}" ]; then
|
||||
+ ${grub_editenv} - set early_initrd="${GRUB_EARLY_INITRD_LINUX_CUSTOM}"
|
||||
+ fi
|
||||
+
|
||||
+ if [ -n "${GRUB_DEFAULT_DTB}" ]; then
|
||||
+ ${grub_editenv} - set devicetree="${GRUB_DEFAULT_DTB}"
|
||||
+ fi
|
||||
+
|
||||
+ if [ -n "${GRUB_SAVEDEFAULT}" ]; then
|
||||
+ ${grub_editenv} - set save_default="${GRUB_SAVEDEFAULT}"
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ exit 0
|
||||
+fi
|
||||
+
|
||||
mktitle ()
|
||||
{
|
||||
local title_type
|
||||
@@ -121,6 +338,7 @@ linux_entry ()
|
||||
if [ -z "$boot_device_id" ]; then
|
||||
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
|
||||
fi
|
||||
+
|
||||
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
|
||||
@@ -231,6 +449,7 @@ is_top_level=true
|
||||
while [ "x$list" != "x" ] ; do
|
||||
linux=`version_find_latest $list`
|
||||
gettext_printf "Found linux image: %s\n" "$linux" >&2
|
||||
+
|
||||
basename=`basename $linux`
|
||||
dirname=`dirname $linux`
|
||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||
@@ -269,7 +488,9 @@ while [ "x$list" != "x" ] ; do
|
||||
for i in ${initrd}; do
|
||||
initrd_display="${initrd_display} ${dirname}/${i}"
|
||||
done
|
||||
- gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
|
||||
+ if [ "x${GRUB_ENABLE_BLSCFG}" != "xtrue" ]; then
|
||||
+ gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
|
||||
+ fi
|
||||
fi
|
||||
|
||||
fdt=
|
||||
@ -1,8 +1,7 @@
|
||||
From 141eaab0d63830598e4304451e407289468968cb Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 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 096/220] Don't attempt to backtrace on grub_abort() for
|
||||
grub-emu
|
||||
Subject: [PATCH] Don't attempt to backtrace on grub_abort() for grub-emu
|
||||
|
||||
The emu platform doesn't have a grub_backtrace() implementation, so this
|
||||
causes a build error. Don't attempt to call this when building grub-emu.
|
||||
@ -13,10 +12,10 @@ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
|
||||
index 04371ac..636f97e 100644
|
||||
index a3e215155bd..c60601b699d 100644
|
||||
--- a/grub-core/kern/misc.c
|
||||
+++ b/grub-core/kern/misc.c
|
||||
@@ -1103,7 +1103,7 @@ static void __attribute__ ((noreturn))
|
||||
@@ -1201,7 +1201,7 @@ static void __attribute__ ((noreturn))
|
||||
grub_abort (void)
|
||||
{
|
||||
#ifndef GRUB_UTIL
|
||||
@ -25,6 +24,3 @@ index 04371ac..636f97e 100644
|
||||
grub_backtrace();
|
||||
#endif
|
||||
#endif
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
From 8483464867a872744a2c40a3b4016d3b81033a5d Mon Sep 17 00:00:00 2001
|
||||
From: Hector Marco-Gisbert <hecmargi@upv.es>
|
||||
Date: Fri, 13 Nov 2015 16:21:09 +0100
|
||||
Subject: [PATCH 062/220] Fix security issue when reading username and password
|
||||
|
||||
This patch fixes two integer underflows at:
|
||||
* grub-core/lib/crypto.c
|
||||
* grub-core/normal/auth.c
|
||||
|
||||
Resolves: CVE-2015-8370
|
||||
|
||||
Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
|
||||
Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
|
||||
---
|
||||
grub-core/lib/crypto.c | 2 +-
|
||||
grub-core/normal/auth.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
|
||||
index ca334d5..e6c78d1 100644
|
||||
--- a/grub-core/lib/crypto.c
|
||||
+++ b/grub-core/lib/crypto.c
|
||||
@@ -468,7 +468,7 @@ grub_password_get (char buf[], unsigned buf_size)
|
||||
break;
|
||||
}
|
||||
|
||||
- if (key == '\b')
|
||||
+ if (key == '\b' && cur_len)
|
||||
{
|
||||
if (cur_len)
|
||||
cur_len--;
|
||||
diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
|
||||
index 6be678c..c35ce97 100644
|
||||
--- a/grub-core/normal/auth.c
|
||||
+++ b/grub-core/normal/auth.c
|
||||
@@ -172,7 +172,7 @@ grub_username_get (char buf[], unsigned buf_size)
|
||||
break;
|
||||
}
|
||||
|
||||
- if (key == GRUB_TERM_BACKSPACE)
|
||||
+ if (key == GRUB_TERM_BACKSPACE && cur_len)
|
||||
{
|
||||
if (cur_len)
|
||||
{
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,14 @@
|
||||
From 5dbb03ccd67da4cb9e775c429d3b933bc257194f Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Raymund Will <rw@suse.com>
|
||||
Date: Tue, 6 Feb 2018 09:09:00 +0100
|
||||
Subject: [PATCH 097/220] Add linux and initrd commands for grub-emu
|
||||
Subject: [PATCH] Add linux and initrd commands for grub-emu
|
||||
|
||||
When using grub-emu, the linux and initrd commands are used as arguments
|
||||
to the kexec command line tool, to allow booting the selected menu entry.
|
||||
|
||||
Signed-off-by: Raymund Will <rw@suse.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/Makefile.am | 1 +
|
||||
grub-core/Makefile.core.def | 1 -
|
||||
grub-core/kern/emu/main.c | 4 +
|
||||
grub-core/kern/emu/misc.c | 18 ++++-
|
||||
@ -14,26 +16,15 @@ to the kexec command line tool, to allow booting the selected menu entry.
|
||||
include/grub/emu/exec.h | 4 +-
|
||||
include/grub/emu/hostfile.h | 3 +-
|
||||
include/grub/emu/misc.h | 3 +
|
||||
grub-core/Makefile.am | 1 +
|
||||
8 files changed, 202 insertions(+), 4 deletions(-)
|
||||
create mode 100644 grub-core/loader/emu/linux.c
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index c6ba5b2..5ff3afd 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -304,6 +304,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/net.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostdisk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostfile.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/exec.h
|
||||
if COND_GRUB_EMU_SDL
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
|
||||
endif
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index ebc5580..528f76a 100644
|
||||
index 058c88ac3af..5354f9613d3 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -1802,7 +1802,6 @@ module = {
|
||||
@@ -1826,7 +1826,6 @@ module = {
|
||||
|
||||
common = loader/linux.c;
|
||||
common = lib/cmdline.c;
|
||||
@ -42,7 +33,7 @@ index ebc5580..528f76a 100644
|
||||
efi = loader/efi/linux.c;
|
||||
};
|
||||
diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c
|
||||
index 55ea5a1..846fe97 100644
|
||||
index 55ea5a11ccd..846fe9715ec 100644
|
||||
--- a/grub-core/kern/emu/main.c
|
||||
+++ b/grub-core/kern/emu/main.c
|
||||
@@ -107,6 +107,7 @@ static struct argp_option options[] = {
|
||||
@ -64,7 +55,7 @@ index 55ea5a1..846fe97 100644
|
||||
case ARGP_KEY_ARG:
|
||||
{
|
||||
diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
|
||||
index 19cd007..245b69c 100644
|
||||
index 0ff13bcaf8c..eeea092752d 100644
|
||||
--- a/grub-core/kern/emu/misc.c
|
||||
+++ b/grub-core/kern/emu/misc.c
|
||||
@@ -39,6 +39,7 @@
|
||||
@ -84,7 +75,7 @@ index 19cd007..245b69c 100644
|
||||
}
|
||||
|
||||
void *
|
||||
@@ -142,6 +143,9 @@ void
|
||||
@@ -154,6 +155,9 @@ void
|
||||
__attribute__ ((noreturn))
|
||||
grub_exit (int rc)
|
||||
{
|
||||
@ -94,7 +85,7 @@ index 19cd007..245b69c 100644
|
||||
exit (rc < 0 ? 1 : rc);
|
||||
}
|
||||
#endif
|
||||
@@ -203,3 +207,15 @@ grub_util_load_image (const char *path, char *buf)
|
||||
@@ -215,3 +219,15 @@ grub_util_load_image (const char *path, char *buf)
|
||||
|
||||
fclose (fp);
|
||||
}
|
||||
@ -112,7 +103,7 @@ index 19cd007..245b69c 100644
|
||||
+}
|
||||
diff --git a/grub-core/loader/emu/linux.c b/grub-core/loader/emu/linux.c
|
||||
new file mode 100644
|
||||
index 0000000..fda9e00
|
||||
index 00000000000..fda9e00d24c
|
||||
--- /dev/null
|
||||
+++ b/grub-core/loader/emu/linux.c
|
||||
@@ -0,0 +1,172 @@
|
||||
@ -289,7 +280,7 @@ index 0000000..fda9e00
|
||||
+ grub_unregister_command (cmd_initrd);
|
||||
+}
|
||||
diff --git a/include/grub/emu/exec.h b/include/grub/emu/exec.h
|
||||
index d1073ef..1b61b4a 100644
|
||||
index d1073ef86af..1b61b4a2e5d 100644
|
||||
--- a/include/grub/emu/exec.h
|
||||
+++ b/include/grub/emu/exec.h
|
||||
@@ -23,6 +23,8 @@
|
||||
@ -311,7 +302,7 @@ index d1073ef..1b61b4a 100644
|
||||
grub_util_exec_redirect (const char *const *argv, const char *stdin_file,
|
||||
const char *stdout_file);
|
||||
diff --git a/include/grub/emu/hostfile.h b/include/grub/emu/hostfile.h
|
||||
index cfb1e2b..a61568e 100644
|
||||
index cfb1e2b5661..a61568e36e9 100644
|
||||
--- a/include/grub/emu/hostfile.h
|
||||
+++ b/include/grub/emu/hostfile.h
|
||||
@@ -22,6 +22,7 @@
|
||||
@ -332,10 +323,10 @@ index cfb1e2b..a61568e 100644
|
||||
char *
|
||||
grub_util_path_concat (size_t n, ...);
|
||||
diff --git a/include/grub/emu/misc.h b/include/grub/emu/misc.h
|
||||
index ce464cf..5ef4f79 100644
|
||||
index ff9c48a6490..01056954b96 100644
|
||||
--- a/include/grub/emu/misc.h
|
||||
+++ b/include/grub/emu/misc.h
|
||||
@@ -56,6 +56,9 @@ void EXPORT_FUNC(grub_util_warn) (const char *fmt, ...) __attribute__ ((format (
|
||||
@@ -57,6 +57,9 @@ void EXPORT_FUNC(grub_util_warn) (const char *fmt, ...) __attribute__ ((format (
|
||||
void EXPORT_FUNC(grub_util_info) (const char *fmt, ...) __attribute__ ((format (GNU_PRINTF, 1, 2)));
|
||||
void EXPORT_FUNC(grub_util_error) (const char *fmt, ...) __attribute__ ((format (GNU_PRINTF, 1, 2), noreturn));
|
||||
|
||||
@ -345,6 +336,15 @@ index ce464cf..5ef4f79 100644
|
||||
grub_uint64_t EXPORT_FUNC (grub_util_get_cpu_time_ms) (void);
|
||||
|
||||
#ifdef HAVE_DEVICE_MAPPER
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index ee88e44e97a..80e7a83edf9 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -307,6 +307,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/net.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostdisk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostfile.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/exec.h
|
||||
if COND_GRUB_EMU_SDL
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
|
||||
endif
|
||||
@ -1,7 +1,7 @@
|
||||
From 2e187d17d3ffeb9a9bf4bfa3e079be7e335d8c80 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 15 Mar 2018 14:12:40 -0400
|
||||
Subject: [PATCH 098/220] Add grub2-switch-to-blscfg
|
||||
Subject: [PATCH] Add grub2-switch-to-blscfg
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
@ -11,16 +11,16 @@ Signed-off-by: Jan Hlavac <jhlavac@redhat.com>
|
||||
Makefile.util.def | 7 +
|
||||
util/grub-set-password.in | 2 +-
|
||||
util/grub-switch-to-blscfg.8 | 33 +++++
|
||||
util/grub-switch-to-blscfg.in | 314 ++++++++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 355 insertions(+), 1 deletion(-)
|
||||
util/grub-switch-to-blscfg.in | 317 ++++++++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 358 insertions(+), 1 deletion(-)
|
||||
create mode 100644 util/grub-switch-to-blscfg.8
|
||||
create mode 100644 util/grub-switch-to-blscfg.in
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index a616136..f55473c 100644
|
||||
index 43a1c7453b1..a90879fa9ba 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -1364,6 +1364,13 @@ program = {
|
||||
@@ -1365,6 +1365,13 @@ program = {
|
||||
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ index a616136..f55473c 100644
|
||||
name = grub-glue-efi;
|
||||
mansection = 1;
|
||||
diff --git a/util/grub-set-password.in b/util/grub-set-password.in
|
||||
index 5ebf505..c0b5ebb 100644
|
||||
index 5ebf50576d6..c0b5ebbfdc5 100644
|
||||
--- a/util/grub-set-password.in
|
||||
+++ b/util/grub-set-password.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@ -48,7 +48,7 @@ index 5ebf505..c0b5ebb 100644
|
||||
else
|
||||
diff --git a/util/grub-switch-to-blscfg.8 b/util/grub-switch-to-blscfg.8
|
||||
new file mode 100644
|
||||
index 0000000..9a88628
|
||||
index 00000000000..9a886282976
|
||||
--- /dev/null
|
||||
+++ b/util/grub-switch-to-blscfg.8
|
||||
@@ -0,0 +1,33 @@
|
||||
@ -87,10 +87,10 @@ index 0000000..9a88628
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-switch-to-blscfg.in b/util/grub-switch-to-blscfg.in
|
||||
new file mode 100644
|
||||
index 0000000..49b3985
|
||||
index 00000000000..a851424beb2
|
||||
--- /dev/null
|
||||
+++ b/util/grub-switch-to-blscfg.in
|
||||
@@ -0,0 +1,314 @@
|
||||
@@ -0,0 +1,317 @@
|
||||
+#! /bin/sh
|
||||
+#
|
||||
+# Set a default boot entry for GRUB.
|
||||
@ -283,7 +283,7 @@ index 0000000..49b3985
|
||||
+mkbls() {
|
||||
+ local kernelver=$1 && shift
|
||||
+ local datetime=$1 && shift
|
||||
+ local bootprefix=$1 && shift
|
||||
+ local kernelopts=$1 && shift
|
||||
+
|
||||
+ local debugname=""
|
||||
+ local debugid=""
|
||||
@ -302,10 +302,9 @@ index 0000000..49b3985
|
||||
+ cat <<EOF
|
||||
+title ${NAME} (${kernelver}) ${VERSION}${debugname}
|
||||
+version ${kernelver}${debugid}
|
||||
+linux ${bootprefix}/vmlinuz-${kernelver}
|
||||
+initrd ${bootprefix}/initramfs-${kernelver}.img
|
||||
+options \$kernelopts
|
||||
+id ${ID}-${datetime}-${kernelver}
|
||||
+linux /vmlinuz-${kernelver}
|
||||
+initrd /initramfs-${kernelver}.img
|
||||
+options ${kernelopts}
|
||||
+grub_users \$grub_users
|
||||
+grub_arg --unrestricted
|
||||
+grub_class kernel${flavor}
|
||||
@ -329,28 +328,19 @@ index 0000000..49b3985
|
||||
+
|
||||
+ linux_relpath="$("${grub_mkrelpath}" "${linux_path}")"
|
||||
+ bootprefix="${linux_relpath%%"${linux}"}"
|
||||
+ cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
+
|
||||
+ if [ -f "${kernel_dir}/bls.conf" ] ; then
|
||||
+ cp -af "${kernel_dir}/bls.conf" "${bls_target}"
|
||||
+ if [ -n "${bootprefix}" ]; then
|
||||
+ sed -i -e "s,^\(linux[^ \t]*[ \t]\+\).*,\1${bootprefix}${linux},g" "${bls_target}"
|
||||
+ sed -i -e "/^initrd/ s,\([ \t]\+\)\([^ \t]\+\),\1${bootprefix}\2,g" "${bls_target}"
|
||||
+ fi
|
||||
+ else
|
||||
+ mkbls "${kernelver}" \
|
||||
+ "$(date -u +%Y%m%d%H%M%S -d "$(stat -c '%y' "${kernel_dir}")")" \
|
||||
+ "${bootprefix}" \
|
||||
+ >"${bls_target}"
|
||||
+ fi
|
||||
+ mkbls "${kernelver}" \
|
||||
+ "$(date -u +%Y%m%d%H%M%S -d "$(stat -c '%y' "${kernel_dir}")")" \
|
||||
+ "${bootprefix}" "${cmdline}" >"${bls_target}"
|
||||
+
|
||||
+ if [ "x$GRUB_LINUX_MAKE_DEBUG" = "xtrue" ]; then
|
||||
+ bls_debug="$(echo ${bls_target} | sed -e "s/${kernelver}/${kernelver}~debug/")"
|
||||
+ cp -aT "${bls_target}" "${bls_debug}"
|
||||
+ title="$(grep '^title[ \t]' "${bls_debug}" | sed -e 's/^title[ \t]*//')"
|
||||
+ blsid="$(grep '^id[ \t]' "${bls_debug}" | sed -e "s/\.${ARCH}/-debug.${arch}/")"
|
||||
+ options="$(echo "${cmdline} ${GRUB_CMDLINE_LINUX_DEBUG}" | sed -e 's/\//\\\//g')"
|
||||
+ sed -i -e "s/^title.*/title ${title}${GRUB_LINUX_DEBUG_TITLE_POSTFIX}/" "${bls_debug}"
|
||||
+ sed -i -e "s/^id.*/${blsid}/" "${bls_debug}"
|
||||
+ sed -i -e "s/^options.*/options \$kernelopts ${GRUB_CMDLINE_LINUX_DEBUG}/" "${bls_debug}"
|
||||
+ sed -i -e "s/^options.*/options ${options}/" "${bls_debug}"
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
@ -359,6 +349,19 @@ index 0000000..49b3985
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+# The grub2 EFI binary is not copied to the ESP as a part of an ostree
|
||||
+# transaction. Make sure a grub2 version with BLS support is installed
|
||||
+# but only do this if the blsdir is not set, to make sure that the BLS
|
||||
+# parsing module will search for the BLS snippets in the default path.
|
||||
+if test -f /run/ostree-booted && test -d /sys/firmware/efi/efivars && \
|
||||
+ ! ${grub_editenv} - list | grep -q blsdir && \
|
||||
+ mountpoint -q /boot; then
|
||||
+ grub_binary="$(find /usr/lib/ostree-boot/efi/EFI/${EFIDIR}/ -name grub*.efi)"
|
||||
+ install -m 700 ${grub_binary} ${grubdir} || exit 1
|
||||
+ # Create a hidden file to indicate that grub2 now has BLS support.
|
||||
+ touch /boot/grub2/.grub2-blscfg-supported
|
||||
+fi
|
||||
+
|
||||
+GENERATE=0
|
||||
+if grep '^GRUB_ENABLE_BLSCFG=.*' "${etcdefaultgrub}" \
|
||||
+ | grep -vq '^GRUB_ENABLE_BLSCFG="*true"*\s*$' ; then
|
||||
@ -388,13 +391,13 @@ index 0000000..49b3985
|
||||
+
|
||||
+ if [ -n "${mod_dir}" ]; then
|
||||
+ for mod in blscfg increment; do
|
||||
+ cp ${prefix}/lib/grub/${mod_dir}/${mod}.mod ${grubdir}/$mod_dir/ || exit 1
|
||||
+ install -m 700 ${prefix}/lib/grub/${mod_dir}/${mod}.mod ${grubdir}/$mod_dir/ || exit 1
|
||||
+ done
|
||||
+ fi
|
||||
+
|
||||
+ cp -af "${GRUB_CONFIG_FILE}" "${GRUB_CONFIG_FILE}${backupsuffix}"
|
||||
+ if ! grub2-mkconfig -o "${GRUB_CONFIG_FILE}" ; then
|
||||
+ cp -af "${GRUB_CONFIG_FILE}${backupsuffix}" "${GRUB_CONFIG_FILE}"
|
||||
+ install -m 700 "${GRUB_CONFIG_FILE}${backupsuffix}" "${GRUB_CONFIG_FILE}"
|
||||
+ sed -i"${backupsuffix}" \
|
||||
+ -e 's,^GRUB_ENABLE_BLSCFG=.*,GRUB_ENABLE_BLSCFG=false,' \
|
||||
+ "${etcdefaultgrub}"
|
||||
@ -405,6 +408,3 @@ index 0000000..49b3985
|
||||
+
|
||||
+# Bye.
|
||||
+exit 0
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,49 +1,47 @@
|
||||
From 69fbc18e0758e780236f713b579a951551d7e829 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 9 Jul 2019 17:05:03 +0200
|
||||
Subject: [PATCH 100/220] make better backtraces
|
||||
Subject: [PATCH] make better backtraces
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
Makefile.util.def | 6 ++
|
||||
grub-core/Makefile.am | 1 +
|
||||
grub-core/Makefile.core.def | 16 ++---
|
||||
grub-core/commands/backtrace.c | 72 +++++++++++++++++++
|
||||
grub-core/gdb/cstub.c | 1 -
|
||||
grub-core/kern/arm/efi/startup.S | 2 +
|
||||
grub-core/kern/arm/startup.S | 2 +
|
||||
grub-core/kern/arm64/backtrace.c | 94 +++++++++++++++++++++++++
|
||||
grub-core/kern/arm64/efi/startup.S | 2 +
|
||||
grub-core/kern/backtrace.c | 97 +++++++++++++++++++++++++
|
||||
grub-core/kern/dl.c | 45 ++++++++++++
|
||||
grub-core/kern/i386/backtrace.c | 125 +++++++++++++++++++++++++++++++++
|
||||
grub-core/kern/i386/pc/init.c | 4 +-
|
||||
grub-core/kern/i386/qemu/startup.S | 3 +-
|
||||
grub-core/kern/ia64/efi/startup.S | 3 +-
|
||||
grub-core/kern/ieee1275/init.c | 1 -
|
||||
grub-core/kern/misc.c | 13 ++--
|
||||
grub-core/kern/mm.c | 6 +-
|
||||
grub-core/kern/sparc64/ieee1275/crt0.S | 3 +-
|
||||
grub-core/lib/arm64/backtrace.c | 62 ----------------
|
||||
grub-core/lib/backtrace.c | 72 -------------------
|
||||
grub-core/lib/i386/backtrace.c | 78 --------------------
|
||||
include/grub/backtrace.h | 10 ++-
|
||||
include/grub/dl.h | 2 +
|
||||
include/grub/kernel.h | 3 +
|
||||
25 files changed, 485 insertions(+), 238 deletions(-)
|
||||
create mode 100644 grub-core/commands/backtrace.c
|
||||
Makefile.util.def | 6 ++
|
||||
grub-core/Makefile.core.def | 16 ++--
|
||||
grub-core/{lib => commands}/backtrace.c | 2 +-
|
||||
grub-core/gdb/cstub.c | 1 -
|
||||
grub-core/kern/arm64/backtrace.c | 94 ++++++++++++++++++++++++
|
||||
grub-core/kern/backtrace.c | 97 +++++++++++++++++++++++++
|
||||
grub-core/kern/dl.c | 45 ++++++++++++
|
||||
grub-core/kern/i386/backtrace.c | 125 ++++++++++++++++++++++++++++++++
|
||||
grub-core/kern/i386/pc/init.c | 4 +-
|
||||
grub-core/kern/ieee1275/init.c | 1 -
|
||||
grub-core/kern/misc.c | 13 ++--
|
||||
grub-core/kern/mm.c | 6 +-
|
||||
grub-core/lib/arm64/backtrace.c | 62 ----------------
|
||||
grub-core/lib/i386/backtrace.c | 78 --------------------
|
||||
include/grub/backtrace.h | 10 ++-
|
||||
include/grub/dl.h | 2 +
|
||||
include/grub/kernel.h | 3 +
|
||||
grub-core/kern/arm/efi/startup.S | 2 +
|
||||
grub-core/kern/arm/startup.S | 2 +
|
||||
grub-core/kern/arm64/efi/startup.S | 2 +
|
||||
grub-core/kern/i386/qemu/startup.S | 3 +-
|
||||
grub-core/kern/ia64/efi/startup.S | 3 +-
|
||||
grub-core/kern/sparc64/ieee1275/crt0.S | 3 +-
|
||||
grub-core/Makefile.am | 1 +
|
||||
24 files changed, 414 insertions(+), 167 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
|
||||
create mode 100644 grub-core/kern/i386/backtrace.c
|
||||
delete mode 100644 grub-core/lib/arm64/backtrace.c
|
||||
delete mode 100644 grub-core/lib/backtrace.c
|
||||
delete mode 100644 grub-core/lib/i386/backtrace.c
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index f55473c..c13ca68 100644
|
||||
index a90879fa9ba..48512bc6311 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -49,6 +49,12 @@ library = {
|
||||
@@ -51,6 +51,12 @@ library = {
|
||||
common = grub-core/partmap/msdos.c;
|
||||
common = grub-core/fs/proc.c;
|
||||
common = grub-core/fs/archelp.c;
|
||||
@ -56,26 +54,14 @@ index f55473c..c13ca68 100644
|
||||
};
|
||||
|
||||
library = {
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index 5ff3afd..d9ad300 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -66,6 +66,7 @@ CLEANFILES += grub_script.yy.c grub_script.yy.h
|
||||
|
||||
include $(srcdir)/Makefile.core.am
|
||||
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/backtrace.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 528f76a..49c5dc4 100644
|
||||
index 5354f9613d3..4b7c45a7b06 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -140,6 +140,12 @@ kernel = {
|
||||
common = kern/rescue_parser.c;
|
||||
@@ -142,6 +142,12 @@ kernel = {
|
||||
common = kern/rescue_reader.c;
|
||||
common = kern/term.c;
|
||||
common = kern/verifiers.c;
|
||||
+ common = kern/backtrace.c;
|
||||
+
|
||||
+ x86 = kern/i386/backtrace.c;
|
||||
@ -85,7 +71,7 @@ index 528f76a..49c5dc4 100644
|
||||
|
||||
noemu = kern/compiler-rt.c;
|
||||
noemu = kern/mm.c;
|
||||
@@ -186,9 +192,6 @@ kernel = {
|
||||
@@ -188,9 +194,6 @@ kernel = {
|
||||
|
||||
softdiv = lib/division.c;
|
||||
|
||||
@ -95,7 +81,7 @@ index 528f76a..49c5dc4 100644
|
||||
i386 = kern/i386/dl.c;
|
||||
i386_xen = kern/i386/dl.c;
|
||||
i386_xen_pvh = kern/i386/dl.c;
|
||||
@@ -2376,15 +2379,12 @@ module = {
|
||||
@@ -2398,15 +2401,12 @@ module = {
|
||||
|
||||
module = {
|
||||
name = backtrace;
|
||||
@ -113,86 +99,24 @@ index 528f76a..49c5dc4 100644
|
||||
};
|
||||
|
||||
module = {
|
||||
diff --git a/grub-core/commands/backtrace.c b/grub-core/commands/backtrace.c
|
||||
new file mode 100644
|
||||
index 0000000..8b5ec39
|
||||
--- /dev/null
|
||||
diff --git a/grub-core/lib/backtrace.c b/grub-core/commands/backtrace.c
|
||||
similarity index 98%
|
||||
rename from grub-core/lib/backtrace.c
|
||||
rename to grub-core/commands/backtrace.c
|
||||
index c0ad6ab8be1..8b5ec3913b5 100644
|
||||
--- a/grub-core/lib/backtrace.c
|
||||
+++ b/grub-core/commands/backtrace.c
|
||||
@@ -0,0 +1,72 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
+ *
|
||||
+ * GRUB is free software: you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation, either version 3 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * GRUB is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/command.h>
|
||||
+#include <grub/err.h>
|
||||
+#include <grub/dl.h>
|
||||
+#include <grub/mm.h>
|
||||
+#include <grub/term.h>
|
||||
+#include <grub/backtrace.h>
|
||||
+
|
||||
+GRUB_MOD_LICENSE ("GPLv3+");
|
||||
+
|
||||
+void
|
||||
+grub_backtrace_print_address (void *addr)
|
||||
+{
|
||||
+#ifndef GRUB_UTIL
|
||||
+ grub_dl_t mod;
|
||||
+
|
||||
+ FOR_DL_MODULES (mod)
|
||||
+ {
|
||||
+ grub_dl_segment_t segment;
|
||||
+ for (segment = mod->segment; segment; segment = segment->next)
|
||||
+ if (segment->addr <= addr && (grub_uint8_t *) segment->addr
|
||||
+ + segment->size > (grub_uint8_t *) addr)
|
||||
+ {
|
||||
+ grub_printf ("%s.%x+%" PRIxGRUB_SIZE, mod->name, segment->section,
|
||||
+ (grub_size_t) ((grub_uint8_t *) addr - (grub_uint8_t *) segment->addr));
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+#endif
|
||||
+ grub_printf ("%p", addr);
|
||||
+}
|
||||
+
|
||||
+static grub_err_t
|
||||
+grub_cmd_backtrace (grub_command_t cmd __attribute__ ((unused)),
|
||||
+ int argc __attribute__ ((unused)),
|
||||
+ char **args __attribute__ ((unused)))
|
||||
+{
|
||||
@@ -54,7 +54,7 @@ grub_cmd_backtrace (grub_command_t cmd __attribute__ ((unused)),
|
||||
int argc __attribute__ ((unused)),
|
||||
char **args __attribute__ ((unused)))
|
||||
{
|
||||
- grub_backtrace ();
|
||||
+ grub_backtrace (1);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static grub_command_t cmd;
|
||||
+
|
||||
+GRUB_MOD_INIT(backtrace)
|
||||
+{
|
||||
+ cmd = grub_register_command ("backtrace", grub_cmd_backtrace,
|
||||
+ 0, N_("Print backtrace."));
|
||||
+}
|
||||
+
|
||||
+GRUB_MOD_FINI(backtrace)
|
||||
+{
|
||||
+ grub_unregister_command (cmd);
|
||||
+}
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/grub-core/gdb/cstub.c b/grub-core/gdb/cstub.c
|
||||
index b64acd7..9928147 100644
|
||||
index b64acd70fee..99281472d36 100644
|
||||
--- a/grub-core/gdb/cstub.c
|
||||
+++ b/grub-core/gdb/cstub.c
|
||||
@@ -215,7 +215,6 @@ grub_gdb_trap (int trap_no)
|
||||
@ -203,35 +127,9 @@ index b64acd7..9928147 100644
|
||||
grub_fatal ("Unhandled exception");
|
||||
}
|
||||
|
||||
diff --git a/grub-core/kern/arm/efi/startup.S b/grub-core/kern/arm/efi/startup.S
|
||||
index 9f82653..f3bc41f 100644
|
||||
--- a/grub-core/kern/arm/efi/startup.S
|
||||
+++ b/grub-core/kern/arm/efi/startup.S
|
||||
@@ -23,6 +23,8 @@
|
||||
.file "startup.S"
|
||||
.text
|
||||
.arm
|
||||
+ .globl start, _start
|
||||
+FUNCTION(start)
|
||||
FUNCTION(_start)
|
||||
/*
|
||||
* EFI_SYSTEM_TABLE and EFI_HANDLE are passed in r1/r0.
|
||||
diff --git a/grub-core/kern/arm/startup.S b/grub-core/kern/arm/startup.S
|
||||
index 3946fe8..5679a1d 100644
|
||||
--- a/grub-core/kern/arm/startup.S
|
||||
+++ b/grub-core/kern/arm/startup.S
|
||||
@@ -48,6 +48,8 @@
|
||||
|
||||
.text
|
||||
.arm
|
||||
+ .globl start, _start
|
||||
+FUNCTION(start)
|
||||
FUNCTION(_start)
|
||||
b codestart
|
||||
|
||||
diff --git a/grub-core/kern/arm64/backtrace.c b/grub-core/kern/arm64/backtrace.c
|
||||
new file mode 100644
|
||||
index 0000000..019c6fd
|
||||
index 00000000000..019c6fdfef2
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/arm64/backtrace.c
|
||||
@@ -0,0 +1,94 @@
|
||||
@ -329,23 +227,9 @@ index 0000000..019c6fd
|
||||
+ skip += 1;
|
||||
+ grub_backtrace_pointer(__builtin_frame_address(0), skip);
|
||||
+}
|
||||
diff --git a/grub-core/kern/arm64/efi/startup.S b/grub-core/kern/arm64/efi/startup.S
|
||||
index 666a7ee..41676bd 100644
|
||||
--- a/grub-core/kern/arm64/efi/startup.S
|
||||
+++ b/grub-core/kern/arm64/efi/startup.S
|
||||
@@ -19,7 +19,9 @@
|
||||
#include <grub/symbol.h>
|
||||
|
||||
.file "startup.S"
|
||||
+ .globl start, _start
|
||||
.text
|
||||
+FUNCTION(start)
|
||||
FUNCTION(_start)
|
||||
/*
|
||||
* EFI_SYSTEM_TABLE and EFI_HANDLE are passed in x1/x0.
|
||||
diff --git a/grub-core/kern/backtrace.c b/grub-core/kern/backtrace.c
|
||||
new file mode 100644
|
||||
index 0000000..4a82e86
|
||||
index 00000000000..4a82e865cc6
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/backtrace.c
|
||||
@@ -0,0 +1,97 @@
|
||||
@ -447,7 +331,7 @@ index 0000000..4a82e86
|
||||
+ grub_backtrace (skip + 1);
|
||||
+}
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index d7718d2..2e57e5e 100644
|
||||
index 7afb9e6f724..88d2077709e 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -124,6 +124,50 @@ grub_dl_resolve_symbol (const char *name)
|
||||
@ -511,7 +395,7 @@ index d7718d2..2e57e5e 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 0000000..2413f9a
|
||||
index 00000000000..2413f9a57db
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/i386/backtrace.c
|
||||
@@ -0,0 +1,125 @@
|
||||
@ -641,7 +525,7 @@ index 0000000..2413f9a
|
||||
+#endif
|
||||
+}
|
||||
diff --git a/grub-core/kern/i386/pc/init.c b/grub-core/kern/i386/pc/init.c
|
||||
index 27bc68b..b51d0ab 100644
|
||||
index 27bc68b8a53..b51d0abfa6e 100644
|
||||
--- a/grub-core/kern/i386/pc/init.c
|
||||
+++ b/grub-core/kern/i386/pc/init.c
|
||||
@@ -153,7 +153,7 @@ compact_mem_regions (void)
|
||||
@ -662,37 +546,8 @@ index 27bc68b..b51d0ab 100644
|
||||
|
||||
/* Initialize the console as early as possible. */
|
||||
grub_console_init ();
|
||||
diff --git a/grub-core/kern/i386/qemu/startup.S b/grub-core/kern/i386/qemu/startup.S
|
||||
index 0d89858..939f182 100644
|
||||
--- a/grub-core/kern/i386/qemu/startup.S
|
||||
+++ b/grub-core/kern/i386/qemu/startup.S
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
.text
|
||||
.code32
|
||||
- .globl _start
|
||||
+ .globl start, _start
|
||||
+start:
|
||||
_start:
|
||||
jmp codestart
|
||||
|
||||
diff --git a/grub-core/kern/ia64/efi/startup.S b/grub-core/kern/ia64/efi/startup.S
|
||||
index d75c6d7..8f2a593 100644
|
||||
--- a/grub-core/kern/ia64/efi/startup.S
|
||||
+++ b/grub-core/kern/ia64/efi/startup.S
|
||||
@@ -24,8 +24,9 @@
|
||||
.psr lsb
|
||||
.lsb
|
||||
|
||||
- .global _start
|
||||
+ .global start, _start
|
||||
.proc _start
|
||||
+start:
|
||||
_start:
|
||||
alloc loc0=ar.pfs,2,4,0,0
|
||||
mov loc1=rp
|
||||
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
|
||||
index 0cd2a62..937c1bc 100644
|
||||
index 0cd2a627231..937c1bc44cb 100644
|
||||
--- a/grub-core/kern/ieee1275/init.c
|
||||
+++ b/grub-core/kern/ieee1275/init.c
|
||||
@@ -63,7 +63,6 @@
|
||||
@ -704,11 +559,11 @@ index 0cd2a62..937c1bc 100644
|
||||
|
||||
#ifdef __sparc__
|
||||
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
|
||||
index e758ab3..5c2d203 100644
|
||||
index c60601b699d..a432a6be54a 100644
|
||||
--- a/grub-core/kern/misc.c
|
||||
+++ b/grub-core/kern/misc.c
|
||||
@@ -1110,15 +1110,15 @@ grub_xasprintf (const char *fmt, ...)
|
||||
}
|
||||
@@ -1197,15 +1197,15 @@ grub_printf_fmt_check (const char *fmt, const char *fmt_expected)
|
||||
|
||||
|
||||
/* Abort GRUB. This function does not return. */
|
||||
-static void __attribute__ ((noreturn))
|
||||
@ -718,18 +573,18 @@ index e758ab3..5c2d203 100644
|
||||
-#ifndef GRUB_UTIL
|
||||
-#if (defined(__i386__) || defined(__x86_64__)) && !defined(GRUB_MACHINE_EMU)
|
||||
- grub_backtrace();
|
||||
-#endif
|
||||
+#if !defined(GRUB_MACHINE_EMU) && !defined(GRUB_UTIL)
|
||||
+ grub_backtrace (1);
|
||||
+#else
|
||||
+ grub_printf ("\n");
|
||||
#endif
|
||||
-#endif
|
||||
- grub_printf ("\nAborted.");
|
||||
+ grub_printf ("Aborted.");
|
||||
|
||||
#ifndef GRUB_UTIL
|
||||
if (grub_term_inputs)
|
||||
@@ -1145,6 +1145,7 @@ grub_fatal (const char *fmt, ...)
|
||||
@@ -1232,6 +1232,7 @@ grub_fatal (const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
@ -738,10 +593,10 @@ index e758ab3..5c2d203 100644
|
||||
grub_vprintf (_(fmt), ap);
|
||||
va_end (ap);
|
||||
diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
|
||||
index ee88ff6..002cbfa 100644
|
||||
index c070afc621f..d8c8377578b 100644
|
||||
--- a/grub-core/kern/mm.c
|
||||
+++ b/grub-core/kern/mm.c
|
||||
@@ -95,13 +95,13 @@ get_header_from_pointer (void *ptr, grub_mm_header_t *p, grub_mm_region_t *r)
|
||||
@@ -97,13 +97,13 @@ get_header_from_pointer (void *ptr, grub_mm_header_t *p, grub_mm_region_t *r)
|
||||
break;
|
||||
|
||||
if (! *r)
|
||||
@ -758,23 +613,9 @@ index ee88ff6..002cbfa 100644
|
||||
(unsigned long) (*p)->magic);
|
||||
}
|
||||
|
||||
diff --git a/grub-core/kern/sparc64/ieee1275/crt0.S b/grub-core/kern/sparc64/ieee1275/crt0.S
|
||||
index 03b916f..701bf63 100644
|
||||
--- a/grub-core/kern/sparc64/ieee1275/crt0.S
|
||||
+++ b/grub-core/kern/sparc64/ieee1275/crt0.S
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
.text
|
||||
.align 4
|
||||
- .globl _start
|
||||
+ .globl start, _start
|
||||
+start:
|
||||
_start:
|
||||
ba codestart
|
||||
mov %o4, %o0
|
||||
diff --git a/grub-core/lib/arm64/backtrace.c b/grub-core/lib/arm64/backtrace.c
|
||||
deleted file mode 100644
|
||||
index 1079b53..0000000
|
||||
index 1079b5380e1..00000000000
|
||||
--- a/grub-core/lib/arm64/backtrace.c
|
||||
+++ /dev/null
|
||||
@@ -1,62 +0,0 @@
|
||||
@ -840,87 +681,9 @@ index 1079b53..0000000
|
||||
- grub_backtrace_pointer (1);
|
||||
-}
|
||||
-
|
||||
diff --git a/grub-core/lib/backtrace.c b/grub-core/lib/backtrace.c
|
||||
deleted file mode 100644
|
||||
index c0ad6ab..0000000
|
||||
--- a/grub-core/lib/backtrace.c
|
||||
+++ /dev/null
|
||||
@@ -1,72 +0,0 @@
|
||||
-/*
|
||||
- * GRUB -- GRand Unified Bootloader
|
||||
- * Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
- *
|
||||
- * GRUB is free software: you can redistribute it and/or modify
|
||||
- * it under the terms of the GNU General Public License as published by
|
||||
- * the Free Software Foundation, either version 3 of the License, or
|
||||
- * (at your option) any later version.
|
||||
- *
|
||||
- * GRUB is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- * GNU General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU General Public License
|
||||
- * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
- */
|
||||
-
|
||||
-#include <grub/misc.h>
|
||||
-#include <grub/command.h>
|
||||
-#include <grub/err.h>
|
||||
-#include <grub/dl.h>
|
||||
-#include <grub/mm.h>
|
||||
-#include <grub/term.h>
|
||||
-#include <grub/backtrace.h>
|
||||
-
|
||||
-GRUB_MOD_LICENSE ("GPLv3+");
|
||||
-
|
||||
-void
|
||||
-grub_backtrace_print_address (void *addr)
|
||||
-{
|
||||
-#ifndef GRUB_UTIL
|
||||
- grub_dl_t mod;
|
||||
-
|
||||
- FOR_DL_MODULES (mod)
|
||||
- {
|
||||
- grub_dl_segment_t segment;
|
||||
- for (segment = mod->segment; segment; segment = segment->next)
|
||||
- if (segment->addr <= addr && (grub_uint8_t *) segment->addr
|
||||
- + segment->size > (grub_uint8_t *) addr)
|
||||
- {
|
||||
- grub_printf ("%s.%x+%" PRIxGRUB_SIZE, mod->name, segment->section,
|
||||
- (grub_size_t) ((grub_uint8_t *) addr - (grub_uint8_t *) segment->addr));
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-#endif
|
||||
- grub_printf ("%p", addr);
|
||||
-}
|
||||
-
|
||||
-static grub_err_t
|
||||
-grub_cmd_backtrace (grub_command_t cmd __attribute__ ((unused)),
|
||||
- int argc __attribute__ ((unused)),
|
||||
- char **args __attribute__ ((unused)))
|
||||
-{
|
||||
- grub_backtrace ();
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static grub_command_t cmd;
|
||||
-
|
||||
-GRUB_MOD_INIT(backtrace)
|
||||
-{
|
||||
- cmd = grub_register_command ("backtrace", grub_cmd_backtrace,
|
||||
- 0, N_("Print backtrace."));
|
||||
-}
|
||||
-
|
||||
-GRUB_MOD_FINI(backtrace)
|
||||
-{
|
||||
- grub_unregister_command (cmd);
|
||||
-}
|
||||
diff --git a/grub-core/lib/i386/backtrace.c b/grub-core/lib/i386/backtrace.c
|
||||
deleted file mode 100644
|
||||
index c67273d..0000000
|
||||
index c67273db3ae..00000000000
|
||||
--- a/grub-core/lib/i386/backtrace.c
|
||||
+++ /dev/null
|
||||
@@ -1,78 +0,0 @@
|
||||
@ -1003,7 +766,7 @@ index c67273d..0000000
|
||||
-}
|
||||
-
|
||||
diff --git a/include/grub/backtrace.h b/include/grub/backtrace.h
|
||||
index 3955197..275cf85 100644
|
||||
index 395519762f0..275cf85e2d3 100644
|
||||
--- a/include/grub/backtrace.h
|
||||
+++ b/include/grub/backtrace.h
|
||||
@@ -19,8 +19,14 @@
|
||||
@ -1024,10 +787,10 @@ index 3955197..275cf85 100644
|
||||
|
||||
#endif
|
||||
diff --git a/include/grub/dl.h b/include/grub/dl.h
|
||||
index 90dc9bb..4fe2b52 100644
|
||||
index 91933b85f2c..2f76e6b0437 100644
|
||||
--- a/include/grub/dl.h
|
||||
+++ b/include/grub/dl.h
|
||||
@@ -257,6 +257,8 @@ grub_dl_is_persistent (grub_dl_t mod)
|
||||
@@ -259,6 +259,8 @@ grub_dl_is_persistent (grub_dl_t mod)
|
||||
|
||||
#endif
|
||||
|
||||
@ -1037,10 +800,10 @@ index 90dc9bb..4fe2b52 100644
|
||||
int isfunc, grub_dl_t mod);
|
||||
|
||||
diff --git a/include/grub/kernel.h b/include/grub/kernel.h
|
||||
index 133a37c..e5a5f43 100644
|
||||
index abbca5ea335..300a9766cda 100644
|
||||
--- a/include/grub/kernel.h
|
||||
+++ b/include/grub/kernel.h
|
||||
@@ -110,6 +110,9 @@ grub_addr_t grub_modules_get_end (void);
|
||||
@@ -111,6 +111,9 @@ grub_addr_t grub_modules_get_end (void);
|
||||
|
||||
#endif
|
||||
|
||||
@ -1050,6 +813,98 @@ index 133a37c..e5a5f43 100644
|
||||
/* The start point of the C code. */
|
||||
void grub_main (void) __attribute__ ((noreturn));
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
diff --git a/grub-core/kern/arm/efi/startup.S b/grub-core/kern/arm/efi/startup.S
|
||||
index 9f8265315a9..f3bc41f9d0f 100644
|
||||
--- a/grub-core/kern/arm/efi/startup.S
|
||||
+++ b/grub-core/kern/arm/efi/startup.S
|
||||
@@ -23,6 +23,8 @@
|
||||
.file "startup.S"
|
||||
.text
|
||||
.arm
|
||||
+ .globl start, _start
|
||||
+FUNCTION(start)
|
||||
FUNCTION(_start)
|
||||
/*
|
||||
* EFI_SYSTEM_TABLE and EFI_HANDLE are passed in r1/r0.
|
||||
diff --git a/grub-core/kern/arm/startup.S b/grub-core/kern/arm/startup.S
|
||||
index 3946fe8e183..5679a1d00ad 100644
|
||||
--- a/grub-core/kern/arm/startup.S
|
||||
+++ b/grub-core/kern/arm/startup.S
|
||||
@@ -48,6 +48,8 @@
|
||||
|
||||
.text
|
||||
.arm
|
||||
+ .globl start, _start
|
||||
+FUNCTION(start)
|
||||
FUNCTION(_start)
|
||||
b codestart
|
||||
|
||||
diff --git a/grub-core/kern/arm64/efi/startup.S b/grub-core/kern/arm64/efi/startup.S
|
||||
index 666a7ee3c92..41676bdb2b8 100644
|
||||
--- a/grub-core/kern/arm64/efi/startup.S
|
||||
+++ b/grub-core/kern/arm64/efi/startup.S
|
||||
@@ -19,7 +19,9 @@
|
||||
#include <grub/symbol.h>
|
||||
|
||||
.file "startup.S"
|
||||
+ .globl start, _start
|
||||
.text
|
||||
+FUNCTION(start)
|
||||
FUNCTION(_start)
|
||||
/*
|
||||
* EFI_SYSTEM_TABLE and EFI_HANDLE are passed in x1/x0.
|
||||
diff --git a/grub-core/kern/i386/qemu/startup.S b/grub-core/kern/i386/qemu/startup.S
|
||||
index 0d89858d9b3..939f182fc74 100644
|
||||
--- a/grub-core/kern/i386/qemu/startup.S
|
||||
+++ b/grub-core/kern/i386/qemu/startup.S
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
.text
|
||||
.code32
|
||||
- .globl _start
|
||||
+ .globl start, _start
|
||||
+start:
|
||||
_start:
|
||||
jmp codestart
|
||||
|
||||
diff --git a/grub-core/kern/ia64/efi/startup.S b/grub-core/kern/ia64/efi/startup.S
|
||||
index d75c6d7cc74..8f2a593e529 100644
|
||||
--- a/grub-core/kern/ia64/efi/startup.S
|
||||
+++ b/grub-core/kern/ia64/efi/startup.S
|
||||
@@ -24,8 +24,9 @@
|
||||
.psr lsb
|
||||
.lsb
|
||||
|
||||
- .global _start
|
||||
+ .global start, _start
|
||||
.proc _start
|
||||
+start:
|
||||
_start:
|
||||
alloc loc0=ar.pfs,2,4,0,0
|
||||
mov loc1=rp
|
||||
diff --git a/grub-core/kern/sparc64/ieee1275/crt0.S b/grub-core/kern/sparc64/ieee1275/crt0.S
|
||||
index 03b916f0534..701bf63abcf 100644
|
||||
--- a/grub-core/kern/sparc64/ieee1275/crt0.S
|
||||
+++ b/grub-core/kern/sparc64/ieee1275/crt0.S
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
.text
|
||||
.align 4
|
||||
- .globl _start
|
||||
+ .globl start, _start
|
||||
+start:
|
||||
_start:
|
||||
ba codestart
|
||||
mov %o4, %o0
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index 80e7a83edf9..f512573c0da 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -66,6 +66,7 @@ CLEANFILES += grub_script.yy.c grub_script.yy.h
|
||||
|
||||
include $(srcdir)/Makefile.core.am
|
||||
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/backtrace.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
|
||||
@ -1,64 +0,0 @@
|
||||
From be6b7ff630f73fe21b797d5396a29944262d3805 Mon Sep 17 00:00:00 2001
|
||||
From: Lenny Szubowicz <lszubowi@redhat.com>
|
||||
Date: Mon, 29 Aug 2016 11:04:48 -0400
|
||||
Subject: [PATCH 066/220] Normalize slashes in tftp paths.
|
||||
|
||||
Some tftp servers do not handle multiple consecutive slashes correctly;
|
||||
this patch avoids sending tftp requests with non-normalized paths.
|
||||
|
||||
Signed-off-by: Lenny Szubowicz <lszubowi@redhat.com>
|
||||
[msalter: fix malformed tftp packets]
|
||||
Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||
---
|
||||
grub-core/net/tftp.c | 28 +++++++++++++++++++++++++---
|
||||
1 file changed, 25 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
|
||||
index 1157524..dcd8249 100644
|
||||
--- a/grub-core/net/tftp.c
|
||||
+++ b/grub-core/net/tftp.c
|
||||
@@ -300,6 +300,25 @@ destroy_pq (tftp_data_t data)
|
||||
grub_priority_queue_destroy (data->pq);
|
||||
}
|
||||
|
||||
+/* Create a normalized copy of the filename.
|
||||
+ Compress any string of consecutive forward slashes to a single forward
|
||||
+ slash. */
|
||||
+static void
|
||||
+grub_normalize_filename (char *normalized, const char *filename)
|
||||
+{
|
||||
+ char *dest = normalized;
|
||||
+ char *src = filename;
|
||||
+
|
||||
+ while (*src != '\0')
|
||||
+ {
|
||||
+ if (src[0] == '/' && src[1] == '/')
|
||||
+ src++;
|
||||
+ else
|
||||
+ *dest++ = *src++;
|
||||
+ }
|
||||
+ *dest = '\0';
|
||||
+}
|
||||
+
|
||||
static grub_err_t
|
||||
tftp_open (struct grub_file *file, const char *filename)
|
||||
{
|
||||
@@ -337,9 +356,12 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
rrqlen = 0;
|
||||
|
||||
tftph->opcode = grub_cpu_to_be16_compile_time (TFTP_RRQ);
|
||||
- grub_strcpy (rrq, filename);
|
||||
- rrqlen += grub_strlen (filename) + 1;
|
||||
- rrq += grub_strlen (filename) + 1;
|
||||
+
|
||||
+ /* Copy and normalize the filename to work-around issues on some tftp
|
||||
+ servers when file names are being matched for remapping. */
|
||||
+ grub_normalize_filename (rrq, filename);
|
||||
+ rrqlen += grub_strlen (rrq) + 1;
|
||||
+ rrq += grub_strlen (rrq) + 1;
|
||||
|
||||
grub_strcpy (rrq, "octet");
|
||||
rrqlen += grub_strlen ("octet") + 1;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
From e215e2c09bc7d7e970f4b644c30a1a3818829bfb Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 9 Nov 2017 15:58:52 -0500
|
||||
Subject: [PATCH 101/220] normal: don't draw our startup message if debug is
|
||||
set
|
||||
Subject: [PATCH] normal: don't draw our startup message if debug is set
|
||||
|
||||
---
|
||||
grub-core/normal/main.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 2fe6743..f7ee912 100644
|
||||
index d5df4f815b0..1970e4816a8 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -425,6 +425,9 @@ grub_normal_reader_init (int nested)
|
||||
@@ -430,6 +430,9 @@ grub_normal_reader_init (int nested)
|
||||
const char *msg_esc = _("ESC at any time exits.");
|
||||
char *msg_formatted;
|
||||
|
||||
@ -22,6 +21,3 @@ index 2fe6743..f7ee912 100644
|
||||
msg_formatted = grub_xasprintf (_("Minimal BASH-like line editing is supported. For "
|
||||
"the first word, TAB lists possible command completions. Anywhere "
|
||||
"else TAB lists possible device or file completions. %s"),
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 5327dd96cf5e2323a3aaac3f191ed72ad3d7294b Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 16 Mar 2018 13:28:57 -0400
|
||||
Subject: [PATCH 102/220] Work around some minor include path weirdnesses
|
||||
Subject: [PATCH] Work around some minor include path weirdnesses
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
|
||||
diff --git a/include/grub/arm/efi/console.h b/include/grub/arm/efi/console.h
|
||||
new file mode 100644
|
||||
index 0000000..1592f6f
|
||||
index 00000000000..1592f6f76b5
|
||||
--- /dev/null
|
||||
+++ b/include/grub/arm/efi/console.h
|
||||
@@ -0,0 +1,24 @@
|
||||
@ -47,7 +47,7 @@ index 0000000..1592f6f
|
||||
+#endif /* ! GRUB_ARM_EFI_CONSOLE_H */
|
||||
diff --git a/include/grub/arm64/efi/console.h b/include/grub/arm64/efi/console.h
|
||||
new file mode 100644
|
||||
index 0000000..9568933
|
||||
index 00000000000..95689339384
|
||||
--- /dev/null
|
||||
+++ b/include/grub/arm64/efi/console.h
|
||||
@@ -0,0 +1,24 @@
|
||||
@ -77,7 +77,7 @@ index 0000000..9568933
|
||||
+#endif /* ! GRUB_ARM64_EFI_CONSOLE_H */
|
||||
diff --git a/include/grub/i386/efi/console.h b/include/grub/i386/efi/console.h
|
||||
new file mode 100644
|
||||
index 0000000..9231375
|
||||
index 00000000000..9231375cb07
|
||||
--- /dev/null
|
||||
+++ b/include/grub/i386/efi/console.h
|
||||
@@ -0,0 +1,24 @@
|
||||
@ -107,7 +107,7 @@ index 0000000..9231375
|
||||
+#endif /* ! GRUB_I386_EFI_CONSOLE_H */
|
||||
diff --git a/include/grub/x86_64/efi/console.h b/include/grub/x86_64/efi/console.h
|
||||
new file mode 100644
|
||||
index 0000000..dba9d86
|
||||
index 00000000000..dba9d8678d0
|
||||
--- /dev/null
|
||||
+++ b/include/grub/x86_64/efi/console.h
|
||||
@@ -0,0 +1,24 @@
|
||||
@ -135,6 +135,3 @@ index 0000000..dba9d86
|
||||
+#include <efi/console.h>
|
||||
+
|
||||
+#endif /* ! GRUB_X86_64_EFI_CONSOLE_H */
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,16 +1,36 @@
|
||||
From cc30961c213539793d723cd1ce0c61b8a5553c12 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 25 Jun 2015 15:41:06 -0400
|
||||
Subject: [PATCH 103/220] Make it possible to enabled --build-id=sha1
|
||||
Subject: [PATCH] Make it possible to enabled --build-id=sha1
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
acinclude.m4 | 19 +++++++++++++++++++
|
||||
configure.ac | 8 ++++++++
|
||||
acinclude.m4 | 19 +++++++++++++++++++
|
||||
2 files changed, 27 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a0030632220..b50fb2e9897 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1470,7 +1470,15 @@ grub_PROG_TARGET_CC
|
||||
if test "x$TARGET_APPLE_LINKER" != x1 ; then
|
||||
grub_PROG_OBJCOPY_ABSOLUTE
|
||||
fi
|
||||
+
|
||||
+AC_ARG_ENABLE([build-id],
|
||||
+ [AS_HELP_STRING([--enable-build-id],
|
||||
+ [ask the linker to supply build-id notes (default=no)])])
|
||||
+if test x$enable_build_id = xyes; then
|
||||
+grub_PROG_LD_BUILD_ID_SHA1
|
||||
+else
|
||||
grub_PROG_LD_BUILD_ID_NONE
|
||||
+fi
|
||||
if test "x$target_cpu" = xi386; then
|
||||
if test "$platform" != emu && test "x$TARGET_APPLE_LINKER" != x1 ; then
|
||||
if test ! -z "$TARGET_IMG_LDSCRIPT"; then
|
||||
diff --git a/acinclude.m4 b/acinclude.m4
|
||||
index 78cdf6e..242e829 100644
|
||||
index 6e14bb553c6..21238fcfd03 100644
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -136,6 +136,25 @@ if test "x$grub_cv_prog_ld_build_id_none" = xyes; then
|
||||
@ -39,26 +59,3 @@ index 78cdf6e..242e829 100644
|
||||
dnl Check nm
|
||||
AC_DEFUN([grub_PROG_NM_WORKS],
|
||||
[AC_MSG_CHECKING([whether nm works])
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index eb851b8..8ee18ba 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1414,7 +1414,15 @@ grub_PROG_TARGET_CC
|
||||
if test "x$TARGET_APPLE_LINKER" != x1 ; then
|
||||
grub_PROG_OBJCOPY_ABSOLUTE
|
||||
fi
|
||||
+
|
||||
+AC_ARG_ENABLE([build-id],
|
||||
+ [AS_HELP_STRING([--enable-build-id],
|
||||
+ [ask the linker to supply build-id notes (default=no)])])
|
||||
+if test x$enable_build_id = xyes; then
|
||||
+grub_PROG_LD_BUILD_ID_SHA1
|
||||
+else
|
||||
grub_PROG_LD_BUILD_ID_NONE
|
||||
+fi
|
||||
if test "x$target_cpu" = xi386; then
|
||||
if test "$platform" != emu && test "x$TARGET_APPLE_LINKER" != x1 ; then
|
||||
if test ! -z "$TARGET_IMG_LDSCRIPT"; then
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user