From 88286dc4b2fa9f398dc3fdb477af82b0bb51c1d7 Mon Sep 17 00:00:00 2001 From: Kye Shi Date: Wed, 9 Dec 2020 16:03:36 -0800 Subject: [PATCH] gummiboot: WaitForKeyEx hanging workaround (see systemd/systemd#3735) --- .../gummiboot/patches/fix-waitforkey.patch | 22 +++++++++++++++++++ srcpkgs/gummiboot/template | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/gummiboot/patches/fix-waitforkey.patch diff --git a/srcpkgs/gummiboot/patches/fix-waitforkey.patch b/srcpkgs/gummiboot/patches/fix-waitforkey.patch new file mode 100644 index 0000000000..8993bbfd44 --- /dev/null +++ b/srcpkgs/gummiboot/patches/fix-waitforkey.patch @@ -0,0 +1,22 @@ +This patch fixes an issue where pressing any key within the gummiboot +menu causes it to hang (though no issue occurs if no key is pressed). The +culprit appears to be the WaitForKeyEx function, which lacks support in certain +UEFI implementations. This fix is backported from the same issue found in +systemd-boot (gummiboot's mainstream counterpart): see + and +. + +--- src/efi/console.c 2015-03-11 16:50:35.000000000 -0700 ++++ src/efi/console.c 2020-12-09 15:41:19.837704801 -0800 +@@ -96,10 +96,7 @@ + + /* wait until key is pressed */ + if (wait) { +- if (TextInputEx) +- uefi_call_wrapper(BS->WaitForEvent, 3, 1, &TextInputEx->WaitForKeyEx, &index); +- else +- uefi_call_wrapper(BS->WaitForEvent, 3, 1, &ST->ConIn->WaitForKey, &index); ++ uefi_call_wrapper(BS->WaitForEvent, 3, 1, &ST->ConIn->WaitForKey, &index); + } + + if (TextInputEx) { diff --git a/srcpkgs/gummiboot/template b/srcpkgs/gummiboot/template index 052776fe7f..68e6f5be92 100644 --- a/srcpkgs/gummiboot/template +++ b/srcpkgs/gummiboot/template @@ -1,7 +1,7 @@ # Template file for 'gummiboot' pkgname=gummiboot version=48.1 -revision=6 +revision=7 archs="i686* x86_64* aarch64*" build_style=gnu-configure conf_files="/etc/default/gummiboot"