diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2018-10-23 10:16:12 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2018-10-23 10:16:12 +0000 |
commit | 3a1331729f8f606cbbe1066e0e8670948638f92e (patch) | |
tree | 71c37044faae895d18c1f114170213d882a32b81 /sysutils | |
parent | 5adb2d99c0f8c683a53563a6d0e6cc815c35143c (diff) | |
download | pkgsrc-3a1331729f8f606cbbe1066e0e8670948638f92e.tar.gz |
Add aarch64 support.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/dmidecode/Makefile | 6 | ||||
-rw-r--r-- | sysutils/dmidecode/PLIST | 8 | ||||
-rw-r--r-- | sysutils/dmidecode/PLIST.i386 | 7 | ||||
-rw-r--r-- | sysutils/dmidecode/PLIST.x86_64 | 7 | ||||
-rw-r--r-- | sysutils/dmidecode/distinfo | 3 | ||||
-rw-r--r-- | sysutils/dmidecode/patches/patch-dmidecode.c | 53 |
6 files changed, 73 insertions, 11 deletions
diff --git a/sysutils/dmidecode/Makefile b/sysutils/dmidecode/Makefile index c491f022ee5..d14de2d7f68 100644 --- a/sysutils/dmidecode/Makefile +++ b/sysutils/dmidecode/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.24 2018/10/23 03:32:03 msaitoh Exp $ +# $NetBSD: Makefile,v 1.25 2018/10/23 10:16:12 jmcneill Exp $ # DISTNAME= dmidecode-3.2 -PKGREVISION= 1 +PKGREVISION= 2 EXTRACT_SUFX= .tar.xz CATEGORIES= sysutils MASTER_SITES= http://download.savannah.gnu.org/releases/dmidecode/ @@ -20,6 +20,6 @@ PATCH_DIST_STRIP= -p1 MAKE_FLAGS+= CFLAGS=${CFLAGS:Q} MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q} -ONLY_FOR_PLATFORM= *-*-i386 *-*-x86_64 +ONLY_FOR_PLATFORM= *-*-i386 *-*-x86_64 *-*-aarch64 .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/dmidecode/PLIST b/sysutils/dmidecode/PLIST index d51c6f4970c..f12154ea071 100644 --- a/sysutils/dmidecode/PLIST +++ b/sysutils/dmidecode/PLIST @@ -1,12 +1,6 @@ -@comment $NetBSD: PLIST,v 1.5 2018/10/12 10:08:00 msaitoh Exp $ -man/man8/biosdecode.8 +@comment $NetBSD: PLIST,v 1.6 2018/10/23 10:16:12 jmcneill Exp $ man/man8/dmidecode.8 -man/man8/ownership.8 -man/man8/vpddecode.8 -sbin/biosdecode sbin/dmidecode -sbin/ownership -sbin/vpddecode share/doc/dmidecode/AUTHORS share/doc/dmidecode/NEWS share/doc/dmidecode/README diff --git a/sysutils/dmidecode/PLIST.i386 b/sysutils/dmidecode/PLIST.i386 new file mode 100644 index 00000000000..f969c36c461 --- /dev/null +++ b/sysutils/dmidecode/PLIST.i386 @@ -0,0 +1,7 @@ +@comment $NetBSD: PLIST.i386,v 1.1 2018/10/23 10:16:12 jmcneill Exp $ +man/man8/biosdecode.8 +man/man8/ownership.8 +man/man8/vpddecode.8 +sbin/biosdecode +sbin/ownership +sbin/vpddecode diff --git a/sysutils/dmidecode/PLIST.x86_64 b/sysutils/dmidecode/PLIST.x86_64 new file mode 100644 index 00000000000..bdb1252896b --- /dev/null +++ b/sysutils/dmidecode/PLIST.x86_64 @@ -0,0 +1,7 @@ +@comment $NetBSD: PLIST.x86_64,v 1.1 2018/10/23 10:16:12 jmcneill Exp $ +man/man8/biosdecode.8 +man/man8/ownership.8 +man/man8/vpddecode.8 +sbin/biosdecode +sbin/ownership +sbin/vpddecode diff --git a/sysutils/dmidecode/distinfo b/sysutils/dmidecode/distinfo index 346d690c295..8808232bbdb 100644 --- a/sysutils/dmidecode/distinfo +++ b/sysutils/dmidecode/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.21 2018/10/23 03:32:03 msaitoh Exp $ +$NetBSD: distinfo,v 1.22 2018/10/23 10:16:12 jmcneill Exp $ SHA1 (dmidecode-patches/dmidecode-3.2.tar.xz) = acf4b5c6e757066453fd06aa9060fceb257849bf RMD160 (dmidecode-patches/dmidecode-3.2.tar.xz) = 29c7718c1c149798a0f7d7b8830532ca2186c9d6 @@ -9,3 +9,4 @@ RMD160 (dmidecode-patches/fde47bb227b8fa817c88d7e10a8eb771c46de1df) = 0f7f3565a0 SHA512 (dmidecode-patches/fde47bb227b8fa817c88d7e10a8eb771c46de1df) = ef5856934bcbf831cad6f733ecd8d0dad92087f4813579b75f89e5576a8be1df23fd670d2f86b0ac2ff1e084951b05ae15421a0e6e84b2cec76789ddec85e88f Size (dmidecode-patches/fde47bb227b8fa817c88d7e10a8eb771c46de1df) = 989 bytes SHA1 (patch-aa) = 6c861b3742b1627a1b60dbaea9df0843f2ed603d +SHA1 (patch-dmidecode.c) = 63cf0302a13603038ee871cc7410009a722eae39 diff --git a/sysutils/dmidecode/patches/patch-dmidecode.c b/sysutils/dmidecode/patches/patch-dmidecode.c new file mode 100644 index 00000000000..495eb46aa66 --- /dev/null +++ b/sysutils/dmidecode/patches/patch-dmidecode.c @@ -0,0 +1,53 @@ +$NetBSD: patch-dmidecode.c,v 1.1 2018/10/23 10:16:12 jmcneill Exp $ + +Find SMBIOS table address on NetBSD ARM64. + +--- dmidecode.c.orig 2018-10-23 09:59:50.281527237 +0000 ++++ dmidecode.c +@@ -72,6 +72,12 @@ + #include <kenv.h> + #endif + ++#ifdef __NetBSD__ ++#include <sys/param.h> ++#include <sys/sysctl.h> ++#include <errno.h> ++#endif ++ + #include "version.h" + #include "config.h" + #include "types.h" +@@ -5463,6 +5469,9 @@ static int address_from_efi(off_t *addre + char linebuf[64]; + #elif defined(__FreeBSD__) + char addrstr[KENV_MVALLEN + 1]; ++#elif defined(__NetBSD__) ++ uint64_t addr; ++ size_t addrlen; + #endif + const char *eptype; + int ret; +@@ -5516,6 +5525,23 @@ static int address_from_efi(off_t *addre + *address = strtoull(addrstr, NULL, 0); + eptype = "SMBIOS"; + ret = 0; ++#elif defined(__NetBSD__) ++ /* ++ * On NetBSD, SMBIOS anchor base address on non-x86 is exposed ++ * via sysctl. ++ */ ++ addrlen = sizeof(addr); ++ ret = sysctlbyname("machdep.smbios", &addr, &addrlen, NULL, 0); ++ if (ret == -1) ++ { ++ if (errno != ENOENT) ++ perror("sysctlbyname"); ++ return EFI_NOT_FOUND; ++ } ++ ++ *address = (off_t)addr; ++ eptype = "SMBIOS"; ++ ret = 0; + #else + ret = EFI_NOT_FOUND; + #endif |