* [Buildroot] [PATCH 1/2] package: add libftdi support @ 2011-08-09 17:39 Jean-Christophe PLAGNIOL-VILLARD 2011-08-09 17:39 ` [Buildroot] [PATCH 2/2] package: add openocd support Jean-Christophe PLAGNIOL-VILLARD 2011-09-11 9:15 ` [Buildroot] [PATCH 1/2] package: add libftdi support Peter Korsgaard 0 siblings, 2 replies; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-08-09 17:39 UTC (permalink / raw) To: buildroot needed by openocd Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> --- package/Config.in | 1 + package/libftdi/Config.in | 18 ++++++++ .../libftdi/libftdi-0.19-01_pkgconfig_libusb.patch | 47 ++++++++++++++++++++ package/libftdi/libftdi.mk | 23 ++++++++++ 4 files changed, 89 insertions(+), 0 deletions(-) create mode 100644 package/libftdi/Config.in create mode 100644 package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch create mode 100644 package/libftdi/libftdi.mk diff --git a/package/Config.in b/package/Config.in index 7112e05..1747620 100644 --- a/package/Config.in +++ b/package/Config.in @@ -301,6 +301,7 @@ menu "Hardware handling" source "package/libaio/Config.in" source "package/libraw1394/Config.in" source "package/tslib/Config.in" +source "package/libftdi/Config.in" source "package/libhid/Config.in" source "package/libiqrf/Config.in" source "package/libusb/Config.in" diff --git a/package/libftdi/Config.in b/package/libftdi/Config.in new file mode 100644 index 0000000..6cedc34 --- /dev/null +++ b/package/libftdi/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBFTDI + bool "libftdi" + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Userspace access to FTDI USB interface chips + + http://www.intra2net.com/en/developer/libftdi/index.php + +if BR2_PACKAGE_LIBFTDI + +config BR2_PACKAGE_LIBTFDI_CPP + depends on BR2_INSTALL_LIBSTDCPP + bool "C++ Binding" + help + C++ Binding + +endif # BR2_PACKAGE_LIBFTDI diff --git a/package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch b/package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch new file mode 100644 index 0000000..389291d --- /dev/null +++ b/package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch @@ -0,0 +1,47 @@ +--- + configure.in | 35 +++++++++++------------------------ + 1 file changed, 11 insertions(+), 24 deletions(-) + +--- a/configure.in ++++ b/configure.in +@@ -8,30 +8,17 @@ + AM_PROG_LIBTOOL + AC_PROG_CXX + +-dnl check for libusb-config +-AC_CHECK_TOOL(HAVELIBUSB, libusb-config) +- +-if test ! -z "$HAVELIBUSB"; then +- LIBUSB_CFLAGS=`$HAVELIBUSB --cflags` +- LIBUSB_LIBS=`$HAVELIBUSB --libs` +- +- CFLAGS="$CFLAGS $LIBUSB_CFLAGS" +- LIBS="$LIBS $LIBUSB_LIBS" +-else +- AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation.]) +-fi +- +-dnl check for version of libusb +-AC_MSG_CHECKING([if libusb version is >= 0.1.7]) +-libusb_version_needed="1007" +-libusb_version=`$HAVELIBUSB --version | sed -e "s/libusb //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'` ++dnl check for libusb ++PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.11) ++CFLAGS="$CFLAGS $LIBUSB_CFLAGS" ++LIBS="$LIBS $LIBUSB_LIBS" + +-if test $libusb_version -lt $libusb_version_needed; then +- AC_MSG_RESULT(no) +- AC_MSG_ERROR([*** libusb is too old ($libusb_version). You need a libusb installation newer or equal to 0.1.7.]) +-else +- AC_MSG_RESULT(yes) +-fi ++dnl Check for recent pkg-config which supports Requires.private ++case `$PKG_CONFIG --version` in ++0.?|0.1[0-7]) PKGCONFIG_REQUIRES="Requires"; ;; ++*) PKGCONFIG_REQUIRES="Requires.private"; ;; ++esac ++AC_SUBST(PKGCONFIG_REQUIRES) + + ENABLE_ASYNC_MODE=0 + AC_ARG_WITH(async-mode, diff --git a/package/libftdi/libftdi.mk b/package/libftdi/libftdi.mk new file mode 100644 index 0000000..315fe16 --- /dev/null +++ b/package/libftdi/libftdi.mk @@ -0,0 +1,23 @@ +############################################################# +# +# libftdi +# +############################################################# +LIBFTDI_VERSION = 0.19 +LIBFTDI_SOURCE = libftdi-$(LIBFTDI_VERSION).tar.gz +LIBFTDI_SITE = http://www.intra2net.com/en/developer/libftdi/download/ +LIBFTDI_DEPENDENCIES = libusb-compat libusb +LIBFTDI_INSTALL_STAGING = YES + +LIBFTDI_AUTORECONF = YES + +LIBFDTI_CONF_OPT = --without-examples + +# configure detect it automaticaly so we need to force it +ifeq ($(BR2_PACKAGE_LIBTFDI_CPP),y) +LIBFDTI_CONF_OPT += --enable-libftdipp +else +LIBFDTI_CONF_OPT += --disable-libftdipp +endif + +$(eval $(call AUTOTARGETS,package,libftdi)) -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2] package: add openocd support 2011-08-09 17:39 [Buildroot] [PATCH 1/2] package: add libftdi support Jean-Christophe PLAGNIOL-VILLARD @ 2011-08-09 17:39 ` Jean-Christophe PLAGNIOL-VILLARD 2011-08-15 13:54 ` Jean-Christophe PLAGNIOL-VILLARD ` (3 more replies) 2011-09-11 9:15 ` [Buildroot] [PATCH 1/2] package: add libftdi support Peter Korsgaard 1 sibling, 4 replies; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-08-09 17:39 UTC (permalink / raw) To: buildroot with only the following Adapters - FTDI FT2xxx/FT4xxx - J-Link (Segger and Atmel SAM-ICE) - Versaloon-Link JTAG Adapter Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> --- package/Config.in | 1 + package/openocd/Config.in | 29 +++++++++++++++++ ...s-compilation-host-libsub-was-used-before.patch | 33 ++++++++++++++++++++ package/openocd/openocd-force_jimtcl_static.patch | 22 +++++++++++++ package/openocd/openocd.mk | 32 +++++++++++++++++++ 5 files changed, 117 insertions(+), 0 deletions(-) create mode 100644 package/openocd/Config.in create mode 100644 package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch create mode 100644 package/openocd/openocd-force_jimtcl_static.patch create mode 100644 package/openocd/openocd.mk diff --git a/package/Config.in b/package/Config.in index 1747620..299c004 100644 --- a/package/Config.in +++ b/package/Config.in @@ -190,6 +190,7 @@ source "package/memtester/Config.in" 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" diff --git a/package/openocd/Config.in b/package/openocd/Config.in new file mode 100644 index 0000000..bf92819 --- /dev/null +++ b/package/openocd/Config.in @@ -0,0 +1,29 @@ +menuconfig 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 diff --git a/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch b/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch new file mode 100644 index 0000000..99ff04e --- /dev/null +++ b/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch @@ -0,0 +1,33 @@ +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 + diff --git a/package/openocd/openocd-force_jimtcl_static.patch b/package/openocd/openocd-force_jimtcl_static.patch new file mode 100644 index 0000000..80446c8 --- /dev/null +++ b/package/openocd/openocd-force_jimtcl_static.patch @@ -0,0 +1,22 @@ +--- + 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 { diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk new file mode 100644 index 0000000..74585d3 --- /dev/null +++ b/package/openocd/openocd.mk @@ -0,0 +1,32 @@ +############################################################# +# +# 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)) -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2] package: add openocd support 2011-08-09 17:39 ` [Buildroot] [PATCH 2/2] package: add openocd support Jean-Christophe PLAGNIOL-VILLARD @ 2011-08-15 13:54 ` Jean-Christophe PLAGNIOL-VILLARD 2011-08-17 10:57 ` Thomas Petazzoni ` (2 subsequent siblings) 3 siblings, 0 replies; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-08-15 13:54 UTC (permalink / raw) To: buildroot On 19:39 Tue 09 Aug , Jean-Christophe PLAGNIOL-VILLARD wrote: > with only the following Adapters > - FTDI FT2xxx/FT4xxx > - J-Link (Segger and Atmel SAM-ICE) > - Versaloon-Link JTAG Adapter > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com> > Cc: Patrice Vilchez <patrice.vilchez@atmel.com> > --- no comment Best Regards, J. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2] package: add openocd support 2011-08-09 17:39 ` [Buildroot] [PATCH 2/2] package: add openocd support Jean-Christophe PLAGNIOL-VILLARD 2011-08-15 13:54 ` Jean-Christophe PLAGNIOL-VILLARD @ 2011-08-17 10:57 ` Thomas Petazzoni 2011-08-17 17:32 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-11 9:17 ` Peter Korsgaard 2011-09-17 19:52 ` [Buildroot] [PATCH 2/2 v2] " Jean-Christophe PLAGNIOL-VILLARD 3 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2011-08-17 10:57 UTC (permalink / raw) To: buildroot Hello, Le Tue, 9 Aug 2011 19:39:21 +0200, Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> a ?crit : > + --oldincludedir=$(STAGING_DIR)/usr/include \ > + --includedir=$(STAGING_DIR)/usr/include \ Why are those options needed? Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2] package: add openocd support 2011-08-17 10:57 ` Thomas Petazzoni @ 2011-08-17 17:32 ` Jean-Christophe PLAGNIOL-VILLARD 0 siblings, 0 replies; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-08-17 17:32 UTC (permalink / raw) To: buildroot On 12:57 Wed 17 Aug , Thomas Petazzoni wrote: > Hello, > > Le Tue, 9 Aug 2011 19:39:21 +0200, > Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> a ?crit : > > > + --oldincludedir=$(STAGING_DIR)/usr/include \ > > + --includedir=$(STAGING_DIR)/usr/include \ > > Why are those options needed? without openocd looks for /usr/include Best Regards, J. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2] package: add openocd support 2011-08-09 17:39 ` [Buildroot] [PATCH 2/2] package: add openocd support Jean-Christophe PLAGNIOL-VILLARD 2011-08-15 13:54 ` Jean-Christophe PLAGNIOL-VILLARD 2011-08-17 10:57 ` Thomas Petazzoni @ 2011-09-11 9:17 ` Peter Korsgaard 2011-09-17 19:37 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-17 19:52 ` [Buildroot] [PATCH 2/2 v2] " Jean-Christophe PLAGNIOL-VILLARD 3 siblings, 1 reply; 15+ messages in thread From: Peter Korsgaard @ 2011-09-11 9:17 UTC (permalink / raw) To: buildroot >>>>> "JC" == Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> writes: JC> with only the following Adapters JC> - FTDI FT2xxx/FT4xxx JC> - J-Link (Segger and Atmel SAM-ICE) JC> - Versaloon-Link JTAG Adapter Doesn't seem to build here: grep OPENOCD .config BR2_PACKAGE_OPENOCD=y # BR2_PACKAGE_OPENOCD_FT2XXX is not set # BR2_PACKAGE_OPENOCD_JLINK is not set # BR2_PACKAGE_OPENOCD_VSLLINK is not set /home/peko/source/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src -I../../../src -DPKGDATADIR=\"/usr/share/openocd\" -DPKGLIBDIR=\"/usr/lib/openocd\" -I../../../jimtcl -I../../../jimtcl -pipe -Os -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -MT bitbang.lo -MD -MP -MF .deps/bitbang.Tpo -c bitbang.c -fPIC -DPIC -o .libs/bitbang.o In file included from ../../../src/jtag/jtag.h:26, from driver.c:34: ../../../src/helper/binarybuffer.h: In function 'buf_set_u32': ../../../src/helper/binarybuffer.h:52: error: 'for' loop initial declaration used outside C99 mode ../../../src/helper/binarybuffer.h: In function 'buf_get_u32': ../../../src/helper/binarybuffer.h:82: error: 'for' loop initial declaration used outside C99 mode In file included from ../../../src/jtag/jtag.h:26, from ../../../src/jtag/interface.h:29, from bitbang.c:28: ../../../src/helper/binarybuffer.h: In function 'buf_set_u32': ../../../src/helper/binarybuffer.h:52: error: 'for' loop initial declaration used outside C99 mode ../../../src/helper/binarybuffer.h: In function 'buf_get_u32': ../../../src/helper/binarybuffer.h:82: error: 'for' loop initial declaration used outside C99 mode driver.c: In function 'interface_jtag_add_ir_scan': driver.c:100: error: 'for' loop initial declaration used outside C99 mode driver.c: In function 'interface_jtag_add_dr_scan': driver.c:142: error: 'for' loop initial declaration used outside C99 mode driver.c:167: error: redefinition of 'tap' driver.c:142: error: previous definition of 'tap' was here Any idea? If it isn't supposed to build if none of the drivers are enabled, then we need to ensure this cannot happen in Kconfig. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2] package: add openocd support 2011-09-11 9:17 ` Peter Korsgaard @ 2011-09-17 19:37 ` Jean-Christophe PLAGNIOL-VILLARD 0 siblings, 0 replies; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-17 19:37 UTC (permalink / raw) To: buildroot On 11:17 Sun 11 Sep , Peter Korsgaard wrote: > >>>>> "JC" == Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> writes: > > JC> with only the following Adapters > JC> - FTDI FT2xxx/FT4xxx > JC> - J-Link (Segger and Atmel SAM-ICE) > JC> - Versaloon-Link JTAG Adapter > > Doesn't seem to build here: > > grep OPENOCD .config > BR2_PACKAGE_OPENOCD=y > # BR2_PACKAGE_OPENOCD_FT2XXX is not set > # BR2_PACKAGE_OPENOCD_JLINK is not set > # BR2_PACKAGE_OPENOCD_VSLLINK is not set > > /home/peko/source/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src -I../../../src -DPKGDATADIR=\"/usr/share/openocd\" -DPKGLIBDIR=\"/usr/lib/openocd\" -I../../../jimtcl -I../../../jimtcl -pipe -Os -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -MT bitbang.lo -MD -MP -MF .deps/bitbang.Tpo -c bitbang.c -fPIC -DPIC -o .libs/bitbang.o > In file included from ../../../src/jtag/jtag.h:26, > from driver.c:34: > ../../../src/helper/binarybuffer.h: In function 'buf_set_u32': > ../../../src/helper/binarybuffer.h:52: error: 'for' loop initial declaration used outside C99 mode > ../../../src/helper/binarybuffer.h: In function 'buf_get_u32': > ../../../src/helper/binarybuffer.h:82: error: 'for' loop initial declaration used outside C99 mode > In file included from ../../../src/jtag/jtag.h:26, > from ../../../src/jtag/interface.h:29, > from bitbang.c:28: > ../../../src/helper/binarybuffer.h: In function 'buf_set_u32': > ../../../src/helper/binarybuffer.h:52: error: 'for' loop initial declaration used outside C99 mode > ../../../src/helper/binarybuffer.h: In function 'buf_get_u32': > ../../../src/helper/binarybuffer.h:82: error: 'for' loop initial declaration used outside C99 mode > driver.c: In function 'interface_jtag_add_ir_scan': > driver.c:100: error: 'for' loop initial declaration used outside C99 mode > driver.c: In function 'interface_jtag_add_dr_scan': > driver.c:142: error: 'for' loop initial declaration used outside C99 mode > driver.c:167: error: redefinition of 'tap' > driver.c:142: error: previous definition of 'tap' was here I never see those error I build it on arm target and no issue now I rebuild it against the HEAD and foud one issue on xscale support I'll send a fix patch > > Any idea? If it isn't supposed to build if none of the drivers are > enabled, then we need to ensure this cannot happen in Kconfig. no issue as you can Best Regards, J. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2 v2] package: add openocd support 2011-08-09 17:39 ` [Buildroot] [PATCH 2/2] package: add openocd support Jean-Christophe PLAGNIOL-VILLARD ` (2 preceding siblings ...) 2011-09-11 9:17 ` Peter Korsgaard @ 2011-09-17 19:52 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-18 9:31 ` Peter Korsgaard 2011-09-20 11:19 ` [Buildroot] [PATCH 2/2 v3] " Jean-Christophe PLAGNIOL-VILLARD 3 siblings, 2 replies; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-17 19:52 UTC (permalink / raw) To: buildroot with only the following Adapters - FTDI FT2xxx/FT4xxx - J-Link (Segger and Atmel SAM-ICE) - Versaloon-Link JTAG Adapter build for arm target Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> --- v2: add xscale fix Best Regards, J. package/Config.in | 1 + package/openocd/Config.in | 29 +++++++++++++++++ ...s-compilation-host-libsub-was-used-before.patch | 33 ++++++++++++++++++++ ...002-fix-xscale-uninitialise-breakpoint_pc.patch | 20 ++++++++++++ package/openocd/openocd-force_jimtcl_static.patch | 22 +++++++++++++ package/openocd/openocd.mk | 32 +++++++++++++++++++ 6 files changed, 137 insertions(+), 0 deletions(-) create mode 100644 package/openocd/Config.in create mode 100644 package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch create mode 100644 package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch create mode 100644 package/openocd/openocd-force_jimtcl_static.patch create mode 100644 package/openocd/openocd.mk diff --git a/package/Config.in b/package/Config.in index d95e7b5..e7ad7fb 100644 --- a/package/Config.in +++ b/package/Config.in @@ -191,6 +191,7 @@ source "package/memtester/Config.in" 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" diff --git a/package/openocd/Config.in b/package/openocd/Config.in new file mode 100644 index 0000000..bf92819 --- /dev/null +++ b/package/openocd/Config.in @@ -0,0 +1,29 @@ +menuconfig 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 diff --git a/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch b/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch new file mode 100644 index 0000000..99ff04e --- /dev/null +++ b/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch @@ -0,0 +1,33 @@ +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 + diff --git a/package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch b/package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch new file mode 100644 index 0000000..328241e --- /dev/null +++ b/package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch @@ -0,0 +1,20 @@ +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 */ + diff --git a/package/openocd/openocd-force_jimtcl_static.patch b/package/openocd/openocd-force_jimtcl_static.patch new file mode 100644 index 0000000..80446c8 --- /dev/null +++ b/package/openocd/openocd-force_jimtcl_static.patch @@ -0,0 +1,22 @@ +--- + 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 { diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk new file mode 100644 index 0000000..74585d3 --- /dev/null +++ b/package/openocd/openocd.mk @@ -0,0 +1,32 @@ +############################################################# +# +# 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)) -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2 v2] package: add openocd support 2011-09-17 19:52 ` [Buildroot] [PATCH 2/2 v2] " Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-18 9:31 ` Peter Korsgaard 2011-09-18 10:22 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-20 11:19 ` [Buildroot] [PATCH 2/2 v3] " Jean-Christophe PLAGNIOL-VILLARD 1 sibling, 1 reply; 15+ messages in thread From: Peter Korsgaard @ 2011-09-18 9:31 UTC (permalink / raw) To: buildroot >>>>> "JC" == Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> writes: JC> with only the following Adapters JC> - FTDI FT2xxx/FT4xxx JC> - J-Link (Segger and Atmel SAM-ICE) JC> - Versaloon-Link JTAG Adapter JC> build for arm target JC> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> JC> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> JC> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> JC> --- JC> v2: JC> add xscale fix Still same error: libtool: compile: /home/peko/source/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src -I../../../src -DPKGDATADIR=\"/usr/share/openocd\" -DPKGLIBDIR=\"/usr/lib/openocd\" -I../../../jimtcl -I../../../jimtcl -pipe -Os -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -MT bitbang.lo -MD -MP -MF .deps/bitbang.Tpo -c bitbang.c -fPIC -DPIC -o .libs/bitbang.o In file included from ../../../src/jtag/jtag.h:26, from driver.c:34: ../../../src/helper/binarybuffer.h: In function 'buf_set_u32': ../../../src/helper/binarybuffer.h:52: error: 'for' loop initial declaration used outside C99 mode This is with a trivial defconfig: BR2_arm=y BR2_arm926t=y BR2_PACKAGE_OPENOCD=y E.G. to reproduce stick those 3 lines in .config and run yes '' | make oldconfig make Next to that I have a few minor comments: JC> +++ b/package/openocd/Config.in JC> @@ -0,0 +1,29 @@ JC> +menuconfig BR2_PACKAGE_OPENOCD Please use config rather than menuconfig to not create a submenu, making it harder for people to get an overview. JC> + bool "OpenOCD" We normally keep the short name in lower case. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2 v2] package: add openocd support 2011-09-18 9:31 ` Peter Korsgaard @ 2011-09-18 10:22 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-18 11:05 ` Peter Korsgaard 0 siblings, 1 reply; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-18 10:22 UTC (permalink / raw) To: buildroot On 11:31 Sun 18 Sep , Peter Korsgaard wrote: > >>>>> "JC" == Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> writes: > > JC> with only the following Adapters > JC> - FTDI FT2xxx/FT4xxx > JC> - J-Link (Segger and Atmel SAM-ICE) > JC> - Versaloon-Link JTAG Adapter > > JC> build for arm target > > JC> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> > JC> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> > JC> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> > JC> --- > JC> v2: > > JC> add xscale fix > > Still same error: > > libtool: compile: /home/peko/source/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src -I../../../src -DPKGDATADIR=\"/usr/share/openocd\" -DPKGLIBDIR=\"/usr/lib/openocd\" -I../../../jimtcl -I../../../jimtcl -pipe -Os -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -MT bitbang.lo -MD -MP -MF .deps/bitbang.Tpo -c bitbang.c -fPIC -DPIC -o .libs/bitbang.o > In file included from ../../../src/jtag/jtag.h:26, > from driver.c:34: > ../../../src/helper/binarybuffer.h: In function 'buf_set_u32': > ../../../src/helper/binarybuffer.h:52: error: 'for' loop initial declaration used outside C99 mode > > This is with a trivial defconfig: > > BR2_arm=y > BR2_arm926t=y > BR2_PACKAGE_OPENOCD=y > > E.G. to reproduce stick those 3 lines in .config and run which version of gcc do you use? > > yes '' | make oldconfig > make > > Next to that I have a few minor comments: > > JC> +++ b/package/openocd/Config.in > JC> @@ -0,0 +1,29 @@ > JC> +menuconfig BR2_PACKAGE_OPENOCD > > Please use config rather than menuconfig to not create a submenu, making > it harder for people to get an overview. > > JC> + bool "OpenOCD" > > We normally keep the short name in lower case. The name of the project is OpenOCD so I want to keep it that way Best Regards, J. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2 v2] package: add openocd support 2011-09-18 10:22 ` Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-18 11:05 ` Peter Korsgaard 2011-09-20 11:18 ` Jean-Christophe PLAGNIOL-VILLARD 0 siblings, 1 reply; 15+ messages in thread From: Peter Korsgaard @ 2011-09-18 11:05 UTC (permalink / raw) To: buildroot >>>>> "Jean-Christophe" == Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> writes: >> This is with a trivial defconfig: >> >> BR2_arm=y >> BR2_arm926t=y >> BR2_PACKAGE_OPENOCD=y >> >> E.G. to reproduce stick those 3 lines in .config and run Jean-Christophe> which version of gcc do you use? Like the config says, the default version (4.3.6). -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2 v2] package: add openocd support 2011-09-18 11:05 ` Peter Korsgaard @ 2011-09-20 11:18 ` Jean-Christophe PLAGNIOL-VILLARD 0 siblings, 0 replies; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-20 11:18 UTC (permalink / raw) To: buildroot On 13:05 Sun 18 Sep , Peter Korsgaard wrote: > >>>>> "Jean-Christophe" == Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> writes: > > >> This is with a trivial defconfig: > >> > >> BR2_arm=y > >> BR2_arm926t=y > >> BR2_PACKAGE_OPENOCD=y > >> > >> E.G. to reproduce stick those 3 lines in .config and run > > Jean-Christophe> which version of gcc do you use? > > Like the config says, the default version (4.3.6). I've found the issue on the codesourcery toolchains and pc too no need to specify we use gnu99 standard but with buildroot gcc we need so I update it Best Regards, J. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2 v3] package: add openocd support 2011-09-17 19:52 ` [Buildroot] [PATCH 2/2 v2] " Jean-Christophe PLAGNIOL-VILLARD 2011-09-18 9:31 ` Peter Korsgaard @ 2011-09-20 11:19 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-21 20:59 ` Peter Korsgaard 1 sibling, 1 reply; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-20 11:19 UTC (permalink / raw) To: buildroot with only the following Adapters - FTDI FT2xxx/FT4xxx - J-Link (Segger and Atmel SAM-ICE) - Versaloon-Link JTAG Adapter Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> --- Hi, v2: xscacle fix v3: force gnu99 as gcc standard Best Regards, J. package/Config.in | 1 + package/openocd/Config.in | 29 +++++++++++++++++ ...s-compilation-host-libsub-was-used-before.patch | 33 ++++++++++++++++++++ ...002-fix-xscale-uninitialise-breakpoint_pc.patch | 20 ++++++++++++ package/openocd/openocd-0003-force-gnu99.patch | 19 +++++++++++ .../openocd/openocd-0004-force_jimtcl_static.patch | 25 +++++++++++++++ package/openocd/openocd.mk | 32 +++++++++++++++++++ 7 files changed, 159 insertions(+), 0 deletions(-) create mode 100644 package/openocd/Config.in create mode 100644 package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch create mode 100644 package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch create mode 100644 package/openocd/openocd-0003-force-gnu99.patch create mode 100644 package/openocd/openocd-0004-force_jimtcl_static.patch create mode 100644 package/openocd/openocd.mk diff --git a/package/Config.in b/package/Config.in index 451b271..6574081 100644 --- a/package/Config.in +++ b/package/Config.in @@ -191,6 +191,7 @@ source "package/memtester/Config.in" 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" diff --git a/package/openocd/Config.in b/package/openocd/Config.in new file mode 100644 index 0000000..bf92819 --- /dev/null +++ b/package/openocd/Config.in @@ -0,0 +1,29 @@ +menuconfig 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 diff --git a/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch b/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch new file mode 100644 index 0000000..99ff04e --- /dev/null +++ b/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch @@ -0,0 +1,33 @@ +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 + diff --git a/package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch b/package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch new file mode 100644 index 0000000..328241e --- /dev/null +++ b/package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch @@ -0,0 +1,20 @@ +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 */ + diff --git a/package/openocd/openocd-0003-force-gnu99.patch b/package/openocd/openocd-0003-force-gnu99.patch new file mode 100644 index 0000000..106d112 --- /dev/null +++ b/package/openocd/openocd-0003-force-gnu99.patch @@ -0,0 +1,19 @@ +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 diff --git a/package/openocd/openocd-0004-force_jimtcl_static.patch b/package/openocd/openocd-0004-force_jimtcl_static.patch new file mode 100644 index 0000000..7118b57 --- /dev/null +++ b/package/openocd/openocd-0004-force_jimtcl_static.patch @@ -0,0 +1,25 @@ +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 { diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk new file mode 100644 index 0000000..74585d3 --- /dev/null +++ b/package/openocd/openocd.mk @@ -0,0 +1,32 @@ +############################################################# +# +# 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)) -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 2/2 v3] package: add openocd support 2011-09-20 11:19 ` [Buildroot] [PATCH 2/2 v3] " Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-21 20:59 ` Peter Korsgaard 0 siblings, 0 replies; 15+ messages in thread From: Peter Korsgaard @ 2011-09-21 20:59 UTC (permalink / raw) To: buildroot >>>>> "Jean-Christophe" == Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> writes: Jean-Christophe> with only the following Adapters Jean-Christophe> - FTDI FT2xxx/FT4xxx Jean-Christophe> - J-Link (Segger and Atmel SAM-ICE) Jean-Christophe> - Versaloon-Link JTAG Adapter Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH 1/2] package: add libftdi support 2011-08-09 17:39 [Buildroot] [PATCH 1/2] package: add libftdi support Jean-Christophe PLAGNIOL-VILLARD 2011-08-09 17:39 ` [Buildroot] [PATCH 2/2] package: add openocd support Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-11 9:15 ` Peter Korsgaard 1 sibling, 0 replies; 15+ messages in thread From: Peter Korsgaard @ 2011-09-11 9:15 UTC (permalink / raw) To: buildroot >>>>> "JC" == Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> writes: JC> needed by openocd JC> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> JC> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> JC> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-09-21 20:59 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-09 17:39 [Buildroot] [PATCH 1/2] package: add libftdi support Jean-Christophe PLAGNIOL-VILLARD 2011-08-09 17:39 ` [Buildroot] [PATCH 2/2] package: add openocd support Jean-Christophe PLAGNIOL-VILLARD 2011-08-15 13:54 ` Jean-Christophe PLAGNIOL-VILLARD 2011-08-17 10:57 ` Thomas Petazzoni 2011-08-17 17:32 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-11 9:17 ` Peter Korsgaard 2011-09-17 19:37 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-17 19:52 ` [Buildroot] [PATCH 2/2 v2] " Jean-Christophe PLAGNIOL-VILLARD 2011-09-18 9:31 ` Peter Korsgaard 2011-09-18 10:22 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-18 11:05 ` Peter Korsgaard 2011-09-20 11:18 ` Jean-Christophe PLAGNIOL-VILLARD 2011-09-20 11:19 ` [Buildroot] [PATCH 2/2 v3] " Jean-Christophe PLAGNIOL-VILLARD 2011-09-21 20:59 ` Peter Korsgaard 2011-09-11 9:15 ` [Buildroot] [PATCH 1/2] package: add libftdi support Peter Korsgaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox