mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-03 16:07:51 +00:00
i2c-tools: update to 4.2
update the build variables to use AR not TARGET_AR, TARGET_AR is not exposed to PKG_TOOLCHAIN=make update from 3.1.2 (2015-06-17) to 4.2 (2020-09-22) changelog: https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/tree/CHANGES
This commit is contained in:
parent
23f5871653
commit
4e4309350c
@ -2,8 +2,8 @@
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="i2c-tools"
|
||||
PKG_VERSION="3.1.2"
|
||||
PKG_SHA256="6d6079153cd49a62d4addacef4c092db1a46ba60b2807070a3fbe050262aef87"
|
||||
PKG_VERSION="4.2"
|
||||
PKG_SHA256="37f2dabc7082d185903ff21d1f584b5dcb4dd2eb2c879bbd8d7c50ae900dacd6"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://i2c.wiki.kernel.org/index.php/I2C_Tools"
|
||||
PKG_URL="https://www.kernel.org/pub/software/utils/i2c-tools/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
@ -19,7 +19,7 @@ pre_make_target() {
|
||||
make_target() {
|
||||
make EXTRA="py-smbus" \
|
||||
CC="$CC" \
|
||||
AR="$TARGET_AR" \
|
||||
AR="$AR" \
|
||||
CFLAGS="$TARGET_CFLAGS" \
|
||||
CPPFLAGS="$TARGET_CPPFLAGS -I${SYSROOT_PREFIX}/usr/include/$PKG_PYTHON_VERSION" \
|
||||
PYTHON=${TOOLCHAIN}/bin/python3
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 2b4135907c1aa27edeb397e62b67386ff5d7d3d5 Mon Sep 17 00:00:00 2001
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Date: Thu, 23 Jun 2016 18:59:07 +0200
|
||||
Subject: decode-dimms: Correctly check for out-of-bounds vendor ID
|
||||
|
||||
---
|
||||
CHANGES | 3 +++
|
||||
eeprom/decode-dimms | 8 +++++---
|
||||
2 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CHANGES b/CHANGES
|
||||
index 69f9853..9d0acd7 100644
|
||||
--- a/CHANGES
|
||||
+++ b/CHANGES
|
||||
@@ -1,6 +1,9 @@
|
||||
i2c-tools CHANGES
|
||||
-----------------
|
||||
|
||||
+3.1.3 (work in progress)
|
||||
+ decode-dimms: Correctly check for out-of-bounds vendor ID
|
||||
+
|
||||
3.1.2 (2015-06-17)
|
||||
decode-dimms: Fix DDR3 extended temp range refresh rate decoding
|
||||
py-smbus: Add support for python 3
|
||||
diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms
|
||||
index a088ba0..4a15fd7 100755
|
||||
--- a/eeprom/decode-dimms
|
||||
+++ b/eeprom/decode-dimms
|
||||
@@ -343,9 +343,11 @@ sub manufacturer_ddr3($$)
|
||||
{
|
||||
my ($count, $code) = @_;
|
||||
return "Invalid" if parity($count) != 1;
|
||||
- return "Invalid" if parity($code) != 1;
|
||||
- return (($code & 0x7F) - 1 > $vendors[$count & 0x7F]) ? "Unknown" :
|
||||
- $vendors[$count & 0x7F][($code & 0x7F) - 1];
|
||||
+ return "Invalid" if parity($code) != 1
|
||||
+ or ($code & 0x7F) == 0;
|
||||
+ return "Unknown" if ($count & 0x7F) >= @vendors
|
||||
+ or ($code & 0x7F) - 1 >= @{$vendors[$count & 0x7F]};
|
||||
+ return $vendors[$count & 0x7F][($code & 0x7F) - 1];
|
||||
}
|
||||
|
||||
sub manufacturer(@)
|
||||
--
|
||||
cgit 1.2.3-1.el7
|
||||
|
@ -1,98 +0,0 @@
|
||||
From 11a1738e83bbb093f22e38ad11ba9f0e73ae9248 Mon Sep 17 00:00:00 2001
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Date: Tue, 8 Sep 2020 17:22:33 +0200
|
||||
Subject: i2cset: Fix short writes with mask
|
||||
|
||||
Short writes used "daddress" for the value, but the masking code did
|
||||
not expect that, and instead applied the mask to a variable that was
|
||||
never used.
|
||||
|
||||
So change short writes to use "value" for the value, as all other
|
||||
commands do. Adjust all code paths accordingly.
|
||||
|
||||
Reported by David Jedynak.
|
||||
|
||||
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
||||
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
|
||||
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
|
||||
---
|
||||
CHANGES | 1 +
|
||||
tools/i2cset.c | 25 +++++++++++++------------
|
||||
2 files changed, 14 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/tools/i2cset.c b/tools/i2cset.c
|
||||
index e143b65..84925d2 100644
|
||||
--- a/tools/i2cset.c
|
||||
+++ b/tools/i2cset.c
|
||||
@@ -123,11 +123,11 @@ static int confirm(const char *filename, int address, int size, int daddress,
|
||||
}
|
||||
|
||||
fprintf(stderr, "I will write to device file %s, chip address "
|
||||
- "0x%02x, data address\n0x%02x, ", filename, address, daddress);
|
||||
- if (size == I2C_SMBUS_BYTE)
|
||||
- fprintf(stderr, "no data.\n");
|
||||
- else if (size == I2C_SMBUS_BLOCK_DATA ||
|
||||
- size == I2C_SMBUS_I2C_BLOCK_DATA) {
|
||||
+ "0x%02x,\n", filename, address);
|
||||
+ if (size != I2C_SMBUS_BYTE)
|
||||
+ fprintf(stderr, "data address 0x%02x, ", daddress);
|
||||
+ if (size == I2C_SMBUS_BLOCK_DATA ||
|
||||
+ size == I2C_SMBUS_I2C_BLOCK_DATA) {
|
||||
int i;
|
||||
|
||||
fprintf(stderr, "data");
|
||||
@@ -138,7 +138,7 @@ static int confirm(const char *filename, int address, int size, int daddress,
|
||||
} else
|
||||
fprintf(stderr, "data 0x%02x%s, mode %s.\n", value,
|
||||
vmask ? " (masked)" : "",
|
||||
- size == I2C_SMBUS_BYTE_DATA ? "byte" : "word");
|
||||
+ size == I2C_SMBUS_WORD_DATA ? "word" : "byte");
|
||||
if (pec)
|
||||
fprintf(stderr, "PEC checking enabled.\n");
|
||||
|
||||
@@ -261,6 +261,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* read values from command line */
|
||||
switch (size) {
|
||||
+ case I2C_SMBUS_BYTE:
|
||||
+ /* short write: data address was not really data address */
|
||||
+ value = daddress;
|
||||
+ break;
|
||||
case I2C_SMBUS_BYTE_DATA:
|
||||
case I2C_SMBUS_WORD_DATA:
|
||||
value = strtol(argv[flags+4], &end, 0);
|
||||
@@ -341,12 +345,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!yes) {
|
||||
fprintf(stderr, "Old value 0x%0*x, write mask "
|
||||
- "0x%0*x: Will write 0x%0*x to register "
|
||||
- "0x%02x\n",
|
||||
+ "0x%0*x, will write 0x%0*x\n",
|
||||
size == I2C_SMBUS_WORD_DATA ? 4 : 2, oldvalue,
|
||||
size == I2C_SMBUS_WORD_DATA ? 4 : 2, vmask,
|
||||
- size == I2C_SMBUS_WORD_DATA ? 4 : 2, value,
|
||||
- daddress);
|
||||
+ size == I2C_SMBUS_WORD_DATA ? 4 : 2, value);
|
||||
|
||||
fprintf(stderr, "Continue? [Y/n] ");
|
||||
fflush(stderr);
|
||||
@@ -366,7 +368,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
switch (size) {
|
||||
case I2C_SMBUS_BYTE:
|
||||
- res = i2c_smbus_write_byte(file, daddress);
|
||||
+ res = i2c_smbus_write_byte(file, value);
|
||||
break;
|
||||
case I2C_SMBUS_WORD_DATA:
|
||||
res = i2c_smbus_write_word_data(file, daddress, value);
|
||||
@@ -404,7 +406,6 @@ int main(int argc, char *argv[])
|
||||
switch (size) {
|
||||
case I2C_SMBUS_BYTE:
|
||||
res = i2c_smbus_read_byte(file);
|
||||
- value = daddress;
|
||||
break;
|
||||
case I2C_SMBUS_WORD_DATA:
|
||||
res = i2c_smbus_read_word_data(file, daddress);
|
||||
--
|
||||
cgit 1.2.3-1.el7
|
||||
|
Loading…
x
Reference in New Issue
Block a user