Skip to contentSkip to conversation

fwts: Upgrade to V18.05.00

PATCH In review Khem Raj 2 participants 6 messages Jun 1, 2018 – Jul 26, 2018

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 fwts: Upgrade to V18.05.00

drop backported patches and fix build with gcc8

---
 ...d-correct-printf-qualifier-for-off_t.patch | 21 ++++----
 ...l.h-instead-of-deprecated-sys-poll.h.patch | 12 ++---
 .../fwts/0001-Remove-Werror-from-build.patch  | 52 ++++++++++++++++++
 ...t-logical-operand-warning-with-clang.patch | 21 ++++----
 ...defined-format-for-printing-uint64_t.patch | 53 -------------------
 ...-__SWORD_TYPE-if-not-defined-by-libc.patch | 10 ++--
 .../fwts/fwts/0003-Undefine-PAGE_SIZE.patch   | 10 ++--
 ..._t-to-fix-pointer-to-int-cast-issues.patch | 52 +++++++++---------
 meta-oe/recipes-test/fwts/fwts_git.bb         |  8 +--
 9 files changed, 116 insertions(+), 123 deletions(-)
 create mode 100644 meta-oe/recipes-test/fwts/fwts/0001-Remove-Werror-from-build.patch
 delete mode 100644 meta-oe/recipes-test/fwts/fwts/0002-Add-C99-defined-format-for-printing-uint64_t.patch
meta-oe/recipes-test/fwts/fwts/0001-Add-correct-printf-qualifier-for-off_t.patch +11 -10
index 192e05f1cb..c2d679aabc 100644
@@ -1,18 +1,19 @@
-From 232daf5fca6fb52cced5e810f2601fe1a71b96d8 Mon Sep 17 00:00:00 2001
+From 613e5cfe7751068062cc92f83870e436669fc0a8 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Thu, 8 Jun 2017 16:49:50 -0700
-Subject: [PATCH 1/3] Add correct printf qualifier for off_t
+Subject: [PATCH] Add correct printf qualifier for off_t
 
 Signed-off-by: Khem Raj <[email protected]>
+
 ---
- src/bios/ebda_region/ebda_region.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ src/bios/ebda_region/ebda_region.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
 
-Index: git/src/bios/ebda_region/ebda_region.c
-===================================================================
---- git.orig/src/bios/ebda_region/ebda_region.c
-+++ git/src/bios/ebda_region/ebda_region.c
-@@ -83,9 +83,9 @@ static int ebda_test1(fwts_framework *fw
+diff --git a/src/bios/ebda_region/ebda_region.c b/src/bios/ebda_region/ebda_region.c
+index 16c39357..ad6d635c 100644
+--- a/src/bios/ebda_region/ebda_region.c
++++ b/src/bios/ebda_region/ebda_region.c
+@@ -83,9 +83,9 @@ static int ebda_test1(fwts_framework *fw)
  	if ((entry != NULL) &&
  	    (entry->type == FWTS_MEMORY_MAP_RESERVED ||
  	     entry->type == FWTS_MEMORY_MAP_ACPI)) {
@@ -24,7 +25,7 @@ Index: git/src/bios/ebda_region/ebda_region.c
  			(entry->end_address - entry->start_address) / 1024,
  			memory_map_name,
  			entry->start_address,
-@@ -93,8 +93,8 @@ static int ebda_test1(fwts_framework *fw
+@@ -93,8 +93,8 @@ static int ebda_test1(fwts_framework *fw)
  	} else
  		fwts_failed(fw, LOG_LEVEL_MEDIUM,
  			"EBDAMappedNotReserved",
meta-oe/recipes-test/fwts/fwts/0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch +5 -7
index 8ad0789361..4baefe4a4c 100644
@@ -1,18 +1,19 @@
-From 100a107a53d5dc9b0554252ac5dbf2c9330615e9 Mon Sep 17 00:00:00 2001
+From ed988c27efde5355c3ba9d0de8a14a4a40f798cc Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Tue, 6 Jun 2017 07:25:09 -0700
-Subject: [PATCH 1/3] Include poll.h instead of deprecated sys/poll.h
+Subject: [PATCH] Include poll.h instead of deprecated sys/poll.h
 
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <[email protected]>
+
 ---
  src/lib/src/fwts_ipmi.c   | 3 ++-
  src/lib/src/fwts_pipeio.c | 2 +-
  2 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/src/lib/src/fwts_ipmi.c b/src/lib/src/fwts_ipmi.c
-index cbb27611..70d11cfa 100644
+index a4c8a511..e298969e 100644
 --- a/src/lib/src/fwts_ipmi.c
 +++ b/src/lib/src/fwts_ipmi.c
 @@ -18,10 +18,11 @@
@@ -29,7 +30,7 @@ index cbb27611..70d11cfa 100644
  #include <linux/ipmi.h>
  
 diff --git a/src/lib/src/fwts_pipeio.c b/src/lib/src/fwts_pipeio.c
-index fd719640..bdc5b2ea 100644
+index 3b3cfaff..289564d1 100644
 --- a/src/lib/src/fwts_pipeio.c
 +++ b/src/lib/src/fwts_pipeio.c
 @@ -30,9 +30,9 @@
@@ -43,6 +44,3 @@ index fd719640..bdc5b2ea 100644
  #include <sys/types.h>
  #include <sys/wait.h>
  #include <errno.h>
--- 
-2.13.0
-
meta-oe/recipes-test/fwts/fwts/0001-Remove-Werror-from-build.patch new file +52 -0

52 lines not on this page · raw message

meta-oe/recipes-test/fwts/fwts/0001-ignore-constant-logical-operand-warning-with-clang.patch +11 -10
index a3cc1ff8e5..ae3665b4d0 100644
@@ -1,9 +1,10 @@
-From 953cff93c85d3cfd5cbcac56e14443dc5f6e5fbd Mon Sep 17 00:00:00 2001
+From 5bd05ad8569880985ddf6d4c06ed927d388c297f Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 19 Oct 2016 01:57:16 +0000
 Subject: [PATCH] ignore constant-logical-operand warning with clang
 
 Signed-off-by: Khem Raj <[email protected]>
+
 ---
  src/dmi/dmicheck/dmicheck.c            | 3 +++
  src/lib/src/fwts_acpi_tables.c         | 5 +++++
@@ -11,10 +12,10 @@ Signed-off-by: Khem Raj <[email protected]>
  3 files changed, 13 insertions(+)
 
 diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
-index ecd98223..7fca4a64 100644
+index 3cca9db9..60fb758f 100644
 --- a/src/dmi/dmicheck/dmicheck.c
 +++ b/src/dmi/dmicheck/dmicheck.c
-@@ -209,6 +209,8 @@ static const char *uuid_patterns[] = {
+@@ -211,6 +211,8 @@ static const char *uuid_patterns[] = {
  	"0A0A0A0A-0A0A-0A0A-0A0A-0A0A0A0A0A0A",
  	NULL,
  };
@@ -23,19 +24,19 @@ index ecd98223..7fca4a64 100644
  
  static const fwts_chassis_type_map fwts_dmi_chassis_type[] = {
  	{ "Invalid",		FWTS_SMBIOS_CHASSIS_INVALID },
-@@ -245,6 +247,7 @@ static const fwts_chassis_type_map fwts_dmi_chassis_type[] = {
- 	{ "Convertible",	FWTS_SMBIOS_CHASSIS_CONVERTIBLE },
- 	{ "Detachable",		FWTS_SMBIOS_CHASSIS_DETACHABLE },
+@@ -251,6 +253,7 @@ static const fwts_chassis_type_map fwts_dmi_chassis_type[] = {
+ 	{ "Mini PC",		FWTS_SMBIOS_CHASSIS_MINI_PC },
+ 	{ "Stick PC",		FWTS_SMBIOS_CHASSIS_STICK_PC },
  };
 +#pragma clang diagnostic pop
  
  /* Remapping table from buggy version numbers to correct values */
  static const fwts_dmi_version dmi_versions[] = {
 diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
-index 30b4060e..d5339bf7 100644
+index c7ba59be..bdd224aa 100644
 --- a/src/lib/src/fwts_acpi_tables.c
 +++ b/src/lib/src/fwts_acpi_tables.c
-@@ -394,10 +394,14 @@ static int fwts_acpi_handle_fadt(
+@@ -393,10 +393,14 @@ static int fwts_acpi_handle_fadt(
  	/* Determine FACS addr and load it.
  	 * Will ignore the missing FACS in the hardware-reduced mode.
  	 */
@@ -50,7 +51,7 @@ index 30b4060e..d5339bf7 100644
  	if (result != FWTS_OK) {
  		if ((result == FWTS_NULL_POINTER) &&
  				fwts_acpi_is_reduced_hardware(fadt)) {
-@@ -416,6 +420,7 @@ static int fwts_acpi_handle_fadt(
+@@ -415,6 +419,7 @@ static int fwts_acpi_handle_fadt(
  		return FWTS_ERROR;
  	}
  	return FWTS_OK;
@@ -59,7 +60,7 @@ index 30b4060e..d5339bf7 100644
  
  /*
 diff --git a/src/uefi/uefirtauthvar/uefirtauthvar.c b/src/uefi/uefirtauthvar/uefirtauthvar.c
-index cdfd7aa3..001e8cc8 100644
+index c2031741..7a33d19d 100644
 --- a/src/uefi/uefirtauthvar/uefirtauthvar.c
 +++ b/src/uefi/uefirtauthvar/uefirtauthvar.c
 @@ -142,6 +142,9 @@ static int uefirtauthvar_deinit(fwts_framework *fw)
meta-oe/recipes-test/fwts/fwts/0002-Add-C99-defined-format-for-printing-uint64_t.patch deleted +0 -53

53 lines not on this page · raw message

meta-oe/recipes-test/fwts/fwts/0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch +4 -6
index 3b83ca57c8..b45e46a3d9 100644
@@ -1,7 +1,7 @@
-From 0e89127cd02ecd5ea4506b935cb2b59eb94107d2 Mon Sep 17 00:00:00 2001
+From 1112e51d240a206bdcf253878ef1f4963b92da8a Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Tue, 6 Jun 2017 07:37:20 -0700
-Subject: [PATCH 2/3] Define __SWORD_TYPE if not defined by libc
+Subject: [PATCH] Define __SWORD_TYPE if not defined by libc
 
 __SWORD_TYPE is internal to glibc, therefore
 check and define it if needed e.g. on musl
@@ -9,12 +9,13 @@ check and define it if needed e.g. on musl
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <[email protected]>
+
 ---
  src/lib/src/fwts_uefi.c | 4 ++++
  1 file changed, 4 insertions(+)
 
 diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
-index 1f9d31fa..2d925f8d 100644
+index 544145fa..460b0b77 100644
 --- a/src/lib/src/fwts_uefi.c
 +++ b/src/lib/src/fwts_uefi.c
 @@ -59,6 +59,10 @@ typedef struct {
@@ -28,6 +29,3 @@ index 1f9d31fa..2d925f8d 100644
  /* File system magic numbers */
  #define PSTOREFS_MAGIC          ((__SWORD_TYPE)0x6165676C)
  #define EFIVARFS_MAGIC          ((__SWORD_TYPE)0xde5e81e4)
--- 
-2.13.0
-
meta-oe/recipes-test/fwts/fwts/0003-Undefine-PAGE_SIZE.patch +4 -6
index f84fbffd88..1d8c620efa 100644
@@ -1,7 +1,7 @@
-From 0857269d5a053b5b4c31cfa01b6501526b24035f Mon Sep 17 00:00:00 2001
+From 244e9551ab9bbc1dfa91d19cd472ef254a94ae41 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Tue, 6 Jun 2017 07:39:28 -0700
-Subject: [PATCH 3/3] Undefine PAGE_SIZE
+Subject: [PATCH] Undefine PAGE_SIZE
 
 musl defines PAGE_SIZE and build complains
 of multiple definitions
@@ -9,12 +9,13 @@ of multiple definitions
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <[email protected]>
+
 ---
  src/lib/src/fwts_acpi_tables.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
-index 1d4fc705..71023ad2 100644
+index bdd224aa..58e982a6 100644
 --- a/src/lib/src/fwts_acpi_tables.c
 +++ b/src/lib/src/fwts_acpi_tables.c
 @@ -42,6 +42,7 @@
@@ -25,6 +26,3 @@ index 1d4fc705..71023ad2 100644
  #define PAGE_SIZE	(4096)
  
  static fwts_acpi_table_info	tables[ACPI_MAX_TABLES];
--- 
-2.13.0
-
meta-oe/recipes-test/fwts/fwts/0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch +25 -27

91 lines not on this page · raw message

meta-oe/recipes-test/fwts/fwts_git.bb +4 -4
index 87a23af19f..defe31ddff 100644
@@ -5,17 +5,17 @@ HOMEPAGE = "https://wiki.ubuntu.com/Kernel/Reference/fwts"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=16;md5=31da590f3e9f3bd34dcdb9e4db568519"
 
-PV = "17.03.00+git${SRCPV}"
+PV = "18.05.00+git${SRCPV}"
 
-SRCREV = "0153ea51cb648b3067a1b327eee6a075b6cfa330"
+SRCREV = "b0ec7aa2ef743d113fd8c5e57c0ca3d5edd86f0e"
 SRC_URI = "git://kernel.ubuntu.com/hwe/fwts.git \
            file://0001-ignore-constant-logical-operand-warning-with-clang.patch \
            file://0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch \
            file://0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch \
            file://0003-Undefine-PAGE_SIZE.patch \
            file://0001-Add-correct-printf-qualifier-for-off_t.patch \
-           file://0002-Add-C99-defined-format-for-printing-uint64_t.patch \
            file://0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch \
+           file://0001-Remove-Werror-from-build.patch \
            "
 
 S = "${WORKDIR}/git"
@@ -25,7 +25,7 @@ COMPATIBLE_HOST = "(i.86|x86_64|aarch64|powerpc64).*-linux"
 DEPENDS = "libpcre json-c glib-2.0 dtc"
 DEPENDS_append_libc-musl = " libexecinfo"
 
-inherit autotools pkgconfig
+inherit autotools bash-completion pkgconfig
 
 CFLAGS += "-I${STAGING_INCDIR}/json-c -Wno-error=unknown-pragmas"
 LDFLAGS_append_libc-musl = " -lexecinfo"
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/3 lowpan-tools: Fix build with gcc-8

---
 ...tential-string-truncation-in-strncpy.patch | 139 ++++++++++++++++++
 .../lowpan-tools/lowpan-tools_git.bb          |   1 +
 2 files changed, 140 insertions(+)
 create mode 100644 meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-potential-string-truncation-in-strncpy.patch
meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Fix-potential-string-truncation-in-strncpy.patch new file +139 -0
new file mode 100644
index 0000000000..e621d8f2a8
@@ -0,0 +1,139 @@
+From 58b6d9a2efe101e5b80fd708e6f84c7ca779ce93 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 May 2018 20:27:43 -0700
+Subject: [PATCH] Fix potential string truncation in strncpy()
+
+GCC 8 complains about the string truncation during copy
+
+error: 'strncpy' specified bound 16 equals destination size
+
+Upstream-Status: Inappropriate [depricated component]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tests/listen-packet.c | 3 ++-
+ tests/listen.c        | 3 ++-
+ tests/test2.c         | 4 ++--
+ tests/test3.c         | 3 ++-
+ tests/test4.c         | 3 ++-
+ tests/test5.c         | 3 ++-
+ tests/test6.c         | 3 ++-
+ tests/test7.c         | 3 ++-
+ 8 files changed, 16 insertions(+), 9 deletions(-)
+
+diff --git a/tests/listen-packet.c b/tests/listen-packet.c
+index e40af81..eae0c71 100644
+--- a/tests/listen-packet.c
++++ b/tests/listen-packet.c
+@@ -50,7 +50,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, iface, IF_NAMESIZE);
++	strncpy(req.ifr_name, iface, IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFINDEX, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFINDEX");
+diff --git a/tests/listen.c b/tests/listen.c
+index 75c320b..5ce1ed9 100644
+--- a/tests/listen.c
++++ b/tests/listen.c
+@@ -47,7 +47,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, iface, IFNAMSIZ);
++	strncpy(req.ifr_name, iface, IFNAMSIZ - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+diff --git a/tests/test2.c b/tests/test2.c
+index 58eb74b..5d02838 100644
+--- a/tests/test2.c
++++ b/tests/test2.c
+@@ -45,8 +45,8 @@ int main(int argc, char **argv) {
+ 		perror("socket");
+ 		return 1;
+ 	}
+-
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+diff --git a/tests/test3.c b/tests/test3.c
+index fb36627..2f50a5a 100644
+--- a/tests/test3.c
++++ b/tests/test3.c
+@@ -46,7 +46,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+diff --git a/tests/test4.c b/tests/test4.c
+index 33c274c..8737149 100644
+--- a/tests/test4.c
++++ b/tests/test4.c
+@@ -46,7 +46,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+diff --git a/tests/test5.c b/tests/test5.c
+index 4439dfa..28db562 100644
+--- a/tests/test5.c
++++ b/tests/test5.c
+@@ -45,7 +45,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFADDR, &req);
+ 	if (ret < 0) {
+ 		perror("ioctl: SIOCGIFADDR");
+diff --git a/tests/test6.c b/tests/test6.c
+index e375bfb..ce7de59 100644
+--- a/tests/test6.c
++++ b/tests/test6.c
+@@ -45,7 +45,8 @@ int main(int argc, char **argv) {
+ 		return 1;
+ 	}
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFADDR, &req);
+ 	if (ret < 0) {
+ 		perror("ioctl: SIOCGIFADDR");
+diff --git a/tests/test7.c b/tests/test7.c
+index e9a5a55..37da22d 100644
+--- a/tests/test7.c
++++ b/tests/test7.c
+@@ -58,7 +58,8 @@ int main(int argc, char **argv) {
+ 	if (ret)
+ 		perror("setsockopt");
+ 
+-	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE);
++	strncpy(req.ifr_name, argv[1] ?: "wpan0", IF_NAMESIZE - 1);
++	req.ifr_name[IF_NAMESIZE - 1] = '\0';
+ 	ret = ioctl(sd, SIOCGIFHWADDR, &req);
+ 	if (ret < 0)
+ 		perror("ioctl: SIOCGIFHWADDR");
+-- 
+2.17.1
+
meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb +1 -0
index d0fe59c983..b70c43f156 100644
@@ -15,6 +15,7 @@ SRC_URI = "git://github.com/linux-wpan/lowpan-tools \
            file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \
            file://0001-Remove-newline-from-format-line.patch \
            file://0001-coordinator-Fix-strncpy-range-warning.patch \
+           file://0001-Fix-potential-string-truncation-in-strncpy.patch \
            "
 SRCREV = "1c2d8674cc6f4b1166a066e8822e295c105ae7a2"
 
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH 3/3 openocd: Upgrade to latest tip of master

In reply to Khem Raj

Fix build with new libusb and gcc8

---
 ...2-deprecated-libusb_set_debug-with-l.patch | 39 +++++++++++++++++++
 .../recipes-devtools/openocd/openocd_git.bb   |  5 ++-
 2 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch
meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +39 -0
new file mode 100644
index 0000000000..c5b9083dca
@@ -0,0 +1,39 @@
+From b95a996bfb281104b68ec66f32ebb79db519a4a8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 May 2018 21:06:46 -0700
+Subject: [PATCH] Fix libusb-1.0.22 deprecated libusb_set_debug with
+ libusb_set_option
+
+libusb_set_debug is deprecated in libusb >= 1.0.22 therefore replace
+with equivalent libusb_set_option()  API
+
+see libusb commit for more details
+
+https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted [http://openocd.zylin.com/#/c/4540/]
+ src/jtag/drivers/xds110.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/jtag/drivers/xds110.c b/src/jtag/drivers/xds110.c
+index 90b699027..9bfe02ea8 100644
+--- a/src/jtag/drivers/xds110.c
++++ b/src/jtag/drivers/xds110.c
+@@ -367,8 +367,11 @@ static bool usb_connect(void)
+ 
+ 		/* Set libusb to auto detach kernel and disable debug messages */
+ 		(void)libusb_set_auto_detach_kernel_driver(dev, 1);
++#if LIBUSB_API_VERSION >= 0x01000106
++		libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_NONE);
++#else
+ 		libusb_set_debug(ctx, LIBUSB_LOG_LEVEL_NONE);
+-
++#endif
+ 		/* Claim the debug interface on the XDS110 */
+ 		result = libusb_claim_interface(dev, INTERFACE_DEBUG);
+ 	} else {
+-- 
+2.17.1
+
meta-oe/recipes-devtools/openocd/openocd_git.bb +3 -2
index 67abeede93..84727bf970 100644
@@ -5,8 +5,9 @@ DEPENDS = "libusb-compat libftdi"
 RDEPENDS_${PN} = "libusb1"
 
 SRC_URI = "git://repo.or.cz/openocd.git \
-"
-SRCREV = "3737dd69e73816d186ba418d7b833462a8041079"
+           file://0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch \
+          "
+SRCREV = "cdf1e826eb23c29de1019ce64125f644f01b0afe"
 
 PV = "0.10+gitr${SRCPV}"
 S = "${WORKDIR}/git"
Signature · 1 line
2.17.1
#3 lore raw

Re: [meta-oe][PATCH 3/3] openocd: Upgrade to latest tip of master

It probably isn't caused by this upgrade, but openocd is using git submodules which are checked out during do_configure:

http://repo.or.cz/openocd.git/blob/refs/heads/master:/bootstrap#l37

Would it make sense to call bootstrap with nosubmodule?

It seems to be used by internal_jimtcl
http://repo.or.cz/openocd.git/blob/refs/heads/master:/configure.ac#l574
and internal_libjaylink
http://repo.or.cz/openocd.git/blob/refs/heads/master:/configure.ac#l679

I don't use openocd, I've just noticed random build failure:

Makefile.am:23: installing './texinfo.tex'
Setting up submodules
Submodule 'jimtcl' (http://repo.or.cz/r/jimtcl.git) registered for path 'jimtcl'
Submodule 'src/jtag/drivers/libjaylink' (http://repo.or.cz/r/libjaylink.git)
registered for path 'src/jtag/drivers/libjaylink'
Submodule 'tools/git2cl' (http://repo.or.cz/r/git2cl.git) registered for path 'tools/git2cl'
Cloning into 'jimtcl'...
fatal: unable to access 'http://repo.or.cz/r/jimtcl.git/': Could not resolve host: repo.or.cz
Clone of 'http://repo.or.cz/r/jimtcl.git' into submodule path 'jimtcl' failed
WARNING: exit code 1 from a shell command.

Quoted 88 lines · Khem Raj

Fix build with new libusb and gcc8

---
 ...2-deprecated-libusb_set_debug-with-l.patch | 39 +++++++++++++++++++
 .../recipes-devtools/openocd/openocd_git.bb   |  5 ++-
 2 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644

meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch

diff --git a/meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch b/meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file mode 100644
index 0000000000..c5b9083dca
--- /dev/null
+++
b/meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch

meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +12 -0
@@ -0,0 +1,39 @@
+From b95a996bfb281104b68ec66f32ebb79db519a4a8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 May 2018 21:06:46 -0700
+Subject: [PATCH] Fix libusb-1.0.22 deprecated libusb_set_debug with
+ libusb_set_option
+
+libusb_set_debug is deprecated in libusb >= 1.0.22 therefore replace
+with equivalent libusb_set_option()  API
+
+see libusb commit for more details
+
+

https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168

meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +14 -0
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted [http://openocd.zylin.com/#/c/4540/]
+ src/jtag/drivers/xds110.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/jtag/drivers/xds110.c b/src/jtag/drivers/xds110.c
+index 90b699027..9bfe02ea8 100644
+--- a/src/jtag/drivers/xds110.c
++++ b/src/jtag/drivers/xds110.c
+@@ -367,8 +367,11 @@ static bool usb_connect(void)
+
+               /* Set libusb to auto detach kernel and disable debug

messages */
+ (void)libusb_set_auto_detach_kernel_driver(dev, 1);
++#if LIBUSB_API_VERSION >= 0x01000106
++ libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL,
LIBUSB_LOG_LEVEL_NONE);
++#else

meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +9 -0
+               libusb_set_debug(ctx, LIBUSB_LOG_LEVEL_NONE);
+-
++#endif
+               /* Claim the debug interface on the XDS110 */
+               result = libusb_claim_interface(dev, INTERFACE_DEBUG);
+       } else {
+--
+2.17.1
+
meta-oe/recipes-devtools/openocd/openocd_git.bb +3 -2
index 67abeede93..84727bf970 100644
@@ -5,8 +5,9 @@ DEPENDS = "libusb-compat libftdi"
 RDEPENDS_${PN} = "libusb1"
 
 SRC_URI = "git://repo.or.cz/openocd.git \
-"
-SRCREV = "3737dd69e73816d186ba418d7b833462a8041079"
+
 file://0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch \
+          "
+SRCREV = "cdf1e826eb23c29de1019ce64125f644f01b0afe"
 
 PV = "0.10+gitr${SRCPV}"

S = "${WORKDIR}/git"
--
2.17.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

author
#4 lore raw

Re: [meta-oe][PATCH 3/3] openocd: Upgrade to latest tip of master

Quoted 6 lines · Martin Jansa

It probably isn't caused by this upgrade, but openocd is using git submodules which are checked out during do_configure:

http://repo.or.cz/openocd.git/blob/refs/heads/master:/bootstrap#l37

Would it make sense to call bootstrap with nosubmodule?

I think so, we can explicily fetch the submodiule and place it where its needed.

Quoted 98 lines

It seems to be used by internal_jimtcl
http://repo.or.cz/openocd.git/blob/refs/heads/master:/configure.ac#l574
and internal_libjaylink
http://repo.or.cz/openocd.git/blob/refs/heads/master:/configure.ac#l679

I don't use openocd, I've just noticed random build failure:

Makefile.am:23: installing './texinfo.tex'
Setting up submodules
Submodule 'jimtcl' (http://repo.or.cz/r/jimtcl.git) registered for path 'jimtcl'
Submodule 'src/jtag/drivers/libjaylink' (http://repo.or.cz/r/libjaylink.git) registered for path 'src/jtag/drivers/libjaylink' Submodule 'tools/git2cl' (http://repo.or.cz/r/git2cl.git) registered for path 'tools/git2cl'
Cloning into 'jimtcl'...
fatal: unable to access 'http://repo.or.cz/r/jimtcl.git/': Could not resolve host: repo.or.cz
Clone of 'http://repo.or.cz/r/jimtcl.git' into submodule path 'jimtcl' failed
WARNING: exit code 1 from a shell command.

Quoted 79 lines · Khem Raj

Fix build with new libusb and gcc8

---
 ...2-deprecated-libusb_set_debug-with-l.patch | 39 +++++++++++++++++++
 .../recipes-devtools/openocd/openocd_git.bb   |  5 ++-
 2 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch
meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +39 -0
new file mode 100644
index 0000000000..c5b9083dca
@@ -0,0 +1,39 @@
+From b95a996bfb281104b68ec66f32ebb79db519a4a8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 May 2018 21:06:46 -0700
+Subject: [PATCH] Fix libusb-1.0.22 deprecated libusb_set_debug with
+ libusb_set_option
+
+libusb_set_debug is deprecated in libusb >= 1.0.22 therefore replace
+with equivalent libusb_set_option()  API
+
+see libusb commit for more details
+
+https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted [http://openocd.zylin.com/#/c/4540/]
+ src/jtag/drivers/xds110.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/jtag/drivers/xds110.c b/src/jtag/drivers/xds110.c
+index 90b699027..9bfe02ea8 100644
+--- a/src/jtag/drivers/xds110.c
++++ b/src/jtag/drivers/xds110.c
+@@ -367,8 +367,11 @@ static bool usb_connect(void)
+
+               /* Set libusb to auto detach kernel and disable debug messages */
+               (void)libusb_set_auto_detach_kernel_driver(dev, 1);
++#if LIBUSB_API_VERSION >= 0x01000106
++              libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_NONE);
++#else
+               libusb_set_debug(ctx, LIBUSB_LOG_LEVEL_NONE);
+-
++#endif
+               /* Claim the debug interface on the XDS110 */
+               result = libusb_claim_interface(dev, INTERFACE_DEBUG);
+       } else {
+--
+2.17.1
+
meta-oe/recipes-devtools/openocd/openocd_git.bb +3 -3
index 67abeede93..84727bf970 100644
@@ -5,8 +5,9 @@ DEPENDS = "libusb-compat libftdi"
 RDEPENDS_${PN} = "libusb1"
 
 SRC_URI = "git://repo.or.cz/openocd.git \
-"
-SRCREV = "3737dd69e73816d186ba418d7b833462a8041079"
+           file://0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch \
+          "
+SRCREV = "cdf1e826eb23c29de1019ce64125f644f01b0afe"
 
 PV = "0.10+gitr${SRCPV}"
 S = "${WORKDIR}/git"
--

2.17.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#5 lore raw

Re: [meta-oe][PATCH 3/3] openocd: Upgrade to latest tip of master

I'm testing the change which just disables them, I'll send it after few more builds with it. I'll leave enabling them to someone actually using openocd.

Quoted 127 lines · Khem Raj
Quoted 2 lines · Martin Jansa

It probably isn't caused by this upgrade, but openocd is using git

submodules which are checked out during do_configure:

Quoted 4 lines

http://repo.or.cz/openocd.git/blob/refs/heads/master:/bootstrap#l37

Would it make sense to call bootstrap with nosubmodule?

I think so, we can explicily fetch the submodiule and place it where its needed.

Quoted 11 lines

It seems to be used by internal_jimtcl
http://repo.or.cz/openocd.git/blob/refs/heads/master:/configure.ac#l574
and internal_libjaylink
http://repo.or.cz/openocd.git/blob/refs/heads/master:/configure.ac#l679

I don't use openocd, I've just noticed random build failure:

Makefile.am:23: installing './texinfo.tex'
Setting up submodules
Submodule 'jimtcl' (http://repo.or.cz/r/jimtcl.git) registered for path

'jimtcl'

Quoted 1 line

Submodule 'src/jtag/drivers/libjaylink' (

http://repo.or.cz/r/libjaylink.git) registered for path 'src/jtag/drivers/libjaylink'

Quoted 1 line

Submodule 'tools/git2cl' (http://repo.or.cz/r/git2cl.git) registered

for path 'tools/git2cl'

Quoted 2 lines

Cloning into 'jimtcl'...
fatal: unable to access 'http://repo.or.cz/r/jimtcl.git/': Could not

resolve host: repo.or.cz

Quoted 1 line

Clone of 'http://repo.or.cz/r/jimtcl.git' into submodule path 'jimtcl'

failed

Quoted 12 lines

WARNING: exit code 1 from a shell command.

Quoted 9 lines · Khem Raj

Fix build with new libusb and gcc8

---
 ...2-deprecated-libusb_set_debug-with-l.patch | 39 +++++++++++++++++++
 .../recipes-devtools/openocd/openocd_git.bb   |  5 ++-
 2 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644

meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch

Quoted 2 lines
Quoted 2 lines

diff --git

a/meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch b/meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch

Quoted 4 lines
Quoted 4 lines

new file mode 100644
index 0000000000..c5b9083dca
--- /dev/null
+++

b/meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch

Quoted 5 lines
Quoted 5 lines
meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +4 -0
@@ -0,0 +1,39 @@
+From b95a996bfb281104b68ec66f32ebb79db519a4a8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 31 May 2018 21:06:46 -0700
+Subject: [PATCH] Fix libusb-1.0.22 deprecated libusb_set_debug with
Quoted 8 lines

meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch line 13

Quoted 8 lines
meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +8 -0
+ libusb_set_option
+
+libusb_set_debug is deprecated in libusb >= 1.0.22 therefore replace
+with equivalent libusb_set_option()  API
+
+see libusb commit for more details
+
+

https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168

Quoted 6 lines
Quoted 6 lines
meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +6 -0
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted [http://openocd.zylin.com/#/c/4540/]
+ src/jtag/drivers/xds110.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
Quoted 8 lines

meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch

Quoted 8 lines
meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +8 -0
+
+diff --git a/src/jtag/drivers/xds110.c b/src/jtag/drivers/xds110.c
+index 90b699027..9bfe02ea8 100644
+--- a/src/jtag/drivers/xds110.c
++++ b/src/jtag/drivers/xds110.c
+@@ -367,8 +367,11 @@ static bool usb_connect(void)
+
+               /* Set libusb to auto detach kernel and disable debug

messages */

Quoted 3 lines

meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch

Quoted 3 lines
meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +3 -0
+               (void)libusb_set_auto_detach_kernel_driver(dev, 1);
++#if LIBUSB_API_VERSION >= 0x01000106
++              libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL,

LIBUSB_LOG_LEVEL_NONE);

Quoted 11 lines

Review

Quoted 11 lines
meta-oe/recipes-devtools/openocd/openocd/0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch new file +10 -0
++#else
+               libusb_set_debug(ctx, LIBUSB_LOG_LEVEL_NONE);
+-
++#endif
+               /* Claim the debug interface on the XDS110 */
+               result = libusb_claim_interface(dev, INTERFACE_DEBUG);
+       } else {
+--
+2.17.1
+
(quoted diff) +0 -0

b/meta-oe/recipes-devtools/openocd/openocd_git.bb

Quoted 10 lines

meta-oe/recipes-devtools/openocd/openocd_git.bb DEPENDS = "libusb-compat libftdi" · line 8

Quoted 10 lines

index 67abeede93..84727bf970 100644

meta-oe/recipes-devtools/openocd/openocd_git.bb +1 -2
@@ -5,8 +5,9 @@ DEPENDS = "libusb-compat libftdi"
 RDEPENDS_${PN} = "libusb1"
 
 SRC_URI = "git://repo.or.cz/openocd.git \
-"
-SRCREV = "3737dd69e73816d186ba418d7b833462a8041079"
+

file://0001-Fix-libusb-1.0.22-deprecated-libusb_set_debug-with-l.patch \

Quoted 13 lines
Quoted 13 lines
meta-oe/recipes-devtools/openocd/openocd_git.bb +2 -1
+          "
+SRCREV = "cdf1e826eb23c29de1019ce64125f644f01b0afe"
 
 PV = "0.10+gitr${SRCPV}"
 S = "${WORKDIR}/git"
--

2.17.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel