On Fri, Jun 17, 2011 at 01:55:00PM +0200, [email protected] wrote: > From: Bernhard Walle <[email protected]> > > lpc21isp is a in-circuit programming (ISP) tool for the NXP (Philips) > LPC1300 / LPC1700 / LPC2000 series ARM7 / M0 / M3 microcontrollers. > > Signed-off-by: Bernhard Walle <[email protected]> > --- > patches/lpc21isp-1.79/lpc21isp-fix-arm.diff | 24 ++++++++ > patches/lpc21isp-1.79/series | 1 + > rules/lpc21isp.in | 8 +++ > rules/lpc21isp.make | 84 > +++++++++++++++++++++++++++ > 4 files changed, 117 insertions(+), 0 deletions(-) > create mode 100644 patches/lpc21isp-1.79/lpc21isp-fix-arm.diff > create mode 100644 patches/lpc21isp-1.79/series > create mode 100644 rules/lpc21isp.in > create mode 100644 rules/lpc21isp.make > > diff --git a/patches/lpc21isp-1.79/lpc21isp-fix-arm.diff > b/patches/lpc21isp-1.79/lpc21isp-fix-arm.diff > new file mode 100644 > index 0000000..2a274b5 > --- /dev/null > +++ b/patches/lpc21isp-1.79/lpc21isp-fix-arm.diff > @@ -0,0 +1,24 @@ > +From: Bernhard Walle <[email protected]> > +Subject: Fix build on ARM platform with Linux
patchin: quilt: apply 'ptxdist-git/patches/lpc21isp-1.79/series' Applying patch lpc21isp-fix-arm.diff patching file lpc21isp.h Hunk #1 FAILED at 37. 1 out of 1 hunk FAILED -- rejects in file lpc21isp.h Patch lpc21isp-fix-arm.diff does not apply (enforce with -f) > + > +The lpc21isp developers think that ARM cannot run Linux. This is false, treat > +the ARM/Linux build just as building it on any platform. > + > +Signed-off-by: Bernhard Walle <[email protected]> > +--- > + lpc21isp.h | 4 ---- > + 1 file changed, 4 deletions(-) > + > +--- a/lpc21isp.h > ++++ b/lpc21isp.h > +@@ -37,10 +37,6 @@ Portions Copyright (c) by Aeolus Develop > + #elif defined(__CYGWIN__) > + #define COMPILE_FOR_CYGWIN > + #define COMPILED_FOR "Cygwin" > +-#elif defined(__arm__) || defined(__thumb__) > +-#define COMPILE_FOR_LPC21 > +-#define COMPILED_FOR "ARM" > +-#define printf iprintf > + #elif defined(__APPLE__) > + #define COMPILE_FOR_LINUX > + #define COMPILED_FOR "Apple MacOS X" > diff --git a/patches/lpc21isp-1.79/series b/patches/lpc21isp-1.79/series > new file mode 100644 > index 0000000..23cd858 > --- /dev/null > +++ b/patches/lpc21isp-1.79/series > @@ -0,0 +1 @@ > +lpc21isp-fix-arm.diff > diff --git a/rules/lpc21isp.in b/rules/lpc21isp.in > new file mode 100644 > index 0000000..d1f7efc > --- /dev/null > +++ b/rules/lpc21isp.in > @@ -0,0 +1,8 @@ > +## SECTION=applications > + > +config LPC21ISP > + tristate > + prompt "lpc21isp" > + help > + In-circuit programming (ISP) tool for the NXP (Philips) LPC1300 / > + LPC1700 / LPC2000 series ARM7 / M0 / M3 microcontrollers > diff --git a/rules/lpc21isp.make b/rules/lpc21isp.make > new file mode 100644 > index 0000000..16893a3 > --- /dev/null > +++ b/rules/lpc21isp.make > @@ -0,0 +1,84 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2011 by Bernhard Walle <[email protected]> > +# > +# 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. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_LPC21ISP) += lpc21isp > + > +# > +# Paths and names > +# > +LPC21ISP_VERSION := 1.79 > +LPC21ISP_MD5 := 93cf6b2a35d7e1d96a2887a21a8b2b77 > +LPC21ISP := lpc21isp-$(LPC21ISP_VERSION) > +LPC21ISP_SUFFIX := tar.gz > +LPC21ISP_URL := > $(PTXCONF_SETUP_SFMIRROR)/project/lpc21isp/lpc21isp/$(LPC21ISP_VERSION)/$(LPC21ISP).$(LPC21ISP_SUFFIX) $(PTXCONF_SETUP_SFMIRROR)/lpc21isp/$(LPC21ISP_VERSION)/$(LPC21ISP).$(LPC21ISP_SUFFIX) works too, and is shorter. > +LPC21ISP_SOURCE := $(SRCDIR)/$(LPC21ISP).$(LPC21ISP_SUFFIX) > +LPC21ISP_DIR := $(BUILDDIR)/lpc21isp > +LPC21ISP_LICENSE := GPLv3+ > + > +# > ---------------------------------------------------------------------------- > +# Prepare > +# > ---------------------------------------------------------------------------- > + > +LPC21ISP_CONF_TOOL := NO > +LPC21ISP_MAKE_ENV := $(CROSS_ENV) > + > +# > ---------------------------------------------------------------------------- > +# Compile > +# > ---------------------------------------------------------------------------- > + > +$(STATEDIR)/lpc21isp.compile: > + @$(call targetinfo) > + make -C $(LPC21ISP_DIR) CC=$(CROSS_CC) clean any special need for this? otherwise don't clean here. > + make -C $(LPC21ISP_DIR) CC=$(CROSS_CC) use $(CROSS_ENV_CC) > + @$(call touch) > + > +# > ---------------------------------------------------------------------------- > +# Install > +# > ---------------------------------------------------------------------------- > + > +$(STATEDIR)/lpc21isp.install: > + @$(call targetinfo) > + mkdir -p $(LPC21ISP_PKGDIR)/usr/sbin > + install -m0755 $(LPC21ISP_DIR)/lpc21isp $(LPC21ISP_PKGDIR)/usr/sbin install -D -m0755 $(LPC21ISP_DIR)/lpc21isp $(LPC21ISP_PKGDIR)/usr/sbin/lpc21isp then you can drop the mkdir. > + @$(call touch) > + > +# > ---------------------------------------------------------------------------- > +# Target-Install > +# > ---------------------------------------------------------------------------- > + > +$(STATEDIR)/lpc21isp.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, lpc21isp) > + @$(call install_fixup, lpc21isp,PRIORITY,optional) > + @$(call install_fixup, lpc21isp,SECTION,base) > + @$(call install_fixup, lpc21isp,AUTHOR,"Bernhard Walle > <[email protected]>") > + @$(call install_fixup, lpc21isp,DESCRIPTION,missing) > + > + @$(call install_copy, lpc21isp, 0, 0, 0755, -, /usr/sbin/lpc21isp) > + > + @$(call install_finish, lpc21isp) > + > + @$(call touch) > + > +# > ---------------------------------------------------------------------------- > +# Clean > +# > ---------------------------------------------------------------------------- > + > +$(STATEDIR)/lpc21isp.clean: > + @$(call targetinfo) > + @-cd $(LPC21ISP_DIR) && \ > + $(LPC21ISP_ENV) $(LPC21ISP_PATH) $(MAKE) clean why? clean_pkg removes LPC21ISP_DIR anyways. Just remove the clean stage, to use the default. Michael > + @$(call clean_pkg, LPC21ISP) > + > +# vim: syntax=make > -- > 1.7.5.2 > > > -- > ptxdist mailing list > [email protected] > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list [email protected]
