[Buildroot] [PATCH 1/1] package/openocd: bump to 0.12.0

Dario Binacchi dario.binacchi at amarulasolutions.com
Sat Apr 8 13:51:50 UTC 2023


As reported by [1], version 0.12.0 fixes these errors:

Error executing event examine-end on target stm32f7x.cpu:
buildroot/output/host/bin/../share/openocd/scripts/mem_helper.tcl:37: Error: wrong # args: should be "expr expression"
in procedure 'mmw' called at file "buildroot/output/host/bin/../share/openocd/scripts/target/stm32f7x.cfg", line 103
at file "buildroot/output/host/bin/../share/openocd/scripts/mem_helper.tcl", line 37
Info : starting gdb server for stm32f7x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Error executing event examine-end on target stm32f7x.cpu:
buildroot/output/host/bin/../share/openocd/scripts/mem_helper.tcl:37: Error: wrong # args: should be "expr expression"
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 288
in procedure 'mmw' called at file "buildroot/output/host/bin/../share/openocd/scripts/target/stm32f7x.cfg", line 103
at file "buildroot/output/host/bin/../share/openocd/scripts/mem_helper.tcl", line 37
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080003fc msp: 0x20050000
Error executing event reset-init on target stm32f7x.cpu:
buildroot/output/host/bin/../share/openocd/scripts/mem_helper.tcl:37: Error: wrong # args: should be "expr expression"
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 288
in procedure 'mmw' called at file "buildroot/output/host/bin/../share/openocd/scripts/board/stm32f769i-disco.cfg", line 71
at file "buildroot/output/host/bin/../share/openocd/scripts/mem_helper.tcl", line 37

Remove upstream patches.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014849
Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
---
 ...ac-fix-autoreconf-with-autoconf-2.70.patch | 32 -------
 ...GV-with-libusb-v1.0.24-33-g32a2206-1.patch | 89 -------------------
 package/openocd/openocd.hash                  |  4 +-
 package/openocd/openocd.mk                    |  2 +-
 4 files changed, 3 insertions(+), 124 deletions(-)
 delete mode 100644 package/openocd/0002-configure.ac-fix-autoreconf-with-autoconf-2.70.patch
 delete mode 100644 package/openocd/0003-stlink-fix-SIGSEGV-with-libusb-v1.0.24-33-g32a2206-1.patch

diff --git a/package/openocd/0002-configure.ac-fix-autoreconf-with-autoconf-2.70.patch b/package/openocd/0002-configure.ac-fix-autoreconf-with-autoconf-2.70.patch
deleted file mode 100644
index ecb716b6fa0f..000000000000
--- a/package/openocd/0002-configure.ac-fix-autoreconf-with-autoconf-2.70.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 3106d16bbc45de52bc0a8b638a84aa9d7c9abc46 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
-Date: Wed, 6 Oct 2021 17:43:16 +0200
-Subject: [PATCH] configure.ac: fix autoreconf with autoconf >= 2.70
-
-Fix the following build failure raised with openocd and autoconf >= 2.70
-due to
-http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=aba75f6d4a9c875a9d5d90a07c6b3678db66a4bf:
-
->>> openocd 0.11.0 Autoreconfiguring
-autoreconf: error: configure.ac: AC_INIT not found; not an autoconf script?
-
-Fixes:
- - http://autobuild.buildroot.org/results/5fb7aa28703aff61ba850eac11bd35c8804528ae
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
-[Upstream status: https://github.com/msteveb/jimtcl/pull/209]
----
- configure.ac | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/jimtcl/configure.ac b/jimtcl/configure.ac
-index b70b5d8..8c45114 100644
---- a/jimtcl/configure.ac
-+++ b/jimtcl/configure.ac
-@@ -1 +1,3 @@
- # Dummy configure.ac to make automake happy
-+AC_INIT([jimtcl], [0.80])
-+AC_OUTPUT
--- 
-2.33.0
-
diff --git a/package/openocd/0003-stlink-fix-SIGSEGV-with-libusb-v1.0.24-33-g32a2206-1.patch b/package/openocd/0003-stlink-fix-SIGSEGV-with-libusb-v1.0.24-33-g32a2206-1.patch
deleted file mode 100644
index 776816892b30..000000000000
--- a/package/openocd/0003-stlink-fix-SIGSEGV-with-libusb-v1.0.24-33-g32a2206-1.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From cff0e417da58adef1ceef9a63a99412c2cc87ff3 Mon Sep 17 00:00:00 2001
-From: Antonio Borneo <borneo.antonio at gmail.com>
-Date: Wed, 23 Jun 2021 16:52:16 +0200
-Subject: [PATCH] stlink: fix SIGSEGV with libusb v1.0.24-33-g32a2206 (11618)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The stlink driver incorrectly uses a NULL pointer for libusb's
-struct libusb_context.
-The correct value to be used is local in libusb_helper.c.
-
-Move in the helper file, in a wrapper function, the only call that
-requires the above value, and let stlink driver to use this
-wrapper.
-
-This issue has not triggered any visible problem until a code
-refactoring [1] in libusb has made OpenOCD crashing on Windows and
-on MacOS.
-
-Change-Id: Id1818c8af7cf0d4d17dfa1d22aad079da01ef740
-Signed-off-by: Antonio Borneo <borneo.antonio at gmail.com>
-Fixes: https://sourceforge.net/p/openocd/tickets/308/
-Fixes: https://github.com/libusb/libusb/issues/928/
-Fixes: 42d8fa899c6a ("stlink_usb: Submit multiple USB URBs at once to improve performance")
-Link: [1] https://github.com/libusb/libusb/commit/32a22069428c
-Reported-by: Andrzej Sierżęga <asier70 at gmail.com>
-Co-developed-by: Andrzej Sierżęga <asier70 at gmail.com>
-Co-developed-by: Xiaofan Chen <xiaofanc at gmail.com>
-Reviewed-on: http://openocd.zylin.com/6331
-Tested-by: jenkins
-Reviewed-by: Marc Schink <dev at zapb.de>
-Reviewed-by: Xiaofan <xiaofanc at gmail.com>
-Reviewed-by: Andrzej Sierżęga <asier70 at gmail.com>
-Reviewed-by: Oleksij Rempel <linux at rempel-privat.de>
-Reviewed-by: Andreas Fritiofson <andreas.fritiofson at gmail.com>
-Signed-off-by: Yannick Brosseau <yannick.brosseau at gmail.com>
----
- src/jtag/drivers/libusb_helper.c | 5 +++++
- src/jtag/drivers/libusb_helper.h | 1 +
- src/jtag/drivers/stlink_usb.c    | 7 +------
- 3 files changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/src/jtag/drivers/libusb_helper.c b/src/jtag/drivers/libusb_helper.c
-index f0122d534..18fe4bad4 100644
---- a/src/jtag/drivers/libusb_helper.c
-+++ b/src/jtag/drivers/libusb_helper.c
-@@ -363,3 +363,8 @@ int jtag_libusb_get_pid(struct libusb_device *dev, uint16_t *pid)
- 
- 	return ERROR_FAIL;
- }
-+
-+int jtag_libusb_handle_events_completed(int *completed)
-+{
-+	return libusb_handle_events_completed(jtag_libusb_context, completed);
-+}
-diff --git a/src/jtag/drivers/libusb_helper.h b/src/jtag/drivers/libusb_helper.h
-index fa7d06e28..3e77865d6 100644
---- a/src/jtag/drivers/libusb_helper.h
-+++ b/src/jtag/drivers/libusb_helper.h
-@@ -60,5 +60,6 @@ int jtag_libusb_choose_interface(struct libusb_device_handle *devh,
- 		unsigned int *usb_write_ep,
- 		int bclass, int subclass, int protocol, int trans_type);
- int jtag_libusb_get_pid(struct libusb_device *dev, uint16_t *pid);
-+int jtag_libusb_handle_events_completed(int *completed);
- 
- #endif /* OPENOCD_JTAG_DRIVERS_LIBUSB_HELPER_H */
-diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c
-index c68bbb3ca..7b1932b9f 100644
---- a/src/jtag/drivers/stlink_usb.c
-+++ b/src/jtag/drivers/stlink_usb.c
-@@ -497,13 +497,8 @@ static void sync_transfer_wait_for_completion(struct libusb_transfer *transfer)
- {
- 	int r, *completed = transfer->user_data;
- 
--	/* Assuming a single libusb context exists.  There no existing interface into this
--	 * module to pass a libusb context.
--	 */
--	struct libusb_context *ctx = NULL;
--
- 	while (!*completed) {
--		r = libusb_handle_events_completed(ctx, completed);
-+		r = jtag_libusb_handle_events_completed(completed);
- 		if (r < 0) {
- 			if (r == LIBUSB_ERROR_INTERRUPTED)
- 				continue;
--- 
-2.35.1
-
diff --git a/package/openocd/openocd.hash b/package/openocd/openocd.hash
index 91eb56d930ea..b605eb7aa463 100644
--- a/package/openocd/openocd.hash
+++ b/package/openocd/openocd.hash
@@ -1,3 +1,3 @@
 # From http://sourceforge.net/projects/openocd/files/openocd/0.11.0/
-sha256  43a3ce734aff1d3706ad87793a9f3a5371cb0e357f0ffd0a151656b06b3d1e7d  openocd-0.11.0.tar.bz2
-sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
+sha256  af254788be98861f2bd9103fe6e60a774ec96a8c374744eef9197f6043075afa  openocd-0.12.0.tar.bz2
+sha256  1b8f7e37ee5afbbf95c2a4d62b12b25232e29538692663b434318503a9a88419  COPYING
diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk
index 37a06ca848b7..95a7fd3c2a2c 100644
--- a/package/openocd/openocd.mk
+++ b/package/openocd/openocd.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-OPENOCD_VERSION = 0.11.0
+OPENOCD_VERSION = 0.12.0
 OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2
 OPENOCD_SITE = http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)
 OPENOCD_LICENSE = GPL-2.0+
-- 
2.32.0




More information about the buildroot mailing list