mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
testing/efibootguard: new aport
Simple UEFI boot loader with support for safely switching between current and updated partition sets
This commit is contained in:
parent
a52ce5f7fe
commit
f45de01f4e
44
testing/efibootguard/0001-fallback-outb_p.patch
Normal file
44
testing/efibootguard/0001-fallback-outb_p.patch
Normal file
@ -0,0 +1,44 @@
|
||||
--- a/drivers/watchdog/w83627hf_wdt.c 2023-10-26 12:32:54.000000000 +0200
|
||||
+++ b/drivers/watchdog/w83627hf_wdt.c 2024-04-25 17:08:20.540876697 +0200
|
||||
@@ -75,6 +75,21 @@
|
||||
static int wdt_cfg_enter = 0x87;/* key to unlock configuration space */
|
||||
static int wdt_cfg_leave = 0xAA;/* key to lock configuration space */
|
||||
|
||||
+/*
|
||||
+ * Add a fallback for non-GNU libc systems like musl libc for the
|
||||
+ * non-standard function outb_p.
|
||||
+ */
|
||||
+#if defined(__GLIBC__)
|
||||
+#define w83627hf_wdt_outb_p outb_p
|
||||
+#else
|
||||
+static inline void
|
||||
+w83627hf_wdt_outb_p(unsigned char value, unsigned short int port)
|
||||
+{
|
||||
+ __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80" : : "a" (value),
|
||||
+ "Nd" (port));
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static void superio_outb(int reg, int val)
|
||||
{
|
||||
outb(reg, WDT_EFER);
|
||||
@@ -89,8 +104,8 @@
|
||||
|
||||
static int superio_enter(void)
|
||||
{
|
||||
- outb_p(wdt_cfg_enter, WDT_EFER); /* Enter extended function mode */
|
||||
- outb_p(wdt_cfg_enter, WDT_EFER); /* Again according to manual */
|
||||
+ w83627hf_wdt_outb_p(wdt_cfg_enter, WDT_EFER); /* Enter extended function mode */
|
||||
+ w83627hf_wdt_outb_p(wdt_cfg_enter, WDT_EFER); /* Again according to manual */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -101,7 +116,7 @@
|
||||
|
||||
static void superio_exit(void)
|
||||
{
|
||||
- outb_p(wdt_cfg_leave, WDT_EFER); /* Leave extended function mode */
|
||||
+ w83627hf_wdt_outb_p(wdt_cfg_leave, WDT_EFER); /* Leave extended function mode */
|
||||
}
|
||||
|
||||
static int wdt_find(int addr)
|
||||
54
testing/efibootguard/APKBUILD
Normal file
54
testing/efibootguard/APKBUILD
Normal file
@ -0,0 +1,54 @@
|
||||
# Maintainer: Thomas Liske <thomas@fiasko-nw.net>
|
||||
pkgname=efibootguard
|
||||
pkgver=0.16
|
||||
pkgrel=0
|
||||
pkgdesc="Simple UEFI boot loader with support for safely switching between current and updated partition sets"
|
||||
url="https://github.com/siemens/efibootguard/"
|
||||
arch="aarch64 riscv64 x86 x86_64"
|
||||
license="GPL-2.0-only"
|
||||
depends="python3"
|
||||
makedepends="
|
||||
argp-standalone
|
||||
autoconf
|
||||
autoconf-archive
|
||||
automake
|
||||
bsd-compat-headers
|
||||
check-dev
|
||||
gnu-efi-dev
|
||||
libtool
|
||||
linux-headers
|
||||
pciutils-dev
|
||||
py3-shtab
|
||||
python3
|
||||
"
|
||||
checkdepends="bats"
|
||||
options="!check" # fff is missing on alpine
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/siemens/efibootguard/archive/v$pkgver/efibootguard-$pkgver.tar.gz
|
||||
0001-fallback-outb_p.patch
|
||||
"
|
||||
subpackages="$pkgname-dev $pkgname-bash-completion $pkgname-zsh-completion"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
autoreconf -fvi
|
||||
}
|
||||
|
||||
build() {
|
||||
./configure
|
||||
make LIBS="-largp"
|
||||
}
|
||||
|
||||
package() {
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
mkdir -p "$pkgdir/usr/share/bash-completion"
|
||||
mv "$pkgdir/usr/share/efibootguard/completion/bash" "$pkgdir/usr/share/bash-completion/completions"
|
||||
|
||||
mkdir -p "$pkgdir/usr/share/zsh"
|
||||
mv "$pkgdir/usr/share/efibootguard/completion/zsh" "$pkgdir/usr/share/zsh/site-functions"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a3b4c2ec70ad9a50b728145edf180e8c171a7876653c6984e53c2bdf6b85316098ab734590d778f11b986d070a0d061ce095c0a1b9164a73519004557dc4a785 efibootguard-0.16.tar.gz
|
||||
14c72455a9fea4b796a19a6c2713765ff1eb82f6ab5d4ab72ab61e8f4824aa6436a4d7bb003c50235a44c089559dc27e717e90aeb624b19de2522436911c4343 0001-fallback-outb_p.patch
|
||||
"
|
||||
Loading…
x
Reference in New Issue
Block a user