source "package/mtd/Config.in"
source "package/ntfs-3g/Config.in"
source "package/ntfsprogs/Config.in"
+source "package/openocd/Config.in"
source "package/pciutils/Config.in"
source "package/rng-tools/Config.in"
source "package/sdparm/Config.in"
--- /dev/null
+config BR2_PACKAGE_OPENOCD
+ bool "openocd"
+ select BR2_PACKAGE_LIBUSB
+ select BR2_PACKAGE_LIBUSB_COMPAT
+ help
+ OpenOCD - Open On-Chip Debugger
+
+ http://openocd.berlios.de/web/
+
+if BR2_PACKAGE_OPENOCD
+
+comment "Adapters"
+
+config BR2_PACKAGE_OPENOCD_FT2XXX
+ bool "FT2xxx/FT4xxx Based JTAG Programmer"
+ select BR2_PACKAGE_LIBFTDI
+ help
+ Enable building support for FT2232 based devices
+ using the libftdi driver, opensource alternate of FTD2XX
+
+config BR2_PACKAGE_OPENOCD_JLINK
+ bool "Segger J-Link JTAG Programmer"
+ help
+ Segger J-Link JTAG Programmer and clone such as Atmel SAM-ICE
+
+config BR2_PACKAGE_OPENOCD_VSLLINK
+ bool "Versaloon-Link JTAG Programmr"
+
+endif # BR2_PACKAGE_OPENOCD
--- /dev/null
+From 3728c4af7f6303ccedab56ec220797f8f290580e Mon Sep 17 00:00:00 2001
+From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+Date: Wed, 10 Aug 2011 00:17:29 +0800
+Subject: [PATCH] fix cross compilation: host libsub was used before
+
+tested in buildroot
+
+Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+---
+ configure.in | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index dfa1e8f..cfe2218 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1046,8 +1046,11 @@ build_usb=no
+ if test $build_jlink = yes -o $build_vsllink = yes -o $build_usbprog = yes -o \
+ $build_rlink = yes -o $build_ulink = yes -o $build_armjtagew = yes
+ then
+- AC_CHECK_HEADERS([usb.h],[],
+- [AC_MSG_ERROR([usb.h is required to build some OpenOCD driver(s)])])
++ dnl check for libusb
++ PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.11)
++ CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
++ LDFLAGS="$LFFLAGS $LIBUSB_LDFLAGS"
++ LIBS="$LIBS $LIBUSB_LIBS"
+ build_usb=yes
+ fi
+
+--
+1.7.5.4
+
--- /dev/null
+xscale: fix uninitialise breakpoint_pc
+
+Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+---
+ src/target/xscale.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: b/src/target/xscale.c
+===================================================================
+--- a/src/target/xscale.c
++++ b/src/target/xscale.c
+@@ -2811,7 +2811,7 @@ static int xscale_analyze_trace(struct t
+ struct xscale_common *xscale = target_to_xscale(target);
+ struct xscale_trace_data *trace_data = xscale->trace.data;
+ int i, retval;
+- uint32_t breakpoint_pc;
++ uint32_t breakpoint_pc = 0;
+ struct arm_instruction instruction;
+ uint32_t current_pc = 0; /* initialized when address determined */
+
--- /dev/null
+force gnu99
+
+Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+---
+ configure.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -28,6 +28,7 @@ AC_DISABLE_SHARED
+ AC_PROG_LIBTOOL
+ AC_SUBST(LIBTOOL_DEPS)
+
++CFLAGS="$CFLAGS -std=gnu99"
+
+ dnl configure checks required for Jim files (these are obsolete w/ C99)
+ AC_C_CONST
--- /dev/null
+force jimtcl to build static
+
+Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+---
+ jimtcl/auto.def | 5 -----
+ 1 file changed, 5 deletions(-)
+
+Index: b/jimtcl/auto.def
+===================================================================
+--- a/jimtcl/auto.def
++++ b/jimtcl/auto.def
+@@ -148,13 +148,8 @@ if {[opt-bool references]} {
+ msg-result "Enabling references"
+ define JIM_REFERENCES
+ }
+-if {[opt-bool shared with-jim-shared]} {
+- msg-result "Building shared library"
+- define JIM_LIBTYPE shared
+-} else {
+ msg-result "Building static library"
+ define JIM_LIBTYPE static
+-}
+ if {[opt-bool install-jim]} {
+ define install_jim 1
+ } else {
--- /dev/null
+#############################################################
+#
+# openocd
+#
+#############################################################
+OPENOCD_VERSION:=0.5.0
+OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2
+OPENOCD_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/openocd/openocd/$(OPENOCD_VERSION)
+
+OPENOCD_AUTORECONF = YES
+OPENOCD_CONF_OPT = \
+ --oldincludedir=$(STAGING_DIR)/usr/include \
+ --includedir=$(STAGING_DIR)/usr/include \
+ --disable-doxygen-html \
+ --enable-dummy
+
+OPENOCD_DEPENDENCIES = libusb-compat
+
+# Adapters
+ifeq ($(BR2_PACKAGE_OPENOCD_FT2XXX),y)
+OPENOCD_CONF_OPT += --enable-ft2232_libftdi
+endif
+
+ifeq ($(BR2_PACKAGE_OPENOCD_JLINK),y)
+OPENOCD_CONF_OPT += --enable-jlink
+endif
+
+ifeq ($(BR2_PACKAGE_OPENOCD_VSLLINK),y)
+OPENOCD_CONF_OPT += --enable-vsllink
+endif
+
+$(eval $(call AUTOTARGETS,package,openocd))