diff --git a/packages/addons/addon-depends/system-tools-depends/i2c-tools/package.mk b/packages/addons/addon-depends/system-tools-depends/i2c-tools/package.mk index a62c545c45..44162790a9 100644 --- a/packages/addons/addon-depends/system-tools-depends/i2c-tools/package.mk +++ b/packages/addons/addon-depends/system-tools-depends/i2c-tools/package.mk @@ -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 diff --git a/packages/addons/addon-depends/system-tools-depends/i2c-tools/patches/decode-dimms_Correctly-check-for-out-of-bounds-vendor-ID.patch b/packages/addons/addon-depends/system-tools-depends/i2c-tools/patches/decode-dimms_Correctly-check-for-out-of-bounds-vendor-ID.patch deleted file mode 100644 index 8899135587..0000000000 --- a/packages/addons/addon-depends/system-tools-depends/i2c-tools/patches/decode-dimms_Correctly-check-for-out-of-bounds-vendor-ID.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 2b4135907c1aa27edeb397e62b67386ff5d7d3d5 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -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 - diff --git a/packages/addons/addon-depends/system-tools-depends/i2c-tools/patches/i2cset_Fix-short-writes-with-mask.patch b/packages/addons/addon-depends/system-tools-depends/i2c-tools/patches/i2cset_Fix-short-writes-with-mask.patch deleted file mode 100644 index 7847858bd1..0000000000 --- a/packages/addons/addon-depends/system-tools-depends/i2c-tools/patches/i2cset_Fix-short-writes-with-mask.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 11a1738e83bbb093f22e38ad11ba9f0e73ae9248 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -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 -Reviewed-by: Wolfram Sang -Tested-by: Wolfram Sang ---- - 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 -