summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Pretzsch <apr@cn-eng.de>2014-10-07 01:18:18 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-11-17 09:45:10 +0100
commit71db7033cd0b11fb4e4c0a6fc9870cc8f22b5096 (patch)
treeb71cb92e2d479e61cf6fc52181258f8320d5a4f8
parent78ff5cf32f526cb9a2fb61805e84ba75bdd0c7fe (diff)
downloadptxdist-71db7033cd0b11fb4e4c0a6fc9870cc8f22b5096.tar.gz
ptxdist-71db7033cd0b11fb4e4c0a6fc9870cc8f22b5096.tar.xz
openocd: new package for openocd-0.8.0
Signed-off-by: Andreas Pretzsch <apr@cn-eng.de> [mol: cleanup] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/openocd-0.8.0/0001-configure.ac-correct-test-for-USB_BLASTER_DRIVER-AM-.patch33
l---------patches/openocd-0.8.0/autogen.sh1
-rw-r--r--patches/openocd-0.8.0/series1
-rw-r--r--rules/openocd.in219
-rw-r--r--rules/openocd.make91
5 files changed, 345 insertions, 0 deletions
diff --git a/patches/openocd-0.8.0/0001-configure.ac-correct-test-for-USB_BLASTER_DRIVER-AM-.patch b/patches/openocd-0.8.0/0001-configure.ac-correct-test-for-USB_BLASTER_DRIVER-AM-.patch
new file mode 100644
index 000000000..a7c65b740
--- /dev/null
+++ b/patches/openocd-0.8.0/0001-configure.ac-correct-test-for-USB_BLASTER_DRIVER-AM-.patch
@@ -0,0 +1,33 @@
+From 930e41a2921b8c2905690153514099c8abf05828 Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Sat, 31 May 2014 08:19:51 +0400
+Subject: [PATCH] configure.ac: correct test for USB_BLASTER_DRIVER AM symbol
+
+Blaster II should depend on the corresponding symbol, not on libusb-1
+presence.
+
+Change-Id: I3d27a1005a78fe81042cb7b515618604612c3ece
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+Reviewed-on: http://openocd.zylin.com/2159
+Tested-by: jenkins
+Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1b4870e..9943beb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1174,7 +1174,7 @@ AM_CONDITIONAL([FT2232_DRIVER], [test $build_ft2232_ftd2xx = yes -o $build_ft223
+ AM_CONDITIONAL([USB_BLASTER_LIBFTDI], [test $build_usb_blaster_libftdi = yes])
+ AM_CONDITIONAL([USB_BLASTER_FTD2XX], [test $build_usb_blaster_ftd2xx = yes])
+ AM_CONDITIONAL([JTAG_VPI], [test $build_jtag_vpi = yes -o $build_jtag_vpi = yes])
+-AM_CONDITIONAL([USB_BLASTER_DRIVER], [test $build_usb_blaster_ftd2xx = yes -o $build_usb_blaster_libftdi = yes -o $use_libusb1 = yes])
++AM_CONDITIONAL([USB_BLASTER_DRIVER], [test $build_usb_blaster_ftd2xx = yes -o $build_usb_blaster_libftdi = yes -o $enable_usb_blaster_2 != no])
+ AM_CONDITIONAL([AMTJTAGACCEL], [test $build_amtjtagaccel = yes])
+ AM_CONDITIONAL([GW16012], [test $build_gw16012 = yes])
+ AM_CONDITIONAL([PRESTO_LIBFTDI], [test $build_presto_libftdi = yes])
+--
+2.1.0
+
diff --git a/patches/openocd-0.8.0/autogen.sh b/patches/openocd-0.8.0/autogen.sh
new file mode 120000
index 000000000..9f8a4cb7d
--- /dev/null
+++ b/patches/openocd-0.8.0/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh \ No newline at end of file
diff --git a/patches/openocd-0.8.0/series b/patches/openocd-0.8.0/series
new file mode 100644
index 000000000..23230ef4b
--- /dev/null
+++ b/patches/openocd-0.8.0/series
@@ -0,0 +1 @@
+0001-configure.ac-correct-test-for-USB_BLASTER_DRIVER-AM-.patch
diff --git a/rules/openocd.in b/rules/openocd.in
new file mode 100644
index 000000000..d8fc4004d
--- /dev/null
+++ b/rules/openocd.in
@@ -0,0 +1,219 @@
+## SECTION=debug_tools
+
+menuconfig OPENOCD
+ tristate
+ prompt "OpenOCD "
+
+ # libusb-1.x
+ select LIBUSB if OPENOCD_FTDI || OPENOCD_STLINK || OPENOCD_TI_ICDI || OPENOCD_ULINK || OPENOCD_USB_BLASTER_2
+ # libusb-1.x or libusb-0.1
+ select LIBUSB if OPENOCD_JLINK || OPENOCD_OSBDM || OPENOCD_OPENDOUS || OPENOCD_AICE
+ # libusb-0.1
+ select LIBUSB_COMPAT if OPENOCD_VSLLINK || OPENOCD_USBPROG || OPENOCD_RLINK || OPENOCD_ARMJTAGEW
+ select LIBFTDI1 if OPENOCD_USB_BLASTER_LIBFTDI || OPENOCD_PRESTO_LIBFTDI || OPENOCD_OPENJTAG_FTDI
+
+ help
+ The Open On-Chip Debugger (OpenOCD) provides debugging, in-system
+ programming and boundary-scan testing for embedded target devices.
+ It supports JTAG and SWD (direct or via dongle) to access targets.
+ Flash writing is supported for various internal and external types.
+ It is controlled with TCL scripts and can act as gdbserver.
+
+if OPENOCD
+
+# ===== scripts directory =====
+
+config OPENOCD_SCRIPTDIR
+ string
+ default "/usr/share/openocd/scripts/"
+ prompt "OpenOCD script tree"
+ help
+ OpenOCD relies on TCL scripts for core and SoC specific configs and
+ setups, interface (debug adapter) specific configs, RAM and flash
+ layout definitions, board init routines, helper routines, and so on.
+
+ Keeping the default option of "/usr/share/openocd/scripts/" will
+ install all of them (several 100kB) to the target, which is probably
+ not what you want, as they are heavily target dependent.
+
+ To install only a few required ones, create a tree in projectroot
+ named like the tree configured, so only these will be installed.
+
+ Clear this config option to omit script installation at all.
+
+
+# ===== interface drivers =====
+
+config OPENOCD_DUMMY
+ bool
+ prompt "dummy port driver"
+
+# --- libusb-1.x based
+
+config OPENOCD_FTDI
+ bool
+ prompt "MPSSE mode of FTDI based devices"
+
+config OPENOCD_STLINK
+ bool
+ prompt "ST-Link JTAG Programmer"
+
+config OPENOCD_TI_ICDI
+ bool
+ prompt "TI ICDI JTAG Programmer"
+
+config OPENOCD_ULINK
+ bool
+ prompt "Keil ULINK JTAG Programmer"
+
+config OPENOCD_USB_BLASTER_2
+ bool
+ prompt "Altera USB-Blaster II Compatible"
+
+# --- libusb-1.x or libusb-0.1 based
+
+config OPENOCD_JLINK
+ bool
+ prompt "Segger J-Link JTAG Programmer"
+
+config OPENOCD_OSBDM
+ bool
+ prompt "OSBDM (JTAG only) Programmer"
+
+config OPENOCD_OPENDOUS
+ bool
+ prompt "eStick/opendous JTAG Programmer"
+
+config OPENOCD_AICE
+ bool
+ prompt "Andes JTAG Programmer"
+
+# --- libusb-0.1 based
+
+config OPENOCD_VSLLINK
+ bool
+ prompt "Versaloon-Link JTAG Programmer"
+
+config OPENOCD_USBPROG
+ bool
+ prompt "USBProg JTAG Programmer"
+
+config OPENOCD_RLINK
+ bool
+ prompt "Raisonance RLink JTAG Programmer"
+
+config OPENOCD_ARMJTAGEW
+ bool
+ prompt "Olimex ARM-JTAG-EW Programmer"
+
+# --- hidapi based
+config OPENOCD_CMSIS_DAP
+ bool
+ # needs libhidapi
+ depends on BROKEN
+ prompt "CMSIS-DAP Compliant Debugger"
+
+# --- various
+
+config OPENOCD_PARPORT
+ bool
+ prompt "pc parallel port driver"
+
+if OPENOCD_PARPORT
+ config OPENOCD_PARPORT_DISABLE_PARPORT_PPDEV
+ bool
+ prompt "Disable use of ppdev (/dev/parportN) (x86 only)"
+
+ config OPENOCD_PARPORT_GIVEIO
+ bool
+ depends on OPENOCD_PARPORT
+ prompt "Enable use of giveio (CygWin only)"
+endif
+
+config OPENOCD_JTAG_VPI
+ bool
+ prompt "JTAG VPI"
+
+config OPENOCD_USB_BLASTER_LIBFTDI
+ bool
+ prompt "Altera USB-Blaster (libftdi driver, opensource)"
+
+config OPENOCD_USB_BLASTER_FTD2XX
+ bool
+ # needs ftd2xx
+ depends on BROKEN
+ prompt "Altera USB-Blaster (FTD2XX driver from ftdichip.com)"
+
+config OPENOCD_AMTJTAGACCEL
+ bool
+ prompt "Amontec JTAG-Accelerator driver"
+
+config OPENOCD_ZY1000
+ bool
+ # fails to build and disables all other drivers
+ depends on BROKEN
+ prompt "ZY1000 interface"
+
+if OPENOCD_ZY1000
+ config OPENOCD_ZY1000_MASTER
+ bool
+ prompt "Use ZY1000 JTAG master registers"
+endif
+
+config OPENOCD_IOUTIL
+ bool
+ prompt "ioutil functions - for standalone OpenOCD implementations"
+
+config OPENOCD_EP93XX
+ bool
+ prompt "EP93xx based SBCs"
+
+config OPENOCD_AT91RM9200
+ bool
+ prompt "AT91RM9200 based SBCs"
+
+config OPENOCD_BCM2835GPIO
+ bool
+ prompt "bitbanging on BCM2835 (as found in Raspberry Pi)"
+
+config OPENOCD_GW16012
+ bool
+ prompt "Gateworks GW16012 JTAG Programmer"
+
+config OPENOCD_PRESTO_LIBFTDI
+ bool
+ prompt "ASIX Presto Programmer using the libftdi driver"
+
+config OPENOCD_PRESTO_FTD2XX
+ # needs ftd2xx
+ depends on BROKEN
+ bool
+ prompt "ASIX Presto Programmer using the FTD2XX driver"
+
+config OPENOCD_OPENJTAG_FTD2XX
+ # needs ftd2xx
+ depends on BROKEN
+ bool
+ prompt "OpenJTAG Programmer with ftd2xx driver"
+
+config OPENOCD_OPENJTAG_FTDI
+ bool
+ prompt "OpenJTAG Programmer with ftdi driver"
+
+config OPENOCD_OOCD_TRACE
+ bool
+ prompt "prototype OpenOCD+trace ETM capture hardware"
+
+config OPENOCD_BUSPIRATE
+ bool
+ prompt "Buspirate"
+
+config OPENOCD_SYSFSGPIO
+ bool
+ prompt "programming driven via sysfs gpios"
+
+config OPENOCD_REMOTE_BITBANG
+ bool
+ prompt "Remote Bitbang jtag driver"
+
+endif
diff --git a/rules/openocd.make b/rules/openocd.make
new file mode 100644
index 000000000..7282fb2f7
--- /dev/null
+++ b/rules/openocd.make
@@ -0,0 +1,91 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Andreas Pretzsch <apr@cn-eng.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+PACKAGES-$(PTXCONF_OPENOCD) += openocd
+
+OPENOCD_VERSION := 0.8.0
+OPENOCD_MD5 := 6d83c34763a5f1d1ac7ad83c5a11f4fb
+OPENOCD := openocd-$(OPENOCD_VERSION)
+OPENOCD_SUFFIX := tar.bz2
+OPENOCD_URL := $(call ptx/mirror, SF, openocd/$(OPENOCD).$(OPENOCD_SUFFIX))
+OPENOCD_SOURCE := $(SRCDIR)/$(OPENOCD).$(OPENOCD_SUFFIX)
+OPENOCD_DIR := $(BUILDDIR)/$(OPENOCD)
+# License: OpenOCD: GPLv2+, jimtcl: BSD
+OPENOCD_LICENSE := LGPLv2+, BSD
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+OPENOCD_CONF_TOOL := autoconf
+OPENOCD_CONF_OPT := $(CROSS_AUTOCONF_USR) \
+ --$(call ptx/endis, PTXCONF_OPENOCD_DUMMY)-dummy \
+ --$(call ptx/endis, PTXCONF_OPENOCD_FTDI)-ftdi \
+ --$(call ptx/endis, PTXCONF_OPENOCD_STLINK)-stlink \
+ --$(call ptx/endis, PTXCONF_OPENOCD_TI_ICDI)-ti-icdi \
+ --$(call ptx/endis, PTXCONF_OPENOCD_ULINK)-ulink \
+ --$(call ptx/endis, PTXCONF_OPENOCD_USB_BLASTER_2)-usb-blaster-2 \
+ --$(call ptx/endis, PTXCONF_OPENOCD_JLINK)-jlink \
+ --$(call ptx/endis, PTXCONF_OPENOCD_OSBDM)-osbdm \
+ --$(call ptx/endis, PTXCONF_OPENOCD_OPENDOUS)-opendous \
+ --$(call ptx/endis, PTXCONF_OPENOCD_AICE)-aice \
+ --$(call ptx/endis, PTXCONF_OPENOCD_VSLLINK)-vsllink \
+ --$(call ptx/endis, PTXCONF_OPENOCD_USBPROG)-usbprog \
+ --$(call ptx/endis, PTXCONF_OPENOCD_RLINK)-rlink \
+ --$(call ptx/endis, PTXCONF_OPENOCD_ARMJTAGEW)-armjtagew \
+ --$(call ptx/endis, PTXCONF_OPENOCD_CMSIS_DAP)-cmsis-dap \
+ --$(call ptx/endis, PTXCONF_OPENOCD_PARPORT)-parport \
+ --$(call ptx/disen, PTXCONF_OPENOCD_PARPORT_DISABLE_PARPORT_PPDEV)-parport-ppdev \
+ --$(call ptx/endis, PTXCONF_OPENOCD_PARPORT_GIVEIO)-parport-giveio \
+ --$(call ptx/endis, PTXCONF_OPENOCD_JTAG_VPI)-jtag_vpi \
+ --$(call ptx/endis, PTXCONF_OPENOCD_USB_BLASTER_LIBFTDI)-usb_blaster_libftdi \
+ --$(call ptx/endis, PTXCONF_OPENOCD_USB_BLASTER_FTD2XX)-usb_blaster_ftd2xx \
+ --$(call ptx/endis, PTXCONF_OPENOCD_AMTJTAGACCEL)-amtjtagaccel \
+ --$(call ptx/endis, PTXCONF_OPENOCD_ZY1000)-zy1000 \
+ --$(call ptx/endis, PTXCONF_OPENOCD_ZY1000_MASTER)-zy1000-master \
+ --$(call ptx/endis, PTXCONF_OPENOCD_IOUTIL)-ioutil \
+ --$(call ptx/endis, PTXCONF_OPENOCD_EP93XX)-ep93xx \
+ --$(call ptx/endis, PTXCONF_OPENOCD_AT91RM9200)-at91rm9200 \
+ --$(call ptx/endis, PTXCONF_OPENOCD_BCM2835GPIO)-bcm2835gpio \
+ --$(call ptx/endis, PTXCONF_OPENOCD_GW16012)-gw16012 \
+ --$(call ptx/endis, PTXCONF_OPENOCD_PRESTO_LIBFTDI)-presto_libftdi \
+ --$(call ptx/endis, PTXCONF_OPENOCD_PRESTO_FTD2XX)-presto_ftd2xx \
+ --$(call ptx/endis, PTXCONF_OPENOCD_OPENJTAG_FTD2XX)-openjtag_ftd2xx \
+ --$(call ptx/endis, PTXCONF_OPENOCD_OPENJTAG_FTDI)-openjtag_ftdi \
+ --$(call ptx/endis, PTXCONF_OPENOCD_OOCD_TRACE)-oocd_trace \
+ --$(call ptx/endis, PTXCONF_OPENOCD_BUSPIRATE)-buspirate \
+ --$(call ptx/endis, PTXCONF_OPENOCD_SYSFSGPIO)-sysfsgpio \
+ --disable-minidriver-dummy \
+ --$(call ptx/endis, PTXCONF_OPENOCD_REMOTE_BITBANG)-remote-bitbang
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/openocd.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, openocd)
+ @$(call install_fixup, openocd,PRIORITY,optional)
+ @$(call install_fixup, openocd,SECTION,base)
+ @$(call install_fixup, openocd,AUTHOR,"Andreas Pretzsch <apr@cn-eng.de>")
+ @$(call install_fixup, openocd,DESCRIPTION,"OpenOCD - Open On-Chip Debugger")
+
+ @$(call install_copy, openocd, 0, 0, 0755, -, /usr/bin/openocd)
+ifneq ($(call remove_quotes,$(PTXCONF_OPENOCD_SCRIPTDIR)),)
+ @$(call install_alternative_tree, openocd, 0, 0, $(PTXCONF_OPENOCD_SCRIPTDIR))
+endif
+
+ @$(call install_finish, openocd)
+
+ @$(call touch)
+
+
+# vim: syntax=make