diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-05-13 19:14:20 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-05-15 07:39:20 +0200 |
commit | cb6e98ba44c9cc8406f4d312d5cb7cf463e339d7 (patch) | |
tree | 3413a684c87b0e7fe380cd0a761bc9989dec19ad /utils | |
parent | ddaf94229ca56afab6772ac56b7d5686d9882826 (diff) |
flashrom: update to v1.0
Update to flashrom version 1.0 and cherry-pick an upstream fix for deprecated
libusb api usage.
Fixes the following error spotted by the buildbots:
ch341a_spi.c: In function 'ch341a_spi_init':
ch341a_spi.c:447:2: error: 'libusb_set_debug' is deprecated: [...]
libusb_set_debug(NULL, 3); // Enable information, warning and [...]
^~~~~~~~~~~~~~~~
In file included from ch341a_spi.c:25:0:
.../libusb-1.0/libusb.h:1300:18: note: declared here
void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:1030: recipe for target 'ch341a_spi.o' failed
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/flashrom/Makefile | 4 | ||||
-rw-r--r-- | utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch | 40 |
2 files changed, 42 insertions, 2 deletions
diff --git a/utils/flashrom/Makefile b/utils/flashrom/Makefile index df0561a2a..e2152b65b 100644 --- a/utils/flashrom/Makefile +++ b/utils/flashrom/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=flashrom -PKG_VERSION:=0.9.9.1 +PKG_VERSION:=1.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://download.flashrom.org/releases PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_HASH:=0e145a5b9b18c98752acf0f8329a9a260ddf030abf687416daab9f05a0f508d0 +PKG_HASH:=3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com> PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR) diff --git a/utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch b/utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch new file mode 100644 index 000000000..7a9be3b2a --- /dev/null +++ b/utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch @@ -0,0 +1,40 @@ +From 291764a70e6d8b212680e311bfb0825abf2b9a2f Mon Sep 17 00:00:00 2001 +From: Alex James <theracermaster@gmail.com> +Date: Sat, 14 Apr 2018 22:59:57 -0500 +Subject: ch341a_spi: Avoid deprecated libusb functions + +libusb 1.0.22 marked libusb_set_debug as deprecated. For such versions +of libusb, use libusb_set_option instead. + +Change-Id: Ib71ebe812316eaf49136979a942a946ef9e4d487 +Signed-off-by: Alex James <theracermaster@gmail.com> +Reviewed-on: https://review.coreboot.org/25681 +Tested-by: Nico Huber <nico.h@gmx.de> +Reviewed-by: David Hendricks <david.hendricks@gmail.com> +--- + ch341a_spi.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +(limited to 'ch341a_spi.c') + +diff --git a/ch341a_spi.c b/ch341a_spi.c +index 95e9c95..ee18624 100644 +--- a/ch341a_spi.c ++++ b/ch341a_spi.c +@@ -441,7 +441,12 @@ int ch341a_spi_init(void) + return -1; + } + +- libusb_set_debug(NULL, 3); // Enable information, warning and error messages (only). ++ /* Enable information, warning, and error messages (only). */ ++#if LIBUSB_API_VERSION < 0x01000106 ++ libusb_set_debug(NULL, 3); ++#else ++ libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO); ++#endif + + uint16_t vid = devs_ch341a_spi[0].vendor_id; + uint16_t pid = devs_ch341a_spi[0].device_id; +-- +cgit v1.1 + |