Skip to content

Commit

Permalink
Moved oocd patches to git clone post processing. Fixed openocd compil…
Browse files Browse the repository at this point in the history
…e issues with some additional patches.
  • Loading branch information
esden committed Jan 29, 2012
1 parent 153d4d3 commit 3a70739
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 8 deletions.
36 changes: 36 additions & 0 deletions patches/patch-openocd-automake-fix.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff --git a/src/jtag/drivers/Makefile.am b/src/jtag/drivers/Makefile.am
index 7dbaab2..d421133 100644
--- a/src/jtag/drivers/Makefile.am
+++ b/src/jtag/drivers/Makefile.am
@@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libocdjtagdrivers.la
libocdjtagdrivers_la_SOURCES = \
$(DRIVERFILES)

-nobase_dist_pkglib_DATA =
+nobase_dist_pkgdata_DATA =

ULINK_FIRMWARE = $(srcdir)/OpenULINK

@@ -74,7 +74,7 @@ DRIVERFILES += rlink.c rlink_speed_table.c
endif
if ULINK
DRIVERFILES += ulink.c
-nobase_dist_pkglib_DATA += $(ULINK_FIRMWARE)/ulink_firmware.hex
+nobase_dist_pkgdata_DATA += $(ULINK_FIRMWARE)/ulink_firmware.hex
endif
if VSLLINK
DRIVERFILES += versaloon/usbtoxxx/usbtogpio.c
diff --git a/src/target/Makefile.am b/src/target/Makefile.am
index ab7b3be..7a2279d 100644
--- a/src/target/Makefile.am
+++ b/src/target/Makefile.am
@@ -164,7 +164,7 @@ noinst_HEADERS = \
avr32_mem.h \
avr32_regs.h

-nobase_dist_pkglib_DATA =
-nobase_dist_pkglib_DATA += ecos/at91eb40a.elf
+nobase_dist_pkgdata_DATA =
+nobase_dist_pkgdata_DATA += ecos/at91eb40a.elf

MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
13 changes: 13 additions & 0 deletions patches/patch-openocd-automake-stlink-fix.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/jtag/stlink/Makefile.am b/src/jtag/stlink/Makefile.am
index 09e47fd..fce19ca 100644
--- a/src/jtag/stlink/Makefile.am
+++ b/src/jtag/stlink/Makefile.am
@@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libocdstlink.la
libocdstlink_la_SOURCES = \
$(STLINKFILES)

-nobase_dist_pkglib_DATA =
+nobase_dist_pkgdata_DATA =

STLINKFILES =

13 changes: 13 additions & 0 deletions patches/patch-openocd-bootstrap-fix.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/bootstrap b/bootstrap
index 8a3945e..790f0cd 100755
--- a/bootstrap
+++ b/bootstrap
@@ -21,6 +21,8 @@ elif [ -n "$1" ]; then
exit 1
fi

+mkdir -p jimtcl
+
# bootstrap the autotools
(
set -x
18 changes: 10 additions & 8 deletions summon-arm-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export PATH="${PREFIX}/bin:${PATH}"
SUMMON_DIR=$(pwd)
SOURCES=${SUMMON_DIR}/sources
STAMPS=${SUMMON_DIR}/stamps
PATCHES=${SUMMON_DIR}/patches


##############################################################################
Expand Down Expand Up @@ -278,7 +279,7 @@ function clone {
git checkout -b sat-branch ${GIT_SHA}
if [ "x${POST_CLONE}" != "x" ]; then
log "Running post clone code for ${NAME}-${GIT_SHA} ..."
${POST_CLONE}
eval ${POST_CLONE}
fi
log "Removing .git directory from ${NAME}-${GIT_SHA} ..."
rm -rf .git
Expand Down Expand Up @@ -340,7 +341,11 @@ if [ ${OOCD_EN} != 0 ]; then
if [ "x${OOCD_GIT}" == "x" ]; then
fetch ${OOCD} http://sourceforge.net/projects/openocd/files/openocd/0.5.0/${OOCD}.tar.bz2
else
clone oocd ${OOCD_GIT} git://openocd.git.sourceforge.net/gitroot/openocd/openocd ./bootstrap
clone oocd ${OOCD_GIT} git://openocd.git.sourceforge.net/gitroot/openocd/openocd \
"patch -p1 -i ${PATCHES}/patch-openocd-arm7m-registers.diff ; \
patch -p1 -i ${PATCHES}/patch-openocd-automake-fix.diff ; \
patch -p1 -i ${PATCHES}/patch-openocd-bootstrap-fix.diff ; \
./bootstrap"
fi
fi

Expand Down Expand Up @@ -390,7 +395,7 @@ if [ ! -e ${STAMPS}/${BINUTILS}.build ]; then
unpack ${BINUTILS}
log "Patching binutils to allow SVC support on cortex-m3"
cd ${BINUTILS}
patch -p1 -i ../patches/patch-binutils-2.21.1-svc-cortexm3.diff
patch -p1 -i ${PATCHES}/patch-binutils-2.21.1-svc-cortexm3.diff
cd ..
cd build
log "Configuring ${BINUTILS}"
Expand Down Expand Up @@ -423,8 +428,8 @@ if [ ! -e ${STAMPS}/${GCC}-${NEWLIB}.build ]; then
if [ ${DEFAULT_TO_CORTEX_M3} == 0 ] ; then
log "Patching gcc to add multilib support"
cd ${GCC}
patch -p0 -i ../patches/patch-gcc-config-arm-t-arm-elf.diff
patch -p0 -i ../patches/patch-libgcc-divide-exceptions.diff
patch -p0 -i ${PATCHES}/patch-gcc-config-arm-t-arm-elf.diff
patch -p0 -i ${PATCHES}/patch-libgcc-divide-exceptions.diff
cd ..
fi

Expand Down Expand Up @@ -493,9 +498,6 @@ if [ ${OOCD_EN} != 0 ]; then
if [ ! -e ${STAMPS}/${OOCD}.build ]; then
unpack ${OOCD}
log "Patching binutils to allow SVC support on cortex-m3"
cd ${OOCD}
patch -p1 -i ../../patches/patch-openocd-arm7m-registers.diff
cd ..
cd build
log "Configuring openocd-${OOCD}"
CFLAGS="${CFLAGS} ${OOCD_CFLAGS}" \
Expand Down

0 comments on commit 3a70739

Please sign in to comment.