Re: [ptxdist] [PATCH] Add lpc21isp package

2011-06-20 Thread Bernhard Walle
* Bernhard Walle  [2011-06-20 10:46]:
> * Bernhard Walle  [2011-06-20 09:57]:
> > * Michael Olbrich  [2011-06-18 10:19]:
> > > 
> > > 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)
> > 
> > Hm ..., I don't understand why. I just re-applied the patch on a clean
> > tarball and it works. Using -p1 patches without '-p1' in the series file
> > should be also ok. Can you check why the patch doesn't apply here.
> 
> Now it's clear. The source code (and the patch) has Windows line
> endings, but git-send-email strips the ^M.  Will play with some git
> options. :)

Didn't find any options. I hope this attached and with gzip compressed
version is okay ...




Regards,
Bernhard


0001-Add-lpc21isp-package.patch.gz
Description: Binary data
-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Add lpc21isp package

2011-06-20 Thread Bernhard Walle
* Bernhard Walle  [2011-06-20 09:57]:
> * Michael Olbrich  [2011-06-18 10:19]:
> > 
> > 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)
> 
> Hm ..., I don't understand why. I just re-applied the patch on a clean
> tarball and it works. Using -p1 patches without '-p1' in the series file
> should be also ok. Can you check why the patch doesn't apply here.

Now it's clear. The source code (and the patch) has Windows line
endings, but git-send-email strips the ^M.  Will play with some git
options. :)


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Add lpc21isp package

2011-06-20 Thread Bernhard Walle
Hi,

* Michael Olbrich  [2011-06-18 10:19]:
> 
> 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)

Hm ..., I don't understand why. I just re-applied the patch on a clean
tarball and it works. Using -p1 patches without '-p1' in the series file
should be also ok. Can you check why the patch doesn't apply here.

> > +$(STATEDIR)/lpc21isp.compile:
> > +   @$(call targetinfo)
> > +   make -C $(LPC21ISP_DIR) CC=$(CROSS_CC) clean
> 
> any special need for this? otherwise don't clean here.

It's a relict from when I packaged the ZIP file which includes a
pre-built binary. Can be removed now.

I will resend a patch with the other remarks applied. Thanks for the
review.

> > +$(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.

Well, it's just from the template ptxdist generates. It's hard to see
at the first place what the default behaviour is, i.e. what can be
removed.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Add lpc21isp package

2011-06-18 Thread Michael Olbrich
On Fri, Jun 17, 2011 at 01:55:00PM +0200, bernh...@bwalle.de wrote:
> From: Bernhard Walle 
> 
> 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 
> ---
>  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 000..2a274b5
> --- /dev/null
> +++ b/patches/lpc21isp-1.79/lpc21isp-fix-arm.diff
> @@ -0,0 +1,24 @@
> +From: Bernhard Walle 
> +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 
> +---
> + 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 000..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 000..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 000..16893a3
> --- /dev/null
> +++ b/rules/lpc21isp.make
> @@ -0,0 +1,84 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2011 by Bernhard Walle 
> +#
> +# 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

[ptxdist] [PATCH] Add lpc21isp package

2011-06-17 Thread bernhard
From: Bernhard Walle 

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 
---
 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 000..2a274b5
--- /dev/null
+++ b/patches/lpc21isp-1.79/lpc21isp-fix-arm.diff
@@ -0,0 +1,24 @@
+From: Bernhard Walle 
+Subject: Fix build on ARM platform with Linux
+
+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 
+---
+ 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 000..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 000..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 000..16893a3
--- /dev/null
+++ b/rules/lpc21isp.make
@@ -0,0 +1,84 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Bernhard Walle 
+#
+# 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)
+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
+   make -C $(LPC21ISP_DIR) CC=$(CROSS_CC)
+   @$(call touch)
+
+# 
+# Install
+# 
+
+$(STATEDIR)/lpc21isp.install:
+   @$(call targetinfo)
+   mkdir -p $(LPC21ISP_PKGDIR)/usr/sbin
+   install -m0755 $(LPC21ISP_DIR)/lpc21isp $(LPC21ISP_PKGDIR)/usr/sbin
+   @$(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 
")
+   @$(call install_fixup, lpc21isp,DESCRIPTION,missing)
+
+   @$(call install_copy, lpc21isp, 0, 0, 0755, -, /usr/sbin/lpc21isp)
+
+   @$(call install_finish, lpc21isp)
+
+   @$(call touch)
+
+# 
+# Clean
+# --