Accepting request 1205665 from Base:System
OBS-URL: https://build.opensuse.org/request/show/1205665 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=336
This commit is contained in:
commit
6d39cc776d
@ -0,0 +1,55 @@
|
||||
From 8b9234c7e482edd49a9b3377da8e48fbd54aab28 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Tue, 24 Sep 2024 18:59:34 +0800
|
||||
Subject: [PATCH] efinet: Skip virtual VLAN devices during card enumeration
|
||||
|
||||
Similar to the fix in commit "c52ae4057 efinet: skip virtual IPv4 and
|
||||
IPv6 devices during card enumeration", the UEFI PXE driver creates
|
||||
additional VLAN child devices when a VLAN ID is configured on a network
|
||||
interface associated with a physical NIC. These virtual VLAN devices
|
||||
must be skipped during card enumeration to ensure that the subsequent
|
||||
SNP exclusive open operation targets the correct physical card
|
||||
instances, otherwise packet transfer would fail.
|
||||
|
||||
Example device path with VLAN nodes:
|
||||
|
||||
/MAC(123456789ABC,0x1)/Vlan(20)/IPv4(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)
|
||||
|
||||
Signed-Off-by: Michael Chang <mchang@suse.com>
|
||||
---
|
||||
grub-core/net/drivers/efi/efinet.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
|
||||
index 720b5d0e1..3d0bf34fa 100644
|
||||
--- a/grub-core/net/drivers/efi/efinet.c
|
||||
+++ b/grub-core/net/drivers/efi/efinet.c
|
||||
@@ -280,7 +280,8 @@ grub_efinet_findcards (void)
|
||||
|| GRUB_EFI_DEVICE_PATH_SUBTYPE (child) == GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE)
|
||||
&& parent
|
||||
&& GRUB_EFI_DEVICE_PATH_TYPE (parent) == GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE
|
||||
- && GRUB_EFI_DEVICE_PATH_SUBTYPE (parent) == GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE)
|
||||
+ && (GRUB_EFI_DEVICE_PATH_SUBTYPE (parent) == GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE
|
||||
+ || GRUB_EFI_DEVICE_PATH_SUBTYPE (parent) == GRUB_EFI_VLAN_DEVICE_PATH_SUBTYPE))
|
||||
continue;
|
||||
|
||||
net = grub_efi_open_protocol (*handle, &net_io_guid,
|
||||
@@ -810,6 +811,15 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
dup_ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
|
||||
dup_ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
|
||||
dup_ldp->length = sizeof (*dup_ldp);
|
||||
+
|
||||
+ dup_ldp = grub_efi_find_last_device_path (dup_dp);
|
||||
+ if (GRUB_EFI_DEVICE_PATH_SUBTYPE (dup_ldp) == GRUB_EFI_VLAN_DEVICE_PATH_SUBTYPE)
|
||||
+ {
|
||||
+ dup_ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
|
||||
+ dup_ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
|
||||
+ dup_ldp->length = sizeof (*dup_ldp);
|
||||
+ }
|
||||
+
|
||||
match = grub_efi_compare_device_paths (dup_dp, cdp) == 0;
|
||||
grub_free (dup_dp);
|
||||
if (!match)
|
||||
--
|
||||
2.46.1
|
||||
|
48
0001-fix-grub-screen-filled-with-post-screen-artifects.patch
Normal file
48
0001-fix-grub-screen-filled-with-post-screen-artifects.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From 44f3c7978a8ac5cc94a5c885ac9e983ba2980f5e Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Wed, 29 May 2024 12:32:32 +0800
|
||||
Subject: [PATCH] fix grub screen filled with post screen artifects
|
||||
|
||||
---
|
||||
grub-core/normal/menu.c | 7 ++++---
|
||||
grub-core/term/efi/console.c | 2 +-
|
||||
2 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
|
||||
index 1df2638d7..b11b28e0d 100644
|
||||
--- a/grub-core/normal/menu.c
|
||||
+++ b/grub-core/normal/menu.c
|
||||
@@ -975,13 +975,14 @@ show_menu (grub_menu_t menu, int nested, int autobooted)
|
||||
if (! e)
|
||||
continue; /* Menu is empty. */
|
||||
|
||||
- grub_cls ();
|
||||
-
|
||||
if (auto_boot)
|
||||
grub_menu_execute_with_fallback (menu, e, autobooted,
|
||||
&execution_callback, ¬ify_boot);
|
||||
else
|
||||
- grub_menu_execute_entry (e, 0);
|
||||
+ {
|
||||
+ grub_cls ();
|
||||
+ grub_menu_execute_entry (e, 0);
|
||||
+ }
|
||||
if (autobooted)
|
||||
break;
|
||||
}
|
||||
diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c
|
||||
index bb587f39d..258b52737 100644
|
||||
--- a/grub-core/term/efi/console.c
|
||||
+++ b/grub-core/term/efi/console.c
|
||||
@@ -432,7 +432,7 @@ grub_console_cls (struct grub_term_output *term __attribute__ ((unused)))
|
||||
grub_efi_simple_text_output_interface_t *o;
|
||||
grub_efi_int32_t orig_attr;
|
||||
|
||||
- if (grub_efi_is_finished || text_mode != GRUB_TEXT_MODE_AVAILABLE)
|
||||
+ if (grub_prepare_for_text_output (term) != GRUB_ERR_NONE)
|
||||
return;
|
||||
|
||||
o = grub_efi_system_table->con_out;
|
||||
--
|
||||
2.45.1
|
||||
|
44
0001-tpm-Skip-loopback-image-measurement.patch
Normal file
44
0001-tpm-Skip-loopback-image-measurement.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From cda4b7a415eb45743ea54a7760b302c0cfe718cf Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Mon, 23 Sep 2024 10:32:18 +0800
|
||||
Subject: [PATCH] tpm: Skip loopback image measurement
|
||||
|
||||
The loopback image is configured to function as a disk by being mapped
|
||||
as a block device. Instead of measuring the entire block device, we
|
||||
should focus on tracking the individual files accessed from it. For
|
||||
example, we do not directly measure block devices like disk hd0, but the
|
||||
files opened from it.
|
||||
|
||||
This method is important to avoid running out of memory, since loopback
|
||||
images can be very large. Trying to read and measure the whole image at
|
||||
once could cause out of memory errors and disrupt the boot process.
|
||||
|
||||
Signed-Off-by: Michael Chang <mchang@suse.com>
|
||||
---
|
||||
grub-core/commands/tpm.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/grub-core/commands/tpm.c b/grub-core/commands/tpm.c
|
||||
index bb9aee210..ebbb4fef0 100644
|
||||
--- a/grub-core/commands/tpm.c
|
||||
+++ b/grub-core/commands/tpm.c
|
||||
@@ -41,6 +41,16 @@ grub_tpm_verify_init (grub_file_t io,
|
||||
{
|
||||
*context = io->name;
|
||||
*flags |= GRUB_VERIFY_FLAGS_SINGLE_CHUNK;
|
||||
+
|
||||
+ /*
|
||||
+ * The loopback image is mapped as a disk, allowing it to function like a
|
||||
+ * block device. However, we measure the files read from the block device,
|
||||
+ * not the device itself. For example, we don't measure block devices like
|
||||
+ * disk hd0 directly. This process is crucial to prevent out-of-memory
|
||||
+ * errors, as loopback images are inherently large.
|
||||
+ */
|
||||
+ if ((type & GRUB_FILE_TYPE_MASK) == GRUB_FILE_TYPE_LOOPBACK)
|
||||
+ *flags = GRUB_VERIFY_FLAGS_SKIP_VERIFICATION;
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
--
|
||||
2.46.1
|
||||
|
@ -21,6 +21,11 @@ v2 -> v3 (by fvogt@suse.de)
|
||||
|
||||
- make it a runtime decision (bsc#1164385)
|
||||
|
||||
v3 -> v4
|
||||
|
||||
- display the message only when necessary
|
||||
- clear the screen to enhance visual comfort (bsc#1224465)
|
||||
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -552,6 +552,12 @@
|
||||
@ -38,17 +43,25 @@ v2 -> v3 (by fvogt@suse.de)
|
||||
name = grub-mkrescue;
|
||||
--- a/util/grub.d/00_header.in
|
||||
+++ b/util/grub.d/00_header.in
|
||||
@@ -247,6 +247,10 @@
|
||||
@@ -246,6 +246,18 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
cat << EOF
|
||||
+if echo "$GRUB_TERMINAL_OUTPUT" | grep -qwv console &&
|
||||
+ ([ x"$GRUB_TIMEOUT_STYLE" = xmenu ] ||
|
||||
+ ([ x"$GRUB_TIMEOUT_STYLE" = x ] &&
|
||||
+ [ x"$GRUB_HIDDEN_TIMEOUT" = x -o x"$GRUB_HIDDEN_TIMEOUT" = x0 ])); then
|
||||
+ cat <<EOF
|
||||
+ if [ "\${grub_platform}" = "efi" ]; then
|
||||
+ clear
|
||||
+ echo "Please press 't' to show the boot menu on this console"
|
||||
+ fi
|
||||
+EOF
|
||||
+fi
|
||||
+
|
||||
cat << EOF
|
||||
set gfxmode=${GRUB_GFXMODE}
|
||||
load_video
|
||||
insmod gfxterm
|
||||
--- /dev/null
|
||||
+++ b/util/grub.d/95_textmode.in
|
||||
@@ -0,0 +1,12 @@
|
||||
|
@ -1,3 +1,29 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 4 06:58:06 UTC 2024 - Michael Chang <mchang@suse.com>
|
||||
|
||||
- Fix missng menu entry "Start bootloader from a read-only snapshot" by
|
||||
ensuring grub2-snapper-plugin is installed when both snapper and grub2-common
|
||||
are installed (bsc#1231271)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 4 06:49:12 UTC 2024 - Michael Chang <mchang@suse.com>
|
||||
|
||||
- Fix OOM error in loading loopback file (bsc#1230840)
|
||||
* 0001-tpm-Skip-loopback-image-measurement.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 4 06:41:11 UTC 2024 - Michael Chang <mchang@suse.com>
|
||||
|
||||
- Fix UEFI PXE boot failure on tagged VLAN network (bsc#1230263)
|
||||
* 0001-efinet-Skip-virtual-VLAN-devices-during-card-enumera.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 3 08:25:57 UTC 2024 - Michael Chang <mchang@suse.com>
|
||||
|
||||
- Fix grub screen is filled with artifects from earlier post menu (bsc#1224465)
|
||||
* grub2-SUSE-Add-the-t-hotkey.patch
|
||||
* 0001-fix-grub-screen-filled-with-post-screen-artifects.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 13 07:12:58 UTC 2024 - Michael Chang <mchang@suse.com>
|
||||
|
||||
|
11
grub2.spec
11
grub2.spec
@ -408,6 +408,9 @@ Patch217: 0001-net-drivers-ieee1275-ofnet-Remove-200-ms-timeout-in-.patch
|
||||
Patch218: grub2-s390x-set-hostonly.patch
|
||||
Patch219: 0001-bli-Fix-crash-in-get_part_uuid.patch
|
||||
Patch220: 0001-Streamline-BLS-and-improve-PCR-stability.patch
|
||||
Patch221: 0001-fix-grub-screen-filled-with-post-screen-artifects.patch
|
||||
Patch222: 0001-efinet-Skip-virtual-VLAN-devices-during-card-enumera.patch
|
||||
Patch223: 0001-tpm-Skip-loopback-image-measurement.patch
|
||||
|
||||
# Always requires a default cpu-platform package
|
||||
Requires: grub2-%{grubarch} = %{version}-%{release}
|
||||
@ -607,9 +610,9 @@ Unsupported modules for %{name}-%{grubxenarch}
|
||||
|
||||
Summary: Grub2's snapper plugin
|
||||
Group: System/Fhs
|
||||
Requires: %{name}-common = %{version}
|
||||
Requires: libxml2-tools
|
||||
Supplements: packageand(snapper:grub2)
|
||||
Requires: (grub2 or grub2-common)
|
||||
Supplements: ((grub2 or grub2-common) and snapper)
|
||||
BuildArch: noarch
|
||||
|
||||
%description snapper-plugin
|
||||
@ -620,9 +623,9 @@ Grub2's snapper plugin for advanced btrfs snapshot boot menu management
|
||||
|
||||
Summary: Grub2's systemd-sleep plugin
|
||||
Group: System/Fhs
|
||||
Requires: grub2
|
||||
Requires: util-linux
|
||||
Supplements: packageand(systemd:grub2)
|
||||
Requires: (grub2 or grub2-common)
|
||||
Supplements: ((grub2 or grub2-common) and systemd)
|
||||
BuildArch: noarch
|
||||
|
||||
%description systemd-sleep-plugin
|
||||
|
Loading…
Reference in New Issue
Block a user