Skip to content
Snippets Groups Projects
Commit aee4b72f authored by CentOS Sources's avatar CentOS Sources
Browse files

import grub2-2.02-114.el8

parent 09e3cc23
No related branches found
Tags imports/c9/kernel-5.14.0-503.16.1.el9_5
No related merge requests found
From fe8b1f619fafcd2438e3d86fb07c6a5e9280423c Mon Sep 17 00:00:00 2001
From: Ian Page Hands <iphands@gmail.com>
Date: Tue, 8 Jun 2021 13:48:56 -0400
Subject: [PATCH] efinet: Add DHCP proxy support
If a proxyDHCP configuration is used, the server name, server IP and boot
file values should be taken from the DHCP proxy offer instead of the DHCP
server ack packet. Currently that case is not handled, add support for it.
(cherry picked from commit 9cd94b23fe366b87ef25c13c95a531325af9016f)
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/net/drivers/efi/efinet.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
index df7760ad2..25809050b 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -850,10 +850,31 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
else
{
grub_dprintf ("efinet", "using ipv4 and dhcp\n");
+
+ struct grub_net_bootp_packet *dhcp_ack = &pxe_mode->dhcp_ack;
+
+ if (pxe_mode->proxy_offer_received)
+ {
+ grub_dprintf ("efinet", "proxy offer receive");
+ struct grub_net_bootp_packet *proxy_offer = &pxe_mode->proxy_offer;
+
+ if (proxy_offer && dhcp_ack->boot_file[0] == '\0')
+ {
+ grub_dprintf ("efinet", "setting values from proxy offer");
+ /* Here we got a proxy offer and the dhcp_ack has a nil boot_file
+ * Copy the proxy DHCP offer details into the bootp_packet we are
+ * sending forward as they are the deatils we need.
+ */
+ *dhcp_ack->server_name = *proxy_offer->server_name;
+ *dhcp_ack->boot_file = *proxy_offer->boot_file;
+ dhcp_ack->server_ip = proxy_offer->server_ip;
+ }
+ }
+
grub_net_configure_by_dhcp_ack (card->name, card, 0,
(struct grub_net_bootp_packet *)
- packet_buf,
- packet_bufsz,
+ &pxe_mode->dhcp_ack,
+ sizeof (pxe_mode->dhcp_ack),
1, device, path);
grub_dprintf ("efinet", "device: `%s' path: `%s'\n", *device, *path);
}
--
2.34.1
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Bideau <mica.devel@gmail.com>
Date: Wed, 2 Oct 2019 23:48:10 +0200
Subject: [PATCH] at_keyboard: Fix unreliable key presses
This patch fixes an issue that prevented the at_keyboard module to work
(for me). The cause was a bad/wrong return value in the
grub_at_keyboard_getkey() function in grub-core/term/at_keyboard.c file
at line 237. My symptoms were to have an unresponsive keyboard. Keys
needed to be pressed 10x and more to effectively be printed sometimes
generating multiple key presses (after 1 or 2 sec of no printing). It
was very problematic when typing passphrase in early stage (with
GRUB_ENABLE_CRYPTODISK). When switched to "console" terminal input
keyboard worked perfectly. It also worked great with the GRUB 2.02
packaged by Debian (2.02+dfsg1-20). It was not an output issue but an
input one.
I've managed to analyze the issue and found that it came from the commit
216950a4e (at_keyboard: Split protocol from controller code.). Three
lines where moved from the fetch_key() function in
grub-core/term/at_keyboard.c file to the beginning of
grub_at_keyboard_getkey() function (same file). However, returning -1
made sense when it happened in fetch_key() function but not anymore in
grub_at_keyboard_getkey() function which should return GRUB_TERM_NO_KEY.
I think it was just an incomplete cut-paste missing a small manual
correction. Let's fix it.
Note: Commit message updated by Daniel Kiper.
Signed-off-by: Michael Bideau <mica.devel@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
(cherry picked from commit 33203ca3484717712b54e199c46ae8a818374284)
---
grub-core/term/at_keyboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
index c805cccbd..dac0f946f 100644
--- a/grub-core/term/at_keyboard.c
+++ b/grub-core/term/at_keyboard.c
@@ -318,7 +318,7 @@ grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
return GRUB_TERM_NO_KEY;
if (! KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
- return -1;
+ return GRUB_TERM_NO_KEY;
at_key = grub_inb (KEYBOARD_REG_DATA);
old_led = ps2_state.led_status;
......@@ -487,3 +487,5 @@ Patch0486: 0486-normal-main-Discover-the-device-to-read-the-config-f.patch
Patch0487: 0487-powerpc-adjust-setting-of-prefix-for-signed-binary-c.patch
Patch0488: 0488-powerpc-fix-prefix-signed-grub-special-case-for-Powe.patch
Patch0489: 0489-grub-mkconfig-restore-umask-for-grub.cfg.patch
Patch0490: 0490-efinet-Add-DHCP-proxy-support.patch
Patch0491: 0491-at_keyboard-Fix-unreliable-key-presses.patch
......@@ -7,7 +7,7 @@
Name: grub2
Epoch: 1
Version: 2.02
Release: 111%{?dist}
Release: 114%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base
License: GPLv3+
......@@ -510,6 +510,18 @@ fi
%endif
%changelog
* Mon Feb 14 2022 Robbie Harwood <rharwood@redhat.com> - 2.02-114
- Fix behavior of GRUB_TERMINAL_INPUT=at_keyboard
- Resolves: #2020927
* Wed Feb 09 2022 Robbie Harwood <rharwood@redhat.com> - 2.02-113
- Bump to fix target
- Resolves: #1809246
* Wed Feb 09 2022 Robbie Harwood <rharwood@redhat.com> - 2.02-112
- Fix DHCP proxy efi booting
- Resolves: #1809246
* Mon Feb 07 2022 Robbie Harwood <rharwood@redhat.com> - 2.02-111
- Bump to fix target
- Resolves: #1914575
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment