Unbreak and update to version 4.1 (added DDR4 support).

PR:		243468, 244696
Approved by:	maintainer (avg)
This commit is contained in:
Alexey Dokuchaev 2020-03-10 11:40:19 +00:00
parent 35b0b52888
commit c0f825f3c8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=528158
4 changed files with 18 additions and 27 deletions

View file

@ -2,19 +2,17 @@
# $FreeBSD$
PORTNAME= i2c-tools
PORTVERSION= 3.1.1
PORTVERSION= 4.1
CATEGORIES= sysutils
MASTER_SITES= http://dl.lm-sensors.org/i2c-tools/releases/
MASTER_SITES= https://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/
MAINTAINER= avg@FreeBSD.org
COMMENT= Heterogeneous set of I2C tools
BROKEN= unfetchable
LICENSE= GPLv2
NO_BUILD= yes
USES= perl5 shebangfix tar:bzip2
USES= perl5 shebangfix tar:xz
USE_PERL5= run
PLIST_FILES= man/man1/decode-dimms.1.gz sbin/decode-dimms

View file

@ -1,2 +1,3 @@
SHA256 (i2c-tools-3.1.1.tar.bz2) = 14d4d7d60d1c12e43f2befe239c682a5c44c27682f153d4b58c1e392d2db1700
SIZE (i2c-tools-3.1.1.tar.bz2) = 71789
TIMESTAMP = 1543829767
SHA256 (i2c-tools-4.1.tar.xz) = 57b219efd183795bd545dd5a60d9eabbe9dcb6f8fb92bc7ba2122b87f98527d5
SIZE (i2c-tools-4.1.tar.xz) = 83576

View file

@ -28,18 +28,6 @@
printl("Refresh Rate", ddr2_refresh_rate($bytes->[12]));
my @burst;
@@ -1289,8 +1292,9 @@
printl("DLL-Off Mode supported?", ($bytes->[30] & 128) ? "Yes" : "No");
printl("Operating temperature range", sprintf "0-%d degrees C",
($bytes->[31] & 1) ? 95 : 85);
- printl("Refresh Rate in extended temp range",
- ($bytes->[31] & 2) ? "2X" : "1X");
+ printl_cond($bytes->[31] & 1,
+ "Refresh Rate in extended temp range",
+ ($bytes->[31] & 2) ? "1X" : "2X");
printl("Auto Self-Refresh?", ($bytes->[31] & 4) ? "Yes" : "No");
printl("On-Die Thermal Sensor readout?",
($bytes->[31] & 8) ? "Yes" : "No");
@@ -1624,6 +1628,28 @@
}
}
@ -140,7 +128,7 @@
}
if ($opt_html && !$opt_bodyonly) {
@@ -1777,61 +1804,20 @@
@@ -1777,65 +1804,20 @@
Jean Delvare, Trent Piepho and others');
@ -165,7 +153,9 @@
- my (@dirs, $dir, $opened, $file, @files);
-
- if ($use_sysfs) {
- @dirs = ('/sys/bus/i2c/drivers/eeprom', '/sys/bus/i2c/drivers/at24');
- @dirs = ('/sys/bus/i2c/drivers/eeprom',
- '/sys/bus/i2c/drivers/at24',
- '/sys/bus/i2c/drivers/ee1004'); # DDR4
- } else {
- @dirs = ('/proc/sys/dev/sensors');
- }
@ -183,7 +173,9 @@
- # or spd (driver at24)
- my $attr = sysfs_device_attribute("$dir/$file", "name");
- next unless defined $attr &&
- ($attr eq "eeprom" || $attr eq "spd");
- ($attr eq "eeprom" ||
- $attr eq "spd" ||
- $attr eq "ee1004"); # DDR4
- } else {
- next unless $file =~ /^eeprom-/;
- }
@ -214,11 +206,11 @@
# @dimm is a list of hashes. There's one hash for each EEPROM we found.
@@ -2022,7 +2008,7 @@
if ($opt_side_by_side) {
print "\n\n";
} else {
print "<b><u>" if $opt_html;
- printl2("\n\nDecoding EEPROM", $dimm[$current]->{file});
+ printl2("\n\nDecoding EEPROM", $dimm[$current]->{eeprom});
print "</u></b>" if $opt_html;
- printl2("\n\nDecoding EEPROM", $dimm[$current]->{file},
+ printl2("\n\nDecoding EEPROM", $dimm[$current]->{eeprom},
"text-decoration: underline; font-weight: bold;");
}
print "<table border=1>\n" if $opt_html;

View file

@ -4,4 +4,4 @@ helpers, EEPROM decoding scripts, EEPROM programming tools, and a python
module for SMBus access.
Only DIMM SPD decoding tool is ported at the moment.
WWW: http://www.lm-sensors.org/wiki/I2CTools
WWW: https://i2c.wiki.kernel.org/index.php/I2C_Tools