gummiboot: remove package

gummiboot-efistub has been subtly broken with newer kernels for some time now.
There's no point in carrying any of the unmaintained gummiboot packages when
systemd-efiboot is packaged and maintained.
This commit is contained in:
Zach Dykstra 2024-12-05 11:42:51 -06:00 committed by classabbyamp
parent 298fd01943
commit 4e496c1797
17 changed files with 15 additions and 521 deletions

1
srcpkgs/gummiboot Symbolic link
View File

@ -0,0 +1 @@
systemd-boot

View File

@ -1 +1 @@
gummiboot
systemd-boot

View File

@ -1,8 +0,0 @@
case "$ACTION" in
post)
if [ "$UPDATE" = no ]; then
mkdir -p boot/EFI/gummiboot
fi
gummiboot update
;;
esac

View File

@ -1,14 +0,0 @@
Make gummiboot your default bootloader with:
$ mount -t efivarfs efivarfs /sys/firmware/efi/efivars
$ gummiboot install
Kernel options should be defined in /boot/loader/void-options.conf:
$ cat /boot/loader/void-options.conf
root=/dev/sda2 ro quiet
Reconfigure your kernel package to create loader entries:
$ xbps-reconfigure -f linux4.XX

View File

@ -1,2 +0,0 @@
# uncomment this line to disable the gummiboot hook
#GUMMIBOOT_DISABLE=1

View File

@ -1,45 +0,0 @@
#!/bin/sh
#
# Kernel hook for gummiboot.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
. "$ROOTDIR/etc/default/gummiboot"
if [ "$GUMMIBOOT_DISABLE" ]; then
exit 0
fi
boot="$ROOTDIR/boot"
entries="$boot/loader/entries"
name="void-$VERSION"
entry="$entries/$name.conf"
options="$boot/loader/void-options.conf"
loader="$boot/loader/loader.conf"
[ -d "$boot" ] || exit 0
mkdir -p "$entries"
cat <<-EOF > "$entry"
title Void Linux
version $VERSION
linux /vmlinuz-$VERSION
initrd /initramfs-$VERSION.img
EOF
if [ -r "$options" ]; then
# Add user provided options from /boot/loader/void-options.conf:
printf 'options %s\n' "$(cat "$options" | sed '/^#/d;/^$/d')" >> "$entry"
fi
if grep -q ^default "$loader" 2>/dev/null; then
# Replace existing default entry with this entry:
sed -i "s/default.*/default $name/" "$loader"
else
# Add this entry as the default:
printf 'default %s\n' $name >>"$loader"
fi

View File

@ -1,21 +0,0 @@
#!/bin/sh
#
# Kernel hook for gummiboot.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
boot="$ROOTDIR/boot"
entries="$boot/loader/entries"
name="void-$VERSION"
entry="$entries/$name.conf"
loader="$boot/loader/loader.conf"
[ -d "$boot" ] || exit 0
rm -f "$entry"
# No default entry if the removed entry was the default:
[ -e "$loader" ] && sed -i "/^default $name\$/d" "$loader"

View File

@ -1,232 +0,0 @@
From koen.kooi at linaro.org Sat Apr 11 01:23:22 2015
From: koen.kooi at linaro.org (Koen Kooi)
Date: Sat, 11 Apr 2015 10:23:22 +0200
Subject: [systemd-devel] [gummiboot][PATCH 1/5] Makefile: support non-x86
builds
Message-ID: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
Move the no-mmx/no-sse CFLAGS to X86-64 and IA32 defines in preparation
for ARM32 and Aarch64 support.
Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
---
Makefile.am | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 6568a35..2cca313 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -94,17 +94,23 @@ efi_cflags = \
-ffreestanding \
-fno-strict-aliasing \
-fno-stack-protector \
- -Wsign-compare \
- -mno-sse \
- -mno-mmx
+ -Wsign-compare
if ARCH_X86_64
efi_cflags += \
-mno-red-zone \
+ -mno-sse \
+ -mno-mmx \
-DEFI_FUNCTION_WRAPPER \
-DGNU_EFI_USE_MS_ABI
endif
+if ARCH_IA32
+efi_cflags += \
+ -mno-sse \
+ -mno-mmx
+endif
+
efi_ldflags = \
$(EFI_LDFLAGS) \
-T $(EFI_LDS_DIR)/elf_$(ARCH)_efi.lds \
--
2.0.1
From koen.kooi at linaro.org Sat Apr 11 01:23:23 2015
From: koen.kooi at linaro.org (Koen Kooi)
Date: Sat, 11 Apr 2015 10:23:23 +0200
Subject: [systemd-devel] [gummiboot][PATCH 2/5] util: use x86 ASM only on
x86(-64) platforms.
In-Reply-To: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
References: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
Message-ID: <1428740606-30060-2-git-send-email-koen.kooi@linaro.org>
Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
---
src/efi/util.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/efi/util.c b/src/efi/util.c
index ba5ed7d..689bc7c 100644
--- a/src/efi/util.c
+++ b/src/efi/util.c
@@ -33,7 +33,9 @@ UINT64 ticks_read(VOID) {
__asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
return (d << 32) | a;
}
-#else
+#endif
+
+#ifdef __i386__
UINT64 ticks_read(VOID) {
UINT64 val;
__asm__ volatile ("rdtsc" : "=A" (val));
--
2.0.1
From koen.kooi at linaro.org Sat Apr 11 01:23:24 2015
From: koen.kooi at linaro.org (Koen Kooi)
Date: Sat, 11 Apr 2015 10:23:24 +0200
Subject: [systemd-devel] [gummiboot][PATCH 3/5] configure: add AARCH64
support
In-Reply-To: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
References: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
Message-ID: <1428740606-30060-3-git-send-email-koen.kooi@linaro.org>
This is just plumbing to add ARCH_AARCH64 for makefile tests and
defining the machine name.
Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
---
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
index 27bbe1d..c2077b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,7 @@ dnl Define ARCH_<NAME> conditionals
SET_ARCH(IA32, i*86*)
SET_ARCH(X86_64, x86_64*)
SET_ARCH(IA64, ia64*)
+SET_ARCH(AARCH64, aarch64*)
ARCH=`echo $host | sed "s/\(-\).*$//"`
@@ -61,6 +62,9 @@ AM_COND_IF(ARCH_IA32, [
AM_COND_IF(ARCH_X86_64, [
MACHINE_TYPE_NAME=x64])
+AM_COND_IF(ARCH_AARCH64, [
+ MACHINE_TYPE_NAME=aa64])
+
AC_SUBST([ARCH])
AC_SUBST([MACHINE_TYPE_NAME])
--
2.0.1
From koen.kooi at linaro.org Sat Apr 11 01:23:25 2015
From: koen.kooi at linaro.org (Koen Kooi)
Date: Sat, 11 Apr 2015 10:23:25 +0200
Subject: [systemd-devel] [gummiboot][PATCH 4/5] util: confine x86 asm to x86
architectures
In-Reply-To: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
References: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
Message-ID: <1428740606-30060-4-git-send-email-koen.kooi@linaro.org>
Also add a stub function that just returns '1' to avoid missing symbols.
Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
---
src/efi/util.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/efi/util.c b/src/efi/util.c
index 689bc7c..6ce1f18 100644
--- a/src/efi/util.c
+++ b/src/efi/util.c
@@ -33,14 +33,17 @@ UINT64 ticks_read(VOID) {
__asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
return (d << 32) | a;
}
-#endif
-
-#ifdef __i386__
+#elif __i386__
UINT64 ticks_read(VOID) {
UINT64 val;
__asm__ volatile ("rdtsc" : "=A" (val));
return val;
}
+#else
+UINT64 ticks_read(VOID) {
+ UINT64 val = 1;
+ return val;
+}
#endif
/* count TSC ticks during a millisecond delay */
--
2.0.1
From koen.kooi at linaro.org Sat Apr 11 01:23:26 2015
From: koen.kooi at linaro.org (Koen Kooi)
Date: Sat, 11 Apr 2015 10:23:26 +0200
Subject: [systemd-devel] [gummiboot][PATCH 5/5] Makefile.am: Add support for
AARCH64
In-Reply-To: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
References: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
Message-ID: <1428740606-30060-5-git-send-email-koen.kooi@linaro.org>
Aarch64 and ARM32 lack an EFI capable objcopy, so use the ldflags + -O
binary trick gnu-efi and the Red Hat shimloader are using.
Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
---
Makefile.am | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 2cca313..eba5ec4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -121,6 +121,17 @@ efi_ldflags = \
-L $(EFI_LIB_DIR) \
$(EFI_LDS_DIR)/crt0-efi-$(ARCH).o
+# Aarch64 and ARM32 don't have an EFI capable objcopy
+if ARCH_AARCH64
+efi_ldflags += \
+ --defsym=EFI_SUBSYSTEM=0xa
+
+FORMAT = -O binary
+else
+FORMAT = --target=efi-app-$(ARCH)
+endif
+
+
# ------------------------------------------------------------------------------
gummiboot_headers = \
src/efi/util.h \
@@ -156,7 +167,7 @@ $(gummiboot_solib): $(gummiboot_objects)
$(gummiboot): $(gummiboot_solib)
$(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
-j .dynsym -j .rel -j .rela -j .reloc \
- --target=efi-app-$(ARCH) $< $@
+ $(FORMAT) $< $@
# ------------------------------------------------------------------------------
stub_headers = \
@@ -191,7 +202,7 @@ $(stub_solib): $(stub_objects)
$(stub): $(stub_solib)
$(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
-j .dynsym -j .rel -j .rela -j .reloc \
- --target=efi-app-$(ARCH) $< $@
+ $(FORMAT) $< $@
# ------------------------------------------------------------------------------
CLEANFILES += test-disk.img
--
2.0.1

View File

@ -1,23 +0,0 @@
diff --git a/Makefile.am b/Makefile.am
index eba5ec4..46c1728 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -165,7 +165,7 @@ $(gummiboot_solib): $(gummiboot_objects)
.DELETE_ON_ERROR: $(gummboot_solib)
$(gummiboot): $(gummiboot_solib)
- $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
+ $(AM_V_GEN) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
-j .dynsym -j .rel -j .rela -j .reloc \
$(FORMAT) $< $@
@@ -200,7 +200,7 @@ $(stub_solib): $(stub_objects)
.DELETE_ON_ERROR: $(gummboot_solib)
$(stub): $(stub_solib)
- $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
+ $(AM_V_GEN) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
-j .dynsym -j .rel -j .rela -j .reloc \
$(FORMAT) $< $@

View File

@ -1,13 +0,0 @@
diff --git a/src/setup/setup.c b/src/setup/setup.c
index 6a4275a..5342937 100644
--- a/src/setup/setup.c
+++ b/src/setup/setup.c
@@ -37,6 +37,7 @@
#include <ftw.h>
#include <stdbool.h>
#include <blkid.h>
+#include <sys/sysmacros.h>
#include "efivars.h"

View File

@ -1,22 +0,0 @@
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
<https://github.com/systemd/systemd/issues/3632> and
<https://github.com/systemd/systemd/pull/3735>.
--- a/src/efi/console.c 2015-03-11 16:50:35.000000000 -0700
+++ b/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) {

View File

@ -1,66 +0,0 @@
--- a/src/efi/console.c
+++ b/src/efi/console.c
@@ -21,63 +21,6 @@
#include "util.h"
#include "console.h"
-#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
- { 0xdd9e7534, 0x7762, 0x4698, { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } }
-
-struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
-
-typedef EFI_STATUS (EFIAPI *EFI_INPUT_RESET_EX)(
- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
- BOOLEAN ExtendedVerification;
-);
-
-typedef UINT8 EFI_KEY_TOGGLE_STATE;
-
-typedef struct {
- UINT32 KeyShiftState;
- EFI_KEY_TOGGLE_STATE KeyToggleState;
-} EFI_KEY_STATE;
-
-typedef struct {
- EFI_INPUT_KEY Key;
- EFI_KEY_STATE KeyState;
-} EFI_KEY_DATA;
-
-typedef EFI_STATUS (EFIAPI *EFI_INPUT_READ_KEY_EX)(
- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
- EFI_KEY_DATA *KeyData;
-);
-
-typedef EFI_STATUS (EFIAPI *EFI_SET_STATE)(
- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
- EFI_KEY_TOGGLE_STATE *KeyToggleState;
-);
-
-typedef EFI_STATUS (EFIAPI *EFI_KEY_NOTIFY_FUNCTION)(
- EFI_KEY_DATA *KeyData;
-);
-
-typedef EFI_STATUS (EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY)(
- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
- EFI_KEY_DATA KeyData;
- EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction;
- VOID **NotifyHandle;
-);
-
-typedef EFI_STATUS (EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
- struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
- VOID *NotificationHandle;
-);
-
-typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
- EFI_INPUT_RESET_EX Reset;
- EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx;
- EFI_EVENT WaitForKeyEx;
- EFI_SET_STATE SetState;
- EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify;
- EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify;
-} EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
-
EFI_STATUS console_key_read(UINT64 *key, BOOLEAN wait) {
EFI_GUID EfiSimpleTextInputExProtocolGuid = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID;
static EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInputEx;

View File

@ -1,14 +0,0 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,11 +86,9 @@ efi_cflags = \
-Wall \
-Wextra \
-std=gnu90 \
- -nostdinc \
-ggdb -O0 \
-fpic \
-fshort-wchar \
- -nostdinc \
-ffreestanding \
-fno-strict-aliasing \
-fno-stack-protector \

View File

@ -1,11 +0,0 @@
--- a/src/efi/stub.c
+++ b/src/efi/stub.c
@@ -83,7 +83,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EF
cmdline_len = szs[0];
/* if we are not in secure boot mode, accept a custom command line and replace the built-in one */
- if (!secure && loaded_image->LoadOptionsSize > 0) {
+ if ((!secure || cmdline_len == 0) && loaded_image->LoadOptionsSize > 0 && *(CHAR16 *)loaded_image->LoadOptions > 0x1F) {
CHAR16 *options;
CHAR8 *line;
UINTN i;

View File

@ -1,46 +0,0 @@
# Template file for 'gummiboot'
pkgname=gummiboot
version=48.1
revision=8
archs="i686* x86_64* aarch64*"
build_style=gnu-configure
conf_files="/etc/default/gummiboot"
hostmakedepends="automake pkg-config libxslt docbook-xsl"
makedepends="gnu-efi-libs liblzma-devel libblkid-devel"
depends="${pkgname}-efistub>=${version}_${revision}"
short_desc="Simple UEFI Boot Manager"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="LGPL-2.0-or-later"
# Homepage is long dead and the project has an unofficial release under Alpine
# homepage="http://freedesktop.org/wiki/Software/gummiboot"
homepage="https://pkgs.alpinelinux.org/package/edge/main/x86/gummiboot"
distfiles="https://dev.alpinelinux.org/archive/gummiboot/gummiboot-${version}.tar.gz"
checksum=2b649a6eb22007cd34bb355ba4ca6c1a8058e115c13048985f09a0f11f3d5295
CFLAGS="-std=gnu89"
configure_args="--with-efi-ldsdir=${XBPS_CROSS_BASE}/usr/lib
--with-efi-libdir=${XBPS_CROSS_BASE}/usr/lib
--with-efi-includedir=${XBPS_CROSS_BASE}/usr/include"
pre_configure() {
./autogen.sh
}
post_install() {
vinstall ${FILESDIR}/kernel.d/gummiboot.post-install 744 \
etc/kernel.d/post-install 50-gummiboot
vinstall ${FILESDIR}/kernel.d/gummiboot.post-remove 744 \
etc/kernel.d/post-remove 50-gummiboot
vinstall ${FILESDIR}/kernel.d/gummiboot.confd 644 \
etc/default gummiboot
vdoc "${FILESDIR}/README.voidlinux"
}
gummiboot-efistub_package() {
short_desc="Linux UEFI stub from the gummiboot project"
pkg_install() {
vmove "usr/lib/gummiboot/*.efi.stub"
}
}

View File

@ -1,2 +0,0 @@
site="http://cgit.freedesktop.org/${pkgname}"
pattern='/gummiboot/tag/\?id=\K\d+'

View File

@ -1,7 +1,7 @@
# Template file for 'systemd-boot'
pkgname=systemd-boot
version=256.6
revision=1
revision=2
build_style=meson
conf_files="/etc/default/systemd-boot"
configure_args="-Defi=true -Dman=enabled -Dbootloader=enabled
@ -114,3 +114,15 @@ systemd-boot-efistub_package() {
vmove usr/share/man/man7/systemd-stub.7
}
}
gummiboot_package() {
short_desc="Simple UEFI Boot Manager (transitional dummy package)"
depends="systemd-boot"
build_style=meta
}
gummiboot-efistub_package() {
short_desc="Linux UEFI stub from the gummiboot project (transitional dummy package)"
depends="systemd-boot-efistub"
build_style=meta
}