import sysutils/iucode-tool, tweaked from a port from patrick@
"This is a simple tool to manipulate microcode for Intel CPUs."
This commit is contained in:
parent
be6250950d
commit
f2edc380f1
30
sysutils/iucode-tool/Makefile
Normal file
30
sysutils/iucode-tool/Makefile
Normal file
@ -0,0 +1,30 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2018/01/10 20:36:11 sthen Exp $
|
||||
|
||||
COMMENT= manipulate microcode update collections for Intel
|
||||
|
||||
V= 2.2
|
||||
PKGNAME= iucode-tool-$V
|
||||
DISTNAME= iucode-tool_$V
|
||||
WRKDIST= ${WRKDIR}/${PKGNAME}
|
||||
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
|
||||
CATEGORIES= sysutils
|
||||
|
||||
MAINTAINER= Patrick Wildt <patrick@blueri.se>
|
||||
|
||||
MASTER_SITES= https://gitlab.com/iucode-tool/releases/raw/latest/
|
||||
|
||||
# GPLv2+
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
WANTLIB += c
|
||||
|
||||
BUILD_DEPENDS= devel/argp-standalone
|
||||
SEPARATE_BUILD= Yes
|
||||
|
||||
CONFIGURE_STYLE= gnu
|
||||
CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
|
||||
.include <bsd.port.mk>
|
2
sysutils/iucode-tool/distinfo
Normal file
2
sysutils/iucode-tool/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (iucode-tool_2.2.tar.xz) = mBDa+SW4qcokStxOGRa8q2VgHJ6+h+kcIoH3gFWYKXE=
|
||||
SIZE (iucode-tool_2.2.tar.xz) = 149896
|
40
sysutils/iucode-tool/patches/patch-iucode_tool_c
Normal file
40
sysutils/iucode-tool/patches/patch-iucode_tool_c
Normal file
@ -0,0 +1,40 @@
|
||||
$OpenBSD: patch-iucode_tool_c,v 1.1.1.1 2018/01/10 20:36:11 sthen Exp $
|
||||
|
||||
Index: iucode_tool.c
|
||||
--- iucode_tool.c.orig
|
||||
+++ iucode_tool.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <dirent.h>
|
||||
#include <time.h>
|
||||
#include <cpuid.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include "intel_microcode.h"
|
||||
|
||||
@@ -1796,7 +1797,7 @@ static int write_intel_microcodes(int dirfd,
|
||||
e = e->next;
|
||||
}
|
||||
if (unlikely(!total_written)) {
|
||||
- return ENODATA; /* don't create empty files */
|
||||
+ return ENOTSUP; /* don't create empty files */
|
||||
} else if (unlikely(ft == 1 && total_written > UINT32_MAX)) {
|
||||
/* file too large for cpio archive members */
|
||||
print_err("%s: too much data", filename);
|
||||
@@ -2430,7 +2431,7 @@ static int do_write_microcode(const char * const filen
|
||||
|
||||
print_msg(1, "Writing selected microcodes to: %s", filename);
|
||||
rc = write_intel_microcodes(AT_FDCWD, filename, ft, microcodes);
|
||||
- if (rc == ENODATA) {
|
||||
+ if (rc == ENOTSUP) {
|
||||
print_warn("All microcodes in %s were skipped, file unchanged", filename);
|
||||
return 0;
|
||||
}
|
||||
@@ -2607,7 +2608,7 @@ static int do_write_firmware(const char * const dirnam
|
||||
|
||||
if (!rc)
|
||||
count++;
|
||||
- if (rc == ENODATA)
|
||||
+ if (rc == ENOTSUP)
|
||||
rc = 0;
|
||||
}
|
||||
|
1
sysutils/iucode-tool/pkg/DESCR
Normal file
1
sysutils/iucode-tool/pkg/DESCR
Normal file
@ -0,0 +1 @@
|
||||
This is a simple tool to manipulate microcode for Intel CPUs.
|
3
sysutils/iucode-tool/pkg/PLIST
Normal file
3
sysutils/iucode-tool/pkg/PLIST
Normal file
@ -0,0 +1,3 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2018/01/10 20:36:11 sthen Exp $
|
||||
@man man/man8/iucode_tool.8
|
||||
@bin sbin/iucode_tool
|
Loading…
Reference in New Issue
Block a user