summaryrefslogtreecommitdiff
path: root/app-admin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-25 14:05:07 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-25 14:05:07 +0000
commit5950ab0f26bdbfcc40b68a19fd542816fecdd615 (patch)
tree43780a59152b7c731ba4f3cd3da8661f2dcd1f73 /app-admin
parente547f4cd5bc4d4173bb4b2b767883537d2d7486d (diff)
gentoo auto-resync : 25:12:2022 - 14:05:06
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/Manifest.gzbin32216 -> 32380 bytes
-rw-r--r--app-admin/coreboot-utils/Manifest5
-rw-r--r--app-admin/coreboot-utils/coreboot-utils-4.18.ebuild66
-rw-r--r--app-admin/coreboot-utils/files/coreboot-utils-4.18-flags.patch35
-rw-r--r--app-admin/coreboot-utils/files/coreboot-utils-4.18-musl.patch75
-rw-r--r--app-admin/coreboot-utils/metadata.xml7
6 files changed, 188 insertions, 0 deletions
diff --git a/app-admin/Manifest.gz b/app-admin/Manifest.gz
index c5f9b4c565bd..38b9f04fd64d 100644
--- a/app-admin/Manifest.gz
+++ b/app-admin/Manifest.gz
Binary files differ
diff --git a/app-admin/coreboot-utils/Manifest b/app-admin/coreboot-utils/Manifest
new file mode 100644
index 000000000000..d6e2f9f8d96b
--- /dev/null
+++ b/app-admin/coreboot-utils/Manifest
@@ -0,0 +1,5 @@
+AUX coreboot-utils-4.18-flags.patch 1264 BLAKE2B 001658e09f1a580d2523c8cd09d1dfdbe6771b787e7e7af9b1f80ae6491a969536d54fb80af8914394ac6193744be2cd23068e2a577b2cd31208e3dd10b9e11d SHA512 5325b7f639f5d010fd8fed565a123f6e9688642c0834bfda2c7b9dbb49b157427f34292069785fe8f8b6d2e6b4d60fa45187d91a79a66db7f6a041fd0a9da562
+AUX coreboot-utils-4.18-musl.patch 2033 BLAKE2B 27bb15016ff4642134c9f01037ba84ae9be2c0e02ad37b5d32b30f7f5186d7411eaa35352017e12db40fbab9d020415b26fc5a602db676eba79ee7456dbf2f8c SHA512 7d74537d36fdb322c4b6182ab1cb5f39a2cb3d2ac8c92e38c5443fd4391a8ceaceed9a93b09a327482912efa96e09fef4dcc5e2587c74c3da503983db754ffd9
+DIST coreboot-4.18.tar.xz 57868424 BLAKE2B 981d8c1cf007be15a85d5860dcfcfa6fa637f66438ff4ef6619491aaf0192e622bfbe9608deb13a975d899c94430bc3d1f0eb3a5a3dc6598f49a726b8ff641e1 SHA512 b363850d31074950bc710bd0a47a896a6c6ef23c53d720ae90ec2257697a3eeeb211e163199064b5e532e5b1e86cdecf997276d742435deeaaacfb19b83f4e6d
+EBUILD coreboot-utils-4.18.ebuild 1495 BLAKE2B a78199ea40f9ba74de386091d5538cefd5d63fb82820b5acc6e9fd073584af2b4fac9fbb095b74e9a82f91085dd140a1af2ea529173446f394939b7f44a9f6a4 SHA512 7c4aade0345eee617360386eaf40be619dfe5b8f6a5906099177012711753a29ff3f68f73af4266dff29957405093b12022434991d6b1a7c34b380971ba30b38
+MISC metadata.xml 223 BLAKE2B 3ade38574009f425c0670f7c377386f6263f08ab222c58e1f433bc81159209e56e52a6709d1858760529606c21c55ec68d24c45358d6f525a9ef6ac1474f80c9 SHA512 4cd7de2eb60e5be6f2eebb7169ffdb9e5255362755527921ba60781640766b58e4ce47da81134ded62746a2f95b7b5591933e4510cec7e94a69f16377bd2bae4
diff --git a/app-admin/coreboot-utils/coreboot-utils-4.18.ebuild b/app-admin/coreboot-utils/coreboot-utils-4.18.ebuild
new file mode 100644
index 000000000000..a9115a5fe9d9
--- /dev/null
+++ b/app-admin/coreboot-utils/coreboot-utils-4.18.ebuild
@@ -0,0 +1,66 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="A selection from coreboot/utils useful in general"
+HOMEPAGE="https://www.coreboot.org/"
+SRC_URI="https://coreboot.org/releases/coreboot-${PV}.tar.xz"
+
+LICENSE="GPL-2+ GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="sys-apps/pciutils
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+S="${WORKDIR}/coreboot-${PV}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.18-musl.patch
+ "${FILESDIR}"/${PN}-4.18-flags.patch
+)
+
+coreboot_utils=(
+ #cbfstool has textrels and is not really necessary outside coreboot
+ cbmem
+ ifdtool
+ intelmetool
+ inteltool
+ me_cleaner
+ nvramtool
+ pmh7tool
+ superiotool
+)
+
+src_prepare() {
+ default
+ # drop some CFLAGS that hurt compilation on modern toolchains or
+ # force optimisation
+ # can't do this in one sed, because it all happens back-to-back
+ for e in '-O[01234567s]' '-g' '-Werror' '-ansi' '-pendantic' ; do
+ sed -i -e 's/ '"${e}"'\( \|$\)/ /g' util/*/Makefile{.inc,} || die
+ done
+}
+
+src_compile() {
+ # selection from README.md that seem useful outside coreboot
+
+ tc-export CC
+ export HOSTCFLAGS="${CFLAGS}"
+ for tool in ${coreboot_utils[*]} ; do
+ [[ -f util/${tool}/Makefile ]] || continue
+ emake -C util/${tool} V=1
+ done
+}
+
+src_install() {
+ exeinto /usr/sbin
+ for tool in ${coreboot_utils[*]} ; do
+ [[ -e util/${tool}/${tool} ]] && doexe util/${tool}/${tool}
+ [[ -e util/${tool}/${tool}.py ]] && doexe util/${tool}/${tool}.py
+ done
+}
diff --git a/app-admin/coreboot-utils/files/coreboot-utils-4.18-flags.patch b/app-admin/coreboot-utils/files/coreboot-utils-4.18-flags.patch
new file mode 100644
index 000000000000..e42e6b2921da
--- /dev/null
+++ b/app-admin/coreboot-utils/files/coreboot-utils-4.18-flags.patch
@@ -0,0 +1,35 @@
+- ifdtool: respect LDFLAGS
+- nvramtool: respect CFLAGS
+- pmh7tool: respect CC, CFLAGS
+
+--- a/util/ifdtool/Makefile.inc 2022-10-16 20:14:31.000000000 +0000
++++ b/util/ifdtool/Makefile.inc 2022-12-25 11:38:47.572534621 +0000
+@@ -16,4 +16,4 @@
+
+ $(objutil)/ifdtool/ifdtool: $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj))
+ printf " IFDTOOL\n"
+- $(HOSTCC) $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj)) -o $@
++ $(HOSTCC) $(LDFLAGS) $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj)) -o $@
+--- a/util/nvramtool/Makefile 2022-10-16 20:14:31.000000000 +0000
++++ b/util/nvramtool/Makefile 2022-12-25 11:39:15.924345609 +0000
+@@ -11,7 +11,7 @@
+ CC ?= gcc
+ INSTALL = /usr/bin/env install
+ PREFIX = /usr/local
+-CFLAGS = -O2 -g -Wall -Wextra -Wmissing-prototypes -I. -DCMOS_HAL=1
++CFLAGS += -O2 -g -Wall -Wextra -Wmissing-prototypes -I. -DCMOS_HAL=1
+ #CFLAGS = -Os -Wall
+
+ CLI_OBJS = cli/nvramtool.o cli/opts.o
+--- a/util/pmh7tool/Makefile 2022-10-16 20:14:31.000000000 +0000
++++ b/util/pmh7tool/Makefile 2022-12-25 11:39:38.491195945 +0000
+@@ -1,7 +1,7 @@
+ ## SPDX-License-Identifier: GPL-2.0-only
+
+-CC = gcc
+-CFLAGS = -O2 -Wall -Wextra -Werror
++CC ?= gcc
++CFLAGS ?= -O2 -Wall -Wextra -Werror
+ PROGRAM = pmh7tool
+ INSTALL = /usr/bin/env install
+ PREFIX = /usr/local
diff --git a/app-admin/coreboot-utils/files/coreboot-utils-4.18-musl.patch b/app-admin/coreboot-utils/files/coreboot-utils-4.18-musl.patch
new file mode 100644
index 000000000000..435977ac9c0b
--- /dev/null
+++ b/app-admin/coreboot-utils/files/coreboot-utils-4.18-musl.patch
@@ -0,0 +1,75 @@
+Author: Fabian Groffen <grobian@gentoo.org>
+Date: Wed Dec 14 17:28:13 2022 +0100
+
+ musl: clumpsy buildfixes
+
+diff --git a/src/arch/x86/include/arch/mmio.h b/src/arch/x86/include/arch/mmio.h
+index c2aa0fb910..b2a37a03dd 100644
+--- a/src/arch/x86/include/arch/mmio.h
++++ b/src/arch/x86/include/arch/mmio.h
+@@ -5,6 +5,10 @@
+
+ #include <stdint.h>
+
++#ifndef __always_inline
++#define __always_inline inline
++#endif
++
+ static __always_inline uint8_t read8(const volatile void *addr)
+ {
+ return *((volatile uint8_t *)(addr));
+diff --git a/util/inteltool/inteltool.h b/util/inteltool/inteltool.h
+index 5b40721262..2d0da33d72 100644
+--- a/util/inteltool/inteltool.h
++++ b/util/inteltool/inteltool.h
+@@ -12,6 +12,7 @@
+ #if defined(__GLIBC__)
+ #include <sys/io.h>
+ #endif
++#include <sys/io.h>
+ #if (defined(__MACH__) && defined(__APPLE__))
+ /* DirectHW is available here: https://www.coreboot.org/DirectHW */
+ #define __DARWIN__
+diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c
+index ed18c13e62..fa2c6ce35d 100644
+--- a/util/superiotool/superiotool.c
++++ b/util/superiotool/superiotool.c
+@@ -320,6 +320,7 @@ int main(int argc, char *argv[])
+ }
+ }
+
++#if 0
+ #if defined(__FreeBSD__)
+ if ((io_fd = open("/dev/io", O_RDWR)) < 0) {
+ perror("/dev/io");
+@@ -330,6 +331,7 @@ int main(int argc, char *argv[])
+ printf("Superiotool must be run as root.\n");
+ exit(1);
+ }
++#endif
+
+ print_version();
+
+diff --git a/util/superiotool/superiotool.h b/util/superiotool/superiotool.h
+index a621ae5274..d5f44fece4 100644
+--- a/util/superiotool/superiotool.h
++++ b/util/superiotool/superiotool.h
+@@ -24,6 +24,10 @@
+ # endif
+ #endif
+
++#include <sys/types.h>
++#include <stdint.h>
++#include <sys/io.h>
++
+ #if defined(__FreeBSD__)
+ #include <sys/types.h>
+ #include <machine/cpufunc.h>
+@@ -89,6 +93,7 @@ static __inline__ uint32_t inl(uint16_t port)
+ __asm__ __volatile__ ("inl %1,%0":"=a" (value):"Nd" (port));
+ return value;
+ }
++
+ #endif
+
+ #define USAGE "Usage: superiotool [-d] [-e] [-a] [-l] [-V] [-v] [-h]\n\n\
diff --git a/app-admin/coreboot-utils/metadata.xml b/app-admin/coreboot-utils/metadata.xml
new file mode 100644
index 000000000000..e33cf762c720
--- /dev/null
+++ b/app-admin/coreboot-utils/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>grobian@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>