pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/decode-dimms Update decode-dimms to 2019-10-02



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b7ce5e957883
branches:  trunk
changeset: 341526:b7ce5e957883
user:      pgoyette <pgoyette%pkgsrc.org@localhost>
date:      Thu Oct 03 18:42:26 2019 +0000

description:
Update decode-dimms to 2019-10-02

Upstream changes.  (Note that some of these don't really affect to NetBSD,
but are included anyway for reducing differences with the upstream copy.)

        Detect and report truncated input files
           If using the wrong driver, or if reading from a truncated dump
           file, make sure we don't attempt to use data bytes beyond what
           is available. Doing so would spit pages of cryptic warnings to
           the user, explicit error messages are much better.

        Print kernel driver used
           When not reading from dump files, print which kernel driver is
           being used.  This will help spot setup mistakes where the legacy
           eeprom driver stole EEPROMs from the ee1004 driver for DDR4
           memory.

        Print DDR memory speed in MT/s not MHz
           Because it is DDR memory, transaction rate is twice the actual
           clock speed. What the user is interested in is MT/s, and that's
           the number we display, so use the right unit.

        Add DDR5 memory types to the list
           No information available yet about the contents of the DDR5 SPD
           EEPROMs but we can already report the basic memory type.

        Decode manufacturing data for LPDDR3
           I assume the manufacturing data format for LPDDR3 is the same
           as regular DDR3.

        Fix the version string
           We moved away from Subversion long ago, so $Revision$ and $Date$
           are no longer being resolved. Just use the version of i2c-tools
           itself.

        Point the user to the right driversHEADmaster
           The header comment only mentioned the legacy eeprom driver, while
           the at24 and ee1004 drivers should be used nowadays.

diffstat:

 sysutils/decode-dimms/Makefile                   |  11 +++---
 sysutils/decode-dimms/distinfo                   |  12 +++---
 sysutils/decode-dimms/patches/patch-decode-dimms |  40 +++++++++++++----------
 3 files changed, 33 insertions(+), 30 deletions(-)

diffs (153 lines):

diff -r b62613446154 -r b7ce5e957883 sysutils/decode-dimms/Makefile
--- a/sysutils/decode-dimms/Makefile    Thu Oct 03 18:28:29 2019 +0000
+++ b/sysutils/decode-dimms/Makefile    Thu Oct 03 18:42:26 2019 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.20 2019/09/13 00:17:50 pgoyette Exp $
+# $NetBSD: Makefile,v 1.21 2019/10/03 18:42:26 pgoyette Exp $
 
 # no Release yet
-PKG_DATE=      20190903
-GIT_COMMIT=    ecd987aa6d126830bb0b5bfbd67240c9568b441f
+PKG_DATE=      20191002
+GIT_COMMIT=    fde115730417ff24025f6f0f54d879f6b0789aca
 DISTNAME=      i2c-tools-${GIT_COMMIT}
-PKGNAME=       decode-dimms-0.0.${PKG_DATE}
+PKGNAME=       decode-dimms-4.1.${PKG_DATE}
 CATEGORIES=    sysutils
 MASTER_SITES=  https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/snapshot/
 
@@ -19,8 +19,7 @@
 SUBST_CLASSES+=                rev
 SUBST_STAGE.rev=       post-extract
 SUBST_FILES.rev=       eeprom/decode-dimms
-SUBST_SED.rev=         -e 's/^$$revision = .*;/$$revision = "${PKG_DATE}-${GIT_COMMIT}";/'
-SUBST_SED.rev+=                -e '/^$$revision =~/d'
+SUBST_SED.rev=         -e '/I2C_TOOLS_VER/s/4.1/4.1-${PKG_DATE}-${GIT_COMMIT}/'
 
 NO_BUILD=      yes
 
diff -r b62613446154 -r b7ce5e957883 sysutils/decode-dimms/distinfo
--- a/sysutils/decode-dimms/distinfo    Thu Oct 03 18:28:29 2019 +0000
+++ b/sysutils/decode-dimms/distinfo    Thu Oct 03 18:42:26 2019 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.16 2019/09/13 00:17:50 pgoyette Exp $
+$NetBSD: distinfo,v 1.17 2019/10/03 18:42:26 pgoyette Exp $
 
-SHA1 (i2c-tools-ecd987aa6d126830bb0b5bfbd67240c9568b441f.tar.gz) = 9d97c10b7b3e3ad9e4901bcacab8aed933f0699a
-RMD160 (i2c-tools-ecd987aa6d126830bb0b5bfbd67240c9568b441f.tar.gz) = b710ff3f86bd036026ceac9f84e881f97a21cc46
-SHA512 (i2c-tools-ecd987aa6d126830bb0b5bfbd67240c9568b441f.tar.gz) = 9d43280df8c529fa9755e51b2a0de863330919d3e17f9b91a3718744b0c372bc40bbd60be7b3d8839cff8f637627aab8c0404f9664bb25d9961d32e4afe12847
-Size (i2c-tools-ecd987aa6d126830bb0b5bfbd67240c9568b441f.tar.gz) = 98369 bytes
-SHA1 (patch-decode-dimms) = acad3757981b81fd7fd15a3b39ec72d8ae2a7dd7
+SHA1 (i2c-tools-fde115730417ff24025f6f0f54d879f6b0789aca.tar.gz) = 9f218c6239a20be444ec7b4f5abe6459551de567
+RMD160 (i2c-tools-fde115730417ff24025f6f0f54d879f6b0789aca.tar.gz) = 5872fabd73f32c793679dcf1d23ed7cb74da8a7c
+SHA512 (i2c-tools-fde115730417ff24025f6f0f54d879f6b0789aca.tar.gz) = b51107b09578409d729a0d4dd2b3272ed8a4b46fa32faeda803e3c2e5c7874bdf405fc32e445d4d8a5f6f3fdd61256817d83aa744d246198935fd5cb7f5dd80e
+Size (i2c-tools-fde115730417ff24025f6f0f54d879f6b0789aca.tar.gz) = 98669 bytes
+SHA1 (patch-decode-dimms) = 9bbfaf9026fd5e3b9fe4fd789c8de79d1b0353be
 SHA1 (patch-decode-dimms.1) = c1c1444a73fa848eda0223e2c176819d4ded6641
diff -r b62613446154 -r b7ce5e957883 sysutils/decode-dimms/patches/patch-decode-dimms
--- a/sysutils/decode-dimms/patches/patch-decode-dimms  Thu Oct 03 18:28:29 2019 +0000
+++ b/sysutils/decode-dimms/patches/patch-decode-dimms  Thu Oct 03 18:42:26 2019 +0000
@@ -1,23 +1,23 @@
-$NetBSD: patch-decode-dimms,v 1.15 2019/09/13 00:17:50 pgoyette Exp $
+$NetBSD: patch-decode-dimms,v 1.16 2019/10/03 18:42:26 pgoyette Exp $
 
 Add NetBSD-specific ability to use spdmem(4)'s sysctl values as
 input.  Remove attempts to use linux-specific data sources.
 
---- eeprom/decode-dimms.orig   2019-06-17 13:50:38.126887013 -0700
-+++ eeprom/decode-dimms        2019-06-17 13:51:53.574600812 -0700
-@@ -42,8 +42,9 @@
+--- eeprom/decode-dimms.orig   2019-10-03 10:53:17.810726776 -0700
++++ eeprom/decode-dimms        2019-10-03 11:02:03.877954987 -0700
+@@ -45,8 +45,9 @@
  use Fcntl qw(:DEFAULT :seek);
  use File::Basename;
  use vars qw($opt_html $opt_bodyonly $opt_side_by_side $opt_merge
 -          $opt_igncheck $use_sysfs $use_hexdump $sbs_col_width
--          @vendors %decode_callback $revision @dimm $current %hexdump_cache);
-+          $opt_igncheck $use_sysfs $use_hexdump $use_sysctl $sbs_col_width
-+          @vendors %decode_callback $revision @dimm $current %hexdump_cache
+-          @vendors %decode_callback @dimm $current %hexdump_cache);
++          $opt_igncheck $use_sysctl $use_sysfs $use_hexdump $sbs_col_width
++          @vendors %decode_callback @dimm $current %hexdump_cache
 +          %sysctl_cache);
  
  use constant LITTLEENDIAN     => "little-endian";
  use constant BIGENDIAN                => "big-endian";
-@@ -417,6 +418,7 @@
+@@ -419,6 +420,7 @@
  );
  
  $use_sysfs = -d '/sys/bus';
@@ -25,7 +25,7 @@
  
  # We consider that no data was written to this area of the SPD EEPROM if
  # all bytes read 0x00 or all bytes read 0xff
-@@ -2355,6 +2357,26 @@
+@@ -2357,6 +2359,26 @@
        }
  }
  
@@ -52,17 +52,21 @@
  # Read bytes from SPD-EEPROM
  # Note: offset must be a multiple of 16!
  sub readspd($$$)
-@@ -2364,6 +2386,9 @@
-       if ($use_hexdump) {
-               @bytes = read_hexdump($dimm_i);
+@@ -2370,6 +2392,13 @@
+                       $size = @bytes - $offset;
+               }
                return @bytes[$offset..($offset + $size - 1)];
 +      } elsif ($use_sysctl) {
 +              @bytes = read_sysctl($dimm_i);
-+              return @bytes[$offset..($offset + $size - 1)];
++              if (@bytes < $offset + $size) {
++                      print STDERR "WARNING: sysctl for $dimm_i is truncated\n";
++                      $size = @bytes - $offset;
++              }
++              return return @bytes[$offset..($offset + $size - 1)];
        } elsif ($use_sysfs) {
                # Kernel 2.6 with sysfs
                sysopen(HANDLE, "$dimm_i/eeprom", O_RDONLY)
-@@ -2440,7 +2465,7 @@
+@@ -2449,7 +2478,7 @@
  # Parse command-line
  foreach (@ARGV) {
        if ($_ eq '-h' || $_ eq '--help') {
@@ -71,7 +75,7 @@
                        "       $0 -h\n\n",
                        "  -f, --format            Print nice html output\n",
                        "  -b, --bodyonly          Don't print html header\n",
-@@ -2454,6 +2479,8 @@
+@@ -2463,6 +2492,8 @@
                        "  -x,                     Read data from hexdump files\n",
                        "  -X,                     Same as -x except treat multibyte hex\n",
                        "                          data as little endian\n",
@@ -80,7 +84,7 @@
                        "  -h, --help              Display this usage summary\n";
                print <<"EOF";
  
-@@ -2498,13 +2525,20 @@
+@@ -2507,13 +2538,20 @@
                $use_hexdump = LITTLEENDIAN;
                next;
        }
@@ -102,7 +106,7 @@
  }
  
  # Default values
-@@ -2582,7 +2616,6 @@
+@@ -2598,7 +2636,6 @@
  #  * chk_spd: The checksum or CRC value found in the EEPROM
  #  * chk_calc: The checksum or CRC computed from the EEPROM data
  # Keys are added over time.
@@ -110,7 +114,7 @@
  
  for my $i (0 .. $#dimm) {
        my @bytes = readspd(0, 128, $dimm[$i]->{file});
-@@ -2634,7 +2667,7 @@
+@@ -2650,7 +2687,7 @@
                printl("Decoding EEPROM", $dimm[$current]->{eeprom});
        }
  



Home | Main Index | Thread Index | Old Index