summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduane <duane@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-27 23:23:06 +0000
committerduane <duane@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-27 23:23:06 +0000
commite5e561157c6bdff3aef792dc3a2fca9694a4b702 (patch)
tree7ad2f4ffd5d9e282d94cff2597b3380e1fb32c90
parentdd2d2ad767496b8b8e31ccff38fa359454044475 (diff)
downloadopenocd_libswd-e5e561157c6bdff3aef792dc3a2fca9694a4b702.tar.gz
openocd_libswd-e5e561157c6bdff3aef792dc3a2fca9694a4b702.tar.bz2
openocd_libswd-e5e561157c6bdff3aef792dc3a2fca9694a4b702.tar.xz
openocd_libswd-e5e561157c6bdff3aef792dc3a2fca9694a4b702.zip
Added another test build configuration
git-svn-id: svn://svn.berlios.de/openocd/trunk@1290 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rwxr-xr-xtesting/build.test2/Makefile193
-rwxr-xr-xtesting/build.test2/README.txt59
-rwxr-xr-xtesting/build.test2/local.uses161
3 files changed, 413 insertions, 0 deletions
diff --git a/testing/build.test2/Makefile b/testing/build.test2/Makefile
new file mode 100755
index 00000000..d4c428ed
--- /dev/null
+++ b/testing/build.test2/Makefile
@@ -0,0 +1,193 @@
+# -*- mode: makefile -*-
+#========================================
+# DO NOT DELETE THE LINE BELOW
+_default: default
+# DO NOT DELETE THE LINE_ABOVE
+#========================================
+
+#========================================
+#
+# There are no user configurable options here.
+#
+# All user configurable options are in local.uses
+#
+include ./local.uses
+#
+#========================================
+
+#========================================
+# This is the USB driver for the FTDI2XX chips.
+# It is a "closed" solution from FTDICHIP.COM
+# Some claim it is faster then the open/free
+# solution: win32-libusb+libftdi.
+#
+ftd2xx.download:
+ mkdir -p ${VIRGINS}
+ wget -O ${FTD2XX_ZIPFILE_LOCAL} \
+ ${FTD2XX_ZIPFILE_URL}
+
+ftd2xx.unpack:
+ rm -rf ${FTD2XX_WIN32_DIR}
+ mkdir -p ${FTD2XX_WIN32_DIR}
+ cd ${FTD2XX_WIN32_DIR} && unzip \
+ ${FTD2XX_ZIPFILE_LOCAL}
+
+ftd2xx.build:
+ @echo "Nothing to do for: $@"
+
+ftd2xx.configure:
+ @echo "Nothing to do for: $@"
+
+ftd2xx.install:
+ @echo "Nothing to do for: $@"
+
+clean::
+ rm -rf ${FTD2XX_WIN32_DIR}
+
+ftd2xx.all: ftd2xx.unpack ftd2xx.configure \
+ ftd2xx.build ftd2xx.install
+
+
+#========================================-
+# LIBFTDI - requires LIBCONFUSE..
+# So we handle it here :-(
+
+libconfuse.download:
+ mkdir -p virgins
+ wget -O ${LIBCONFUSE_TARFILE_LOCAL} \
+ ${LIBCONFUSE_TARFILE_URL}
+
+libconfuse.unpack:
+ tar xfz ${LIBCONFUSE_TARFILE_LOCAL}
+
+clean::
+ rm -rf ${LIBCONFUSE_SRC_DIR}
+
+libconfuse.configure:
+ rm -rf ${LIBCONFUSE_BUILD_DIR}
+ mkdir -p ${LIBCONFUSE_BUILD_DIR}
+ cd ${LIBCONFUSE_BUILD_DIR} && \
+ ${LIBCONFUSE_SRC_DIR}/configure \
+ --prefix=${PREFIX}
+
+clean::
+ rm -rf ${LIBCONFUSE_BUILD_DIR}
+
+libconfuse.build:
+ cd ${LIBCONFUSE_BUILD_DIR} && ${MAKE}
+
+libconfuse.install:
+ cd ${LIBCONFUSE_BUILD_DIR} && ${MAKE} install
+
+libconfuse.all: libconfuse.unpack libconfuse.configure \
+ libconfuse.build libconfuse.install
+
+#========================================
+# LIBFTDI - the open source (and free)
+# alternative to (closed) FTD2XX drivers.
+
+libftdi.download:
+ mkdir -p virgins
+ wget -O ${LIBFTDI_TARFILE_LOCAL} \
+ ${LIBFTDI_TARFILE_URL}
+
+libftdi.unpack:
+ tar xfz ${LIBFTDI_TARFILE_LOCAL}
+
+clean::
+ rm -rf ${LIBFTDI_SRC_DIR}
+
+libftdi.configure:
+ rm -rf ${LIBFTDI_BUILD_DIR}
+ mkdir -p ${LIBFTDI_BUILD_DIR}
+ cd ${LIBFTDI_BUILD_DIR} && \
+ ${LIBFTDI_SRC_DIR}/configure \
+ --prefix=${PREFIX}
+
+clean::
+ rm -rf ${LIBFTDI_BUILD_DIR}
+
+libftdi.build:
+ cd ${LIBFTDI_BUILD_DIR} && ${MAKE}
+
+libftdi.install:
+ cd ${LIBFTDI_BUILD_DIR} && ${MAKE} install
+
+libftdi.all: libftdi.unpack libftdi.configure \
+ libftdi.build libftdi.install
+
+#========================================
+# Openocd...
+
+openocd.bootstrap:
+ cd ${OPENOCD_SRC_DIR} && bash ./bootstrap
+
+openocd.configure:
+ rm -rf ${OPENOCD_BUILD_DIR}
+ mkdir -p ${OPENOCD_BUILD_DIR}
+ cd ${OPENOCD_BUILD_DIR} && ${OPENOCD_SRC_DIR}/configure \
+ --prefix=${INSTALL_DIR} \
+ ${OPENOCD_CONFIG_OPTIONS}
+
+openocd.build:
+ cd ${OPENOCD_BUILD_DIR} && ${MAKE}
+
+openocd.docs:
+ cd ${OPENOCD_BUILD_DIR}/docs && ${MAKE}
+
+openocd.docs.pdf:
+ cd ${OPENOCD_BUILD_DIR}/docs && ${MAKE} pdf
+
+openocd.docs.html:
+ cd ${OPENOCD_BUILD_DIR}/docs && ${MAKE} html
+
+# fixme:
+# need to add a "make one huge html file target"
+
+openocd.install:
+ cd ${OPENOCD_BUILD_DIR} && ${MAKE} install
+
+#========================================
+# The world...
+
+# Manual step.
+download.all: \
+ ftd2xx.download \
+ libconfuse.download \
+ libftdi.download
+
+ifeq (x"${FT2232_DRIVER}",x"ftd2xx")
+prebuild: ftd2xx.all
+endif
+
+ifeq (x"${FT2232_DRIVER}",x"libftdi")
+prebuild: libconfuse.all libftdi.all
+endif
+
+remake: \
+ openocd.bootstrap \
+ openocd.configure \
+ openocd.build \
+ openocd.install
+
+initial.build : download.all prebuild remake
+
+all:
+ @echo ""
+ @echo " This makefile does not support an 'all' target"
+ @echo ""
+ @echo " If this is your *FIRST* time building... "
+ @echo " Then use this command: \"make initial.build\""
+ @echo ""
+ @echo " The \"default\" target is for openocd developers"
+ @echo " and rebuilds openocd completely.."
+ @echo ""
+
+default:
+ test -d ${OPENOCD_SRC_DIR} || (echo "Where is: The OPENOCD source?"; exit 1)
+ ${MAKE} remake
+
+whatis_%:
+ @echo ""
+ @echo "Makevariable: $* => ${${*}}"
+ @echo ""
diff --git a/testing/build.test2/README.txt b/testing/build.test2/README.txt
new file mode 100755
index 00000000..f4bedcc8
--- /dev/null
+++ b/testing/build.test2/README.txt
@@ -0,0 +1,59 @@
+
+This makefile is how I Duane Ellis (openocd@duaneellis.com) builds
+openocd test purposes on Cygwin. I have included it here so others
+might also make use of the same configuration that I use to develop
+Openocd.
+
+--Duane Ellis
+
+To make use of it do the following:
+
+(1) Check out openocd in the standard way.
+
+For example - in cygwin, type this:
+
+ bash$ mkdir -p /home/duane/test
+ bash$ cd /home/duane/test
+ bash$ svn co https://svn.berlios.de/svnroot/repos/openocd/trunk openocd
+
+(2) COPY this folder "right above" where you have OpenOCD.
+
+ bash$ cd /home/duane/test
+ bash$ cp ./openocd/testing/build.test2/* /home/duane/test/.
+
+(3) OPTIONALLY
+
+ You might want to review the file "local.uses"
+ Change options and so forth at the top of the file.
+
+(4) Initially, you need to download some additional files.
+ These include "libftdi", "libconfuse", and the ftd2xx drivers.
+
+(5) You also need to build the supporting libraries and install them
+ (They are installed "locally" only)
+
+ Type this command:
+
+ bash$ cd /home/duane/test
+
+ bash$ make initial.build
+
+ which: (1) downloads files
+ (2) builds the libs
+ (3) builds OpenOCD
+
+(6) As you hack upon OpenOCD... to rebuild OpenOCD...
+
+ bash$ cd /home/duane/test
+
+ bash$ make remake
+
+ which: (1) re-bootstraps
+ (2) re-configures
+ (3) re-builds
+ (4) re-installs.
+
+=======
+**END**
+=======
+
diff --git a/testing/build.test2/local.uses b/testing/build.test2/local.uses
new file mode 100755
index 00000000..edde31b0
--- /dev/null
+++ b/testing/build.test2/local.uses
@@ -0,0 +1,161 @@
+# -*- mode: makefile -*-
+#========================================
+# DO NOT REMOVE THE LINE BELOW
+HERE := $(shell pwd)
+# DO NOT REMOVE THE LINE ABOVE
+#========================================
+
+# These are common CYGWIN build settings.
+# Comment out things you do not want.
+# Or unComment things you want.
+
+# PCs always have printer ports...
+X86_PRINTER_PORT ?= y
+
+# Chose *ONE* of these three solutions.
+#FTD2232_DRIVER = none
+FT2232_DRIVER = ftd2xx
+#FT2232_DRIVER = libftdi
+
+# Do you have "libusb" installed?
+ifeq (x"${FT2232_DRIVER}",x"libftdi")
+# With LIBFTDI... LIBUSB is manditory.
+USE_LIBUSB = y
+endif
+
+# By default... we assume libusb not present.
+USE_LIBUSB ?= n
+
+#========================================
+# DO NOT EDIT SETTINGS BELOW THIS LINE
+#========================================
+
+
+
+#========================================
+# House keeping...
+
+# Solve problems on systems with DASH.. Grrr...
+SHELL=/bin/bash
+export SHELL
+
+VIRGINS ?= ${HERE}/virgins
+INSTALL_DIR ?= $(HERE)/install
+PREFIX ?= ${INSTALL_DIR}
+
+# Determine the build platform.
+BUILD_SYSNAME_Linux =linux
+BUILD_SYSNAME_linux =linux
+BUILD_SYSNAME_CYGWIN_NT =cygwin
+BUILD_SYSNAME_MINGW32_NT =mingw32
+BUILD_SYSNAME_Darwin =darwin
+BUILD_SYSNAME_darwin =darwin
+BUILD_SYSNAME :=$(BUILD_SYSNAME_$(shell uname --sysname | cut -d'-' -f1))
+
+# And machine (ie: i686, x86_64, or what ever)
+BUILD_MACHINE :=$(BUILD_SYSNAME).$(shell uname -m)
+
+
+#========================================
+#
+
+FTD2XX_LINUX_VERSION=0.4.16
+FTD2XX_LINUX_DIR = ${HERE}/libftd2xx${FTD2XX_LINUX_VERSION}
+FTD2XX_LINUX_64_DIR = ${HERE}/libftd2xx${FTD2XX_LINUX_VERSION}_x86_64
+
+
+# Wiggler type interfaces are here.
+OPENOCD_CONFIG_OPTIONS_printer_y += --enable-parport
+OPENOCD_CONFIG_OPTIONS_printer_y += --enable-parport-giveio
+OPENOCD_CONFIG_OPTIONS_printer_y += --enable-gw16012
+OPENOCD_CONFIG_OPTIONS_printer_y += --enable-parport-giveio
+OPENOCD_CONFIG_OPTIONS_printer_y += --enable-amtjtagaccel
+
+
+# FTD2XX only supports these
+OPENOCD_CONFIG_OPTIONS_ft2232_none =
+OPENOCD_CONFIG_OPTIONS_ft2232_ftd2xx = --enable-ft2232_ftd2xx --enable-presto_ftd2xx --with-ftd2xx-win32-zipdir=${FTD2XX_WIN32_DIR}
+OPENOCD_CONFIG_OPTIONS_ft2232_libftdi = --enable-ft2232_libftdi --enable-presto_libftdi
+
+# LIBUSB - adds support for these.
+OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-jlink
+OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-usbprog
+OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-rlink
+OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-vsllink
+OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-usbprog
+
+#========================================
+# EXPLICITY NOT SUPPORTED INTERFACES
+#
+# zy1000.c
+# This is a standalone hardware box
+# it is *NOT* a cygwin thing.
+#
+# at91rm9200.c
+# This is a uC/Linux (or linux) that
+# runs uC/Linux and uses the gpio pins
+# to bit-bang JTAG stuff.
+#
+# ep93xx.c
+# Just like at91rm9200 - different chip.
+
+#========================================
+# Build OPENOCD config options...
+# Always enable "dummy"
+OPENOCD_CONFIG_OPTIONS += --enable-dummy
+#
+# Today: Cannot enable 'oocd_trace' on cygwin.
+# it assumes/uses termios functions like
+# cfmakeraw() which do not exist on cygwin.
+#
+#OPENOCD_CONFIG_OPTIONS += --enable-oocd-trace
+#
+# Add printer options..
+OPENOCD_CONFIG_OPTIONS += ${OPENOCD_CONFIG_OPTIONS_printer_${X86_PRINTER_PORT}}
+
+# Add the FTD2232 based options.
+OPENOCD_CONFIG_OPTIONS += ${OPENOCD_CONFIG_OPTIONS_ft2232_${FT2232_DRIVER}}
+
+# Add LIBUSB based options.
+OPENOCD_CONFIG_OPTIONS += ${OPENOCD_CONFIG_OPTIONS_libusb_${USE_LIBUSB}}
+
+
+#========================================
+# WARNING... the file on the ftdi chip site has a SPACE in the filename GRRR!!!
+# We fix that with the "-O" option to wget.
+FTD2XX_WIN32_VERSION=2.04.14
+FTD2XX_WIN32_DIR = ${HERE}/ftd2xx.win32
+
+FTD2XX_ZIPFILE_LOCAL=${VIRGINS}/cdm.${FTD2XX_WIN32_VERSION}.zip
+# Damn thing has a space in the F-ing filename!
+FTD2XX_ZIPFILE_URL ="http://www.ftdichip.com/Drivers/CDM/CDM ${FTD2XX_WIN32_VERSION}.zip"
+
+
+#========================================
+# LIBCONFUSE - used by LIBFTDI..
+LIBCONFUSE_VERSION=2.5
+LIBCONFUSE_TARFILE_LOCAL=${VIRGINS}/confuse-${LIBCONFUSE_VERSION}.tar.gz
+LIBCONFUSE_TARFILE_URL =http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/confuse-${LIBCONFUSE_VERSION}.tar.gz
+
+LIBCONFUSE_SRC_DIR =${HERE}/confuse-${LIBCONFUSE_VERSION}
+LIBCONFUSE_BUILD_DIR =${HERE}/confuse-build
+
+
+#========================================
+# LIBFTDI... (which uses libusb, and libconfuse)
+LIBFTDI_VERSION=0.14
+LIBFTDI_TARFILE_LOCAL = ${VIRGINS}/libftdi-${LIBFTDI_VERSION}.tar.gz
+LIBFTDI_TARFILE_URL = http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/libftdi-${LIBFTDI_VERSION}.tar.gz
+
+LIBFTDI_SRC_DIR = ${HERE}/libftdi-${LIBFTDI_VERSION}
+LIBFTDI_BUILD_DIR= ${HERE}/libftdi-build
+
+#========================================
+# Finally - OpenOCD...
+#
+OPENOCD_BUILD_DIR =${HERE}/openocd-build
+OPENOCD_SRC_DIR =${HERE}/openocd
+
+#========================================
+# END ..
+#========================================