pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/dmidecode Add aarch64 support.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/aa43a5e5edf4
branches:  trunk
changeset: 314261:aa43a5e5edf4
user:      jmcneill <jmcneill%pkgsrc.org@localhost>
date:      Tue Oct 23 10:16:12 2018 +0000

description:
Add aarch64 support.

diffstat:

 sysutils/dmidecode/Makefile                  |   6 +-
 sysutils/dmidecode/PLIST                     |   8 +---
 sysutils/dmidecode/PLIST.i386                |   7 +++
 sysutils/dmidecode/PLIST.x86_64              |   7 +++
 sysutils/dmidecode/distinfo                  |   3 +-
 sysutils/dmidecode/patches/patch-dmidecode.c |  53 ++++++++++++++++++++++++++++
 6 files changed, 73 insertions(+), 11 deletions(-)

diffs (132 lines):

diff -r 883f1f0b8e82 -r aa43a5e5edf4 sysutils/dmidecode/Makefile
--- a/sysutils/dmidecode/Makefile       Tue Oct 23 09:55:09 2018 +0000
+++ b/sysutils/dmidecode/Makefile       Tue Oct 23 10:16:12 2018 +0000
@@ -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 @@
 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 -r 883f1f0b8e82 -r aa43a5e5edf4 sysutils/dmidecode/PLIST
--- a/sysutils/dmidecode/PLIST  Tue Oct 23 09:55:09 2018 +0000
+++ b/sysutils/dmidecode/PLIST  Tue Oct 23 10:16:12 2018 +0000
@@ -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 -r 883f1f0b8e82 -r aa43a5e5edf4 sysutils/dmidecode/PLIST.i386
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dmidecode/PLIST.i386     Tue Oct 23 10:16:12 2018 +0000
@@ -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 -r 883f1f0b8e82 -r aa43a5e5edf4 sysutils/dmidecode/PLIST.x86_64
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dmidecode/PLIST.x86_64   Tue Oct 23 10:16:12 2018 +0000
@@ -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 -r 883f1f0b8e82 -r aa43a5e5edf4 sysutils/dmidecode/distinfo
--- a/sysutils/dmidecode/distinfo       Tue Oct 23 09:55:09 2018 +0000
+++ b/sysutils/dmidecode/distinfo       Tue Oct 23 10:16:12 2018 +0000
@@ -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 @@
 SHA512 (dmidecode-patches/fde47bb227b8fa817c88d7e10a8eb771c46de1df) = ef5856934bcbf831cad6f733ecd8d0dad92087f4813579b75f89e5576a8be1df23fd670d2f86b0ac2ff1e084951b05ae15421a0e6e84b2cec76789ddec85e88f
 Size (dmidecode-patches/fde47bb227b8fa817c88d7e10a8eb771c46de1df) = 989 bytes
 SHA1 (patch-aa) = 6c861b3742b1627a1b60dbaea9df0843f2ed603d
+SHA1 (patch-dmidecode.c) = 63cf0302a13603038ee871cc7410009a722eae39
diff -r 883f1f0b8e82 -r aa43a5e5edf4 sysutils/dmidecode/patches/patch-dmidecode.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dmidecode/patches/patch-dmidecode.c      Tue Oct 23 10:16:12 2018 +0000
@@ -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



Home | Main Index | Thread Index | Old Index