Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined

2012-03-20 Thread Bernhard Walle
Hi Juergen,

* Juergen Beisert j...@pengutronix.de [2012-03-20 20:28]:
 Bernhard Walle wrote:
  * Juergen Beisert j...@pengutronix.de [2012-03-20 10:09]:
   Just delay the evaluation of the expression to the point of time when it
   is really required.
  
   diff --git a/rules/flashbench.make b/rules/flashbench.make
   index fcb669e..0ef52d1 100644
   --- a/rules/flashbench.make
   +++ b/rules/flashbench.make
   @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE:= GPL v2
  
FLASHBENCH_CONF_TOOL   := NO
FLASHBENCH_MAKE_ENV:= $(CROSS_ENV)
   -FLASHBENCH_MAKE_OPT:= CC=$(CROSS_CC) \
   +FLASHBENCH_MAKE_OPT= CC=$(CROSS_CC) \
   EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* 
   $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
 
  Did you try it out? It doesn't work here.
 
 Yes I did.

Sorry, I had the old (unpatched) flashbench.make in the rules directory
of the project...

Will send a patch that uses '=' instead of ':=' which is ready to be
applied.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected

2012-03-20 Thread Bernhard Walle
When flashbench is not selected in ptxdist menuconfig, then
$(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is undefined. In that case, the expr
call fails.

Fix the problem by delaying the evaluation of FLASHBENCH_MAKE_OPT until
it's really needed, i.e. when flashbench has been selected.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/flashbench.make |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/flashbench.make b/rules/flashbench.make
index fcb669e..0ef52d1 100644
--- a/rules/flashbench.make
+++ b/rules/flashbench.make
@@ -31,7 +31,7 @@ FLASHBENCH_LICENSE:= GPL v2
 
 FLASHBENCH_CONF_TOOL   := NO
 FLASHBENCH_MAKE_ENV:= $(CROSS_ENV)
-FLASHBENCH_MAKE_OPT:= CC=$(CROSS_CC) \
+FLASHBENCH_MAKE_OPT= CC=$(CROSS_CC) \
EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* 
$(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
 
 # 
-- 
1.7.9.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] configure.ac: Check for GNU ar

2012-03-20 Thread Bernhard Walle
Hi Andreas,

* Andreas Bießmann biessm...@corscience.de [2012-03-20 09:37]:
 
 this is annoying, it will require gnu binutils which is not available on
 my mac by default.
 Couldn't we use some approach like
 http://thread.gmane.org/gmane.comp.embedded.ptxdist.devel/8533
 (pachting ipkg to use toolchain provided ar, which should be GNU
 binutils for linux targets).

You're right, GNU ar is not needed. I just had an old patches directory
for opkg... Forget the patch.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] ptxdist: Don't assume that we have a bashrc

2012-03-20 Thread Bernhard Walle
Usually there is one, but don't print an error if there is no one.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 bin/ptxdist |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ptxdist b/bin/ptxdist
index 440a7aa..37ab098 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1656,8 +1656,8 @@ parse_second()
if [ ${#} -eq 0 ]; then
local bashrc=${PTXDIST_TEMPDIR}/bashrc
cat  ${bashrc} EOF
-. /etc/bash.bashrc
-. ~/.bashrc
+[ -r /etc/bash.bashrc ]  . /etc/bash.bashrc
+[ -r ~/.bashrc ]  . ~/.bashrc
 PS1=[ptx] \${PS1}
 PATH=${PATH}
 EOF
-- 
1.7.9.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Fix ptxdist -q kernelconfig without extracted kernel

2012-03-20 Thread Bernhard Walle
Normally if the kernel is not extracted when ptxdist kernelconfig is
called, ptxdist extracts the kernel first. However, when used in quiet
mode, that fails with an error like


bash: -c: line 0: syntax error near unexpected token `;'
bash: -c: line 0: 
`target=/Users/bwalle/devel/ptxdist-arm-boards/platform-beagle/state/kernel.get;
 \
target=${target##*/}; dep=/Volumes/Daten/src/linux-3.3.tar.bz2; 
dep=${dep##*/}; \
echo ${target} : ${dep}  
/Users/bwalle/devel/ptxdist-arm-boards/platform-beagle/state/depend.out; \
echo started : ${target} ; target=target: ${target##*/}; \
echo -e \n${target//?/-}\n${target}\n${target//?/-}\n; 'o


The problem is also there when calling ptxdist kernelconfig from ptxdist 
menu.
This patch attempts to fix the problem.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/post/function-targetinfo.make |3 +++
 rules/post/function-touch.make  |3 +++
 2 files changed, 6 insertions(+)

diff --git a/rules/post/function-targetinfo.make 
b/rules/post/function-targetinfo.make
index f8bcebe..40e119a 100644
--- a/rules/post/function-targetinfo.make
+++ b/rules/post/function-targetinfo.make
@@ -15,6 +15,9 @@
 # Print out the targetinfo line on the terminal
 #
 ifdef PTXDIST_QUIET
+ifndef PTXDIST_FD_STDOUT
+PTXDIST_FD_STDOUT := 1
+endif
 _targetinfo_opt_output := echo started : 
$(PTX_COLOR_BLUE)$${target}$(PTX_COLOR_OFF) $(PTXDIST_FD_STDOUT);
 endif
 
diff --git a/rules/post/function-touch.make b/rules/post/function-touch.make
index 0a7919e..4d8fc28 100644
--- a/rules/post/function-touch.make
+++ b/rules/post/function-touch.make
@@ -13,6 +13,9 @@
 # touch
 #
 ifdef PTXDIST_QUIET
+ifndef PTXDIST_FD_STDOUT
+PTXDIST_FD_STDOUT := 1
+endif
 _touch_opt_output := echo finished: 
$(PTX_COLOR_GREEN)$${target}$(PTX_COLOR_OFF) $(PTXDIST_FD_STDOUT);
 endif
 
-- 
1.7.9.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2] Add flashbench tool

2012-03-15 Thread Bernhard Walle
From: Bernhard Walle wa...@corscience.de

This patch adds the flashbench tool from Linaro Project
git://git.linaro.org/people/arnd/flashbench.git. See also
http://lwn.net/Articles/428584/. Because there is no tarball, I
exported the current git repo and put it on my server.

The default maximum buffer size of 64 MiB (the buffer is allocated 4
times) was too large for my device, so I patched the tool and added an
option in the ptxdist menu.

Tested with a custom OMAP3 board which is similar to the Devkit8000.

Signed-off-by: Bernhard Walle wa...@corscience.de
---
v2: Correct URL (FIXME) in rules/flashbench.in.

 ...o-specify-MAX_BUFSIZE-during-compile-time.patch |   37 +++
 patches/flashbench-20120222/series |4 ++
 rules/flashbench.in|   31 +
 rules/flashbench.make  |   68 
 4 files changed, 140 insertions(+)
 create mode 100644 
patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
 create mode 100644 patches/flashbench-20120222/series
 create mode 100644 rules/flashbench.in
 create mode 100644 rules/flashbench.make

diff --git 
a/patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
 
b/patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
new file mode 100644
index 000..cc9505b
--- /dev/null
+++ 
b/patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
@@ -0,0 +1,37 @@
+From: Bernhard Walle wa...@corscience.de
+Date: Wed, 14 Mar 2012 16:52:47 +0100
+Subject: [PATCH] Allow to specify MAX_BUFSIZE during compile time
+
+The default value of 64 MiB is too large for small embedded systems.
+
+Signed-off-by: Bernhard Walle wa...@corscience.de
+---
+ Makefile |2 +-
+ dev.c|2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8fbd119..01771b0 100644
+--- a/Makefile
 b/Makefile
+@@ -1,5 +1,5 @@
+ CC:= gcc
+-CFLAGS:= -O2 -Wall -Wextra -Wno-missing-field-initializers 
-Wno-unused-parameter -g2
++CFLAGS:= -O2 -Wall -Wextra -Wno-missing-field-initializers 
-Wno-unused-parameter -g2 $(EXTRA_CFLAGS)
+ LDFLAGS := -lrt
+ 
+ all: flashbench erase
+diff --git a/dev.c b/dev.c
+index f1718be..73a9b3f 100644
+--- a/dev.c
 b/dev.c
+@@ -22,7 +22,9 @@
+ 
+ #include dev.h
+ 
++#ifndef MAX_BUFSIZE
+ #define MAX_BUFSIZE (64 * 1024 * 1024)
++#endif
+ 
+ static inline long long time_to_ns(struct timespec *ts)
+ {
diff --git a/patches/flashbench-20120222/series 
b/patches/flashbench-20120222/series
new file mode 100644
index 000..8ac1f19
--- /dev/null
+++ b/patches/flashbench-20120222/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
+# 2284485069f201f5dd31c217b70f51e0  - git-ptx-patches magic
diff --git a/rules/flashbench.in b/rules/flashbench.in
new file mode 100644
index 000..6f44015
--- /dev/null
+++ b/rules/flashbench.in
@@ -0,0 +1,31 @@
+## SECTION=test_suites
+
+config FLASHBENCH
+   tristate
+   prompt flashbench
+   help
+ Identify characteristics of flash media
+
+ This is the tool used to identify the properties of
+ SD cards and other media for the Linaro flash memory
+ survey at [1]. The latest version should be available
+ at [2]. Please also check out the article on lwn.net [3].
+
+ [1] 
https://wiki.linaro.org/WorkingGroups/KernelConsolidation/Projects/FlashCardSurvey
+ [2] git clone git://git.linaro.org/people/arnd/flashbench.git
+ [3] http://lwn.net/Articles/428584/
+
+if FLASHBENCH
+
+config FLASHBENCH_MAX_BUFSIZE
+   string
+   prompt Maximum flashbench buffer size in bytes
+   default 67108864
+   help
+ This is the maximum buffer size flashbench uses during operationg.
+ The buffer gets allocated 4 times, so take that into account when
+ choosing a buffer. The default is 64 MiB.
+
+endif
+
+# vim: set ft=kconfig:
diff --git a/rules/flashbench.make b/rules/flashbench.make
new file mode 100644
index 000..f71f0c8
--- /dev/null
+++ b/rules/flashbench.make
@@ -0,0 +1,68 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Bernhard Walle wa...@corscience.de
+#
+# 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_FLASHBENCH) += flashbench
+
+#
+# Paths and names
+#
+FLASHBENCH_VERSION := 20120222
+FLASHBENCH_MD5 := 3d99608022b50e891e5f66d7c637d8b1
+FLASHBENCH := flashbench-$(FLASHBENCH_VERSION)
+FLASHBENCH_SUFFIX  := tar.gz
+FLASHBENCH_URL := 
http://bwalle.de/programme/$(FLASHBENCH).$(FLASHBENCH_SUFFIX)
+FLASHBENCH_SOURCE  := $(SRCDIR)/$(FLASHBENCH

[ptxdist] [PATCH v3] Add flashbench tool

2012-03-15 Thread Bernhard Walle
From: Bernhard Walle wa...@corscience.de

This patch adds the flashbench tool from Linaro Project
git://git.linaro.org/people/arnd/flashbench.git. See also
http://lwn.net/Articles/428584/. Because there is no tarball, I
exported the current git repo and put it on my server.

The default maximum buffer size of 64 MiB (the buffer is allocated 4
times) was too large for my device, so I patched the tool and added an
option in the ptxdist menu.

Tested with a custom OMAP3 board which is similar to the Devkit8000.

Signed-off-by: Bernhard Walle wa...@corscience.de
---
v3: - Use menuconfig instead of config.
- Change PTXCONF_FLASHBENCH_MAX_BUFSIZE to megabyte.
v2: - Correct URL (FIXME) in rules/flashbench.in.

 ...o-specify-MAX_BUFSIZE-during-compile-time.patch |   37 +++
 patches/flashbench-20120222/series |4 ++
 rules/flashbench.in|   31 +
 rules/flashbench.make  |   68 
 4 files changed, 140 insertions(+)
 create mode 100644 
patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
 create mode 100644 patches/flashbench-20120222/series
 create mode 100644 rules/flashbench.in
 create mode 100644 rules/flashbench.make

diff --git 
a/patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
 
b/patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
new file mode 100644
index 000..cc9505b
--- /dev/null
+++ 
b/patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
@@ -0,0 +1,37 @@
+From: Bernhard Walle wa...@corscience.de
+Date: Wed, 14 Mar 2012 16:52:47 +0100
+Subject: [PATCH] Allow to specify MAX_BUFSIZE during compile time
+
+The default value of 64 MiB is too large for small embedded systems.
+
+Signed-off-by: Bernhard Walle wa...@corscience.de
+---
+ Makefile |2 +-
+ dev.c|2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8fbd119..01771b0 100644
+--- a/Makefile
 b/Makefile
+@@ -1,5 +1,5 @@
+ CC:= gcc
+-CFLAGS:= -O2 -Wall -Wextra -Wno-missing-field-initializers 
-Wno-unused-parameter -g2
++CFLAGS:= -O2 -Wall -Wextra -Wno-missing-field-initializers 
-Wno-unused-parameter -g2 $(EXTRA_CFLAGS)
+ LDFLAGS := -lrt
+ 
+ all: flashbench erase
+diff --git a/dev.c b/dev.c
+index f1718be..73a9b3f 100644
+--- a/dev.c
 b/dev.c
+@@ -22,7 +22,9 @@
+ 
+ #include dev.h
+ 
++#ifndef MAX_BUFSIZE
+ #define MAX_BUFSIZE (64 * 1024 * 1024)
++#endif
+ 
+ static inline long long time_to_ns(struct timespec *ts)
+ {
diff --git a/patches/flashbench-20120222/series 
b/patches/flashbench-20120222/series
new file mode 100644
index 000..8ac1f19
--- /dev/null
+++ b/patches/flashbench-20120222/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
+# 2284485069f201f5dd31c217b70f51e0  - git-ptx-patches magic
diff --git a/rules/flashbench.in b/rules/flashbench.in
new file mode 100644
index 000..e8f09ef
--- /dev/null
+++ b/rules/flashbench.in
@@ -0,0 +1,31 @@
+## SECTION=test_suites
+
+menuconfig FLASHBENCH
+   tristate
+   prompt flashbench
+   help
+ Identify characteristics of flash media
+
+ This is the tool used to identify the properties of
+ SD cards and other media for the Linaro flash memory
+ survey at [1]. The latest version should be available
+ at [2]. Please also check out the article on lwn.net [3].
+
+ [1] 
https://wiki.linaro.org/WorkingGroups/KernelConsolidation/Projects/FlashCardSurvey
+ [2] git clone git://git.linaro.org/people/arnd/flashbench.git
+ [3] http://lwn.net/Articles/428584/
+
+if FLASHBENCH
+
+config FLASHBENCH_MAX_BUFSIZE
+   string
+   prompt Maximum flashbench buffer size in megabytes
+   default 64
+   help
+ This is the maximum buffer size flashbench uses during operationg.
+ The buffer gets allocated 4 times, so take that into account when
+ choosing a buffer. The default is 64 MiB.
+
+endif
+
+# vim: set ft=kconfig:
diff --git a/rules/flashbench.make b/rules/flashbench.make
new file mode 100644
index 000..fcb669e
--- /dev/null
+++ b/rules/flashbench.make
@@ -0,0 +1,68 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Bernhard Walle wa...@corscience.de
+#
+# 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_FLASHBENCH) += flashbench
+
+#
+# Paths and names
+#
+FLASHBENCH_VERSION := 20120222
+FLASHBENCH_MD5 := 3d99608022b50e891e5f66d7c637d8b1
+FLASHBENCH := flashbench-$(FLASHBENCH_VERSION)
+FLASHBENCH_SUFFIX  := tar.gz
+FLASHBENCH_URL

Re: [ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-03-13 Thread Bernhard Walle
* Michael Olbrich m.olbr...@pengutronix.de [2012-03-13 11:14]:
 
 Not the 'local', the whole function. Getting all corner-cases right for
 something like this is not trivial.

Ah, ok. Indeed. That's why I started using something from the
Internet[tm] and that's also why I only replaced that initial
readlink -f call to find the ptxdist directory by the Bash
implementation. The rest should still be (g)readlink -f.

The alternative would be a Perl one-liner or Python. But that would be
add additional requirements.

Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 1/3] Update mtd-utils to 1.4.9

2012-03-13 Thread Bernhard Walle
* Michael Olbrich m.olbr...@pengutronix.de [2012-03-13 10:09]:
  
  flash-info has been dropped in favour to mtdinfo.
 
 An option for mtdinfo already exists.

Indeed, I missed that. But it's in the ubi directory, so I adjusted the
dependencies in Kconfig.

  +++ 
  b/patches/mtd-utils-1.4.9/0003-Makefile-Use-LZOLDFLAGS-when-building-mkfs.ubifs.patch
  @@ -0,0 +1,24 @@
  +From: Bernhard Walle bernh...@bwalle.de
  +Date: Sun, 11 Mar 2012 18:38:20 +0100
  +Subject: [PATCH] Makefile: Use LZOLDFLAGS when building mkfs.ubifs
  +
  +The LZOLDFLAGS variable is used by jffs2 but not by mkfs.ubifs.
 
 Please elaborate why this is needed.

Indeed, that's for upstream. It's not needed as ptxdist patch.
New patch will follow.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/2] Update mtd-utils to 1.4.9

2012-03-13 Thread Bernhard Walle
I had to rework some patches. Parallel build has been fixed upstream due
in commits 5b1cfb9d09a8a40577e79262c6d79dfcde36b1b7 and
05f56bf49ee0de8979c29c11f61a01e30e96, so we should be able to enable
it here.

flash-info has been dropped and mtdinfo should be used instead.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 .../0001-make-liblzo-optional.patch|  107 
 .../0002-make-mkubifs-optional.patch   |   26 -
 patches/mtd-utils-1.4.6/series |2 -
 .../mtd-utils-1.4.9/0001-make-ubifs-optional.patch |   25 +
 ...0002-Make-liblzo-optional-for-ubifs-tools.patch |   55 ++
 patches/mtd-utils-1.4.9/series |6 ++
 rules/host-mtd-utils.make  |2 -
 rules/mtd-utils.in |   10 +-
 rules/mtd-utils.make   |9 +-
 9 files changed, 90 insertions(+), 152 deletions(-)
 delete mode 100644 patches/mtd-utils-1.4.6/0001-make-liblzo-optional.patch
 delete mode 100644 patches/mtd-utils-1.4.6/0002-make-mkubifs-optional.patch
 delete mode 100644 patches/mtd-utils-1.4.6/series
 create mode 100644 patches/mtd-utils-1.4.9/0001-make-ubifs-optional.patch
 create mode 100644 
patches/mtd-utils-1.4.9/0002-Make-liblzo-optional-for-ubifs-tools.patch
 create mode 100644 patches/mtd-utils-1.4.9/series

diff --git a/patches/mtd-utils-1.4.6/0001-make-liblzo-optional.patch 
b/patches/mtd-utils-1.4.6/0001-make-liblzo-optional.patch
deleted file mode 100644
index 00845a1..000
--- a/patches/mtd-utils-1.4.6/0001-make-liblzo-optional.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From: Marc Kleine-Budde m...@pengutronix.de
-Date: Mon, 20 Jul 2009 19:37:09 +0200
-Subject: [PATCH] make liblzo optional
-
-Signed-off-by: Marc Kleine-Budde m...@pengutronix.de

- Makefile|3 ++-
- compr.h |2 ++
- mkfs.ubifs/Makefile |6 +-
- mkfs.ubifs/compr.c  |   17 +
- 4 files changed, 26 insertions(+), 2 deletions(-)
-
-Index: mtd-utils-1.4.6/Makefile
-===
 mtd-utils-1.4.6.orig/Makefile
-+++ mtd-utils-1.4.6/Makefile
-@@ -10,6 +10,7 @@ ifeq ($(WITHOUT_LZO), 1)
-   CPPFLAGS += -DWITHOUT_LZO
- else
-   LZOLDLIBS = -llzo2
-+  JFFS2_COMPR_LZO_O := compr_lzo.o
- endif
- 
- SUBDIRS = lib ubi-utils mkfs.ubifs
-@@ -50,7 +51,7 @@ $(SYMLINKS):
-   ln -sf ../fs/jffs2/$@ $@
- 
- $(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\
--  compr_rtime.o mkfs.jffs2.o compr_zlib.o compr_lzo.o \
-+  compr_rtime.o mkfs.jffs2.o compr_zlib.o $(JFFS2_COMPR_LZO_O) \
-   compr.o rbtree.o)
- LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
- LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
-Index: mtd-utils-1.4.6/compr.h
-===
 mtd-utils-1.4.6.orig/compr.h
-+++ mtd-utils-1.4.6/compr.h
-@@ -18,7 +18,9 @@
- 
- #define CONFIG_JFFS2_ZLIB
- #define CONFIG_JFFS2_RTIME
-+#ifndef WITHOUT_LZO
- #define CONFIG_JFFS2_LZO
-+#endif
- 
- #define JFFS2_RUBINMIPS_PRIORITY 10
- #define JFFS2_DYNRUBIN_PRIORITY  20
-Index: mtd-utils-1.4.6/mkfs.ubifs/Makefile
-===
 mtd-utils-1.4.6.orig/mkfs.ubifs/Makefile
-+++ mtd-utils-1.4.6/mkfs.ubifs/Makefile
-@@ -6,7 +6,11 @@ ALL_SOURCES=*.[ch] hashtable/*.[ch]
- 
- TARGETS = mkfs.ubifs
- 
--LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -L$(BUILDDIR)/../ubi-utils/ -lubi
-+ifneq ($(WITHOUT_LZO), 1)
-+mkfs.ubifs_LIBLZO = -llzo2
-+endif
-+
-+LDLIBS_mkfs.ubifs = -lz $(mkfs.ubifs_LIBLZO) -lm -luuid 
-L$(BUILDDIR)/../ubi-utils/ -lubi
- LDLIBS_mkfs.ubifs += -L$(BUILDDIR)/../lib -lmtd
- LDLIBS_mkfs.ubifs += $(ZLIBLDFLAGS) $(LZOLDFLAGS)
- 
-Index: mtd-utils-1.4.6/mkfs.ubifs/compr.c
-===
 mtd-utils-1.4.6.orig/mkfs.ubifs/compr.c
-+++ mtd-utils-1.4.6/mkfs.ubifs/compr.c
-@@ -24,7 +24,11 @@
- #include stdio.h
- #include stdint.h
- #include string.h
-+#ifndef WITHOUT_LZO
- #include lzo/lzo1x.h
-+#else
-+#define LZO1X_999_MEM_COMPRESS0
-+#endif
- #include linux/types.h
- 
- #define crc32 __zlib_crc32
-@@ -86,6 +90,8 @@ static int zlib_deflate(void *in_buf, si
-   return 0;
- }
- 
-+
-+#ifndef WITHOUT_LZO
- static int lzo_compress(void *in_buf, size_t in_len, void *out_buf,
-   size_t *out_len)
- {
-@@ -103,6 +109,17 @@ static int lzo_compress(void *in_buf, si
- 
-   return 0;
- }
-+#else
-+static inline int lzo_compress(void *in_buf, size_t in_len, void *out_buf,
-+  size_t *out_len)
-+{
-+  (void)in_buf;
-+  (void)in_len;
-+  (void)out_buf;
-+  (void)out_len;
-+  return -1;
-+}
-+#endif
- 
- static int no_compress(void *in_buf, size_t in_len, void *out_buf,
-  size_t *out_len)
diff --git a/patches/mtd-utils-1.4.6/0002-make-mkubifs-optional.patch 
b/patches/mtd-utils-1.4.6

[ptxdist] [PATCH 2/2] mtd-utils.in: Add busybox dependencies

2012-03-13 Thread Bernhard Walle
Some tools that mtd-utils provide can be also provided by busybox. Add
the dependencies here as done in other configuration files to prevent
the user from misconfiguration.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/mtd-utils.in |   28 
 1 file changed, 28 insertions(+)

diff --git a/rules/mtd-utils.in b/rules/mtd-utils.in
index 87396f9..b12d5f9 100644
--- a/rules/mtd-utils.in
+++ b/rules/mtd-utils.in
@@ -49,9 +49,13 @@ config MTD_UTILS_FLASH_ERASEALL
 config MTD_UTILS_FLASH_LOCK
bool
prompt flash_lock
+   depends on !BUSYBOX_FLASH_LOCK || ALLYES
help
  This utility locks one or more sectors of flash device.
 
+comment busybox' flash_lock is selected!
+   depends on BUSYBOX_FLASH_LOCK
+
 config MTD_UTILS_FLASH_OTP_DUMP
bool
prompt flash_otp_dump
@@ -67,15 +71,23 @@ config MTD_UTILS_FLASH_OTP_INFO
 config MTD_UTILS_FLASH_UNLOCK
bool
prompt flash_unlock
+   depends on !BUSYBOX_FLASH_UNLOCK || ALLYES
help
  This utility unlock all sectors of flash device.
 
+comment busybox' flash_unlock is selected!
+   depends on BUSYBOX_FLASH_UNLOCK
+
 config MTD_UTILS_FLASHCP
bool
prompt flashcp
+   depends on !BUSYBOX_FLASHCP || ALLYES
help
  Flash Copy - Written by Abraham van der Merwe
 
+comment busybox' flashcp is selected!
+   depends on BUSYBOX_FLASHCP
+
 config MTD_UTILS_FTL_CHECK
bool
prompt ftl_check
@@ -120,10 +132,14 @@ config MTD_UTILS_MTDDEBUG
 config MTD_UTILS_NANDDUMP
bool
prompt nanddump
+   depends on !BUSYBOX_NANDDUMP || ALLYES
help
  This utility dumps the contents of raw NAND chips or NAND
  chips contained in DoC devices.
 
+comment busybox' nanddump is selected!
+   depends on BUSYBOX_NANDDUMP
+
 config MTD_UTILS_NANDTEST
bool
prompt nandtest
@@ -133,11 +149,15 @@ config MTD_UTILS_NANDTEST
 config MTD_UTILS_NANDWRITE
bool
prompt nandwrite
+   depends on !BUSYBOX_NANDWRITE || ALLYES
help
  This utility writes a binary image directly to a NAND flash
  chip or NAND chips contained in DoC devices. This is the
  inverse operation of nanddump.
 
+comment busybox' nandwrite is selected!
+   depends on BUSYBOX_NANDWRITE
+
 config MTD_UTILS_NFTL_FORMAT
bool
prompt nftl_format
@@ -200,9 +220,13 @@ if MTD_UTILS_UBI_UTILS
 config MTD_UTILS_UBIATTACH
bool
prompt ubiattach
+   depends on !BUSYBOX_UBIATTACH || ALLYES
help
  Attach an ubi device to a mtd device
 
+comment busybox' ubiattach is selected!
+   depends on BUSYBOX_UBIATTACH
+
 config MTD_UTILS_UBICRC32
bool
prompt ubicrc32
@@ -212,9 +236,13 @@ config MTD_UTILS_UBICRC32
 config MTD_UTILS_UBIDETACH
bool
prompt ubidetach
+   depends on !BUSYBOX_UBIDETACH || ALLYES
help
  Detach an ubi device from a mtd device
 
+comment busybox' ubidetach is selected!
+   depends on BUSYBOX_UBIDETACH
+
 config MTD_UTILS_UBIFORMAT
bool
select GCCLIBS_GCC_S
-- 
1.7.9.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-03-12 Thread Bernhard Walle
Hi Michael,

thanks again for the review.

* Michael Olbrich m.olbr...@pengutronix.de [2012-02-14 23:05]:
  +# bash implementation of realpath / readlink -f
  +#   arg1 - filename
  +realpath()
  +{
  +   local fname oldfname
  +
 
 hmmm, scary.

What's wrong about 'local'?

 Another idea: Is the problem that readlink -f does not work or does
 readlink not exist at all? Any readlink implementations should work here
 for fname=$(readlink ${fname}).

You're right. Even Apple adds a working readlink implementation. :)

  +   if [ $fname = . ] ; then
  +   fname=$(dirname $oldfname)
  +   elif echo $fname | grep -vq '^/' - ; then
 
   elif [ ${fname} -eq ${fname#/} ]; then

-eq is only for numeric comparison, so it should be '=', right?

   ( cd $(dirname ${fname})
 
  +   fname=$(pwd -P)/$(basename $fname)
 
   )

Assigning a variable in a subshell has no effect on the outer shell, has
it? But echo'ing directly here works.

A reworked version will follow.



Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/2] Makefile.in: Create symlink for xargs

2012-03-12 Thread Bernhard Walle
We check for a xargs binary that supports the '-r' flag, so put the
usual symlink into the bin directory once we have found a proper
implementation.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 Makefile.in |1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.in b/Makefile.in
index b976a3f..e62a2d9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -56,6 +56,7 @@ environment:
@ln -sf @GNU_tar@ $(abs_srcdir)/bin/tar
@ln -sf @PYTHON@ $(abs_srcdir)/bin/python
@ln -sf @SED@ $(abs_srcdir)/bin/sed
+   @ln -sf @XARGS@ $(abs_srcdir)/bin/xargs
@echo  done
 
 clean:
-- 
1.7.9.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 2/2] ptxdist: Check for GNU readlink

2012-03-12 Thread Bernhard Walle
ptxdist heavily uses readlink -f which only works with GNU readlink.
So add the usual check here.

However, because readlink -f is also used before the symlinks in the
ptxdist directory is added to the PATH, that readlink -f call is
replaced by a bash-only implementation. This one is inspired from
http://mailman.archlinux.org/pipermail/pacman-dev/2009-February/008130.html.

Tested on Mac OS 10.7.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 Makefile.in  |1 +
 bin/ptxdist  |   22 +-
 configure.ac |1 +
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index e62a2d9..17a6ce6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -54,6 +54,7 @@ environment:
@ln -sf @GNU_stat@ $(abs_srcdir)/bin/stat
@ln -sf @GNU_mknod@ $(abs_srcdir)/bin/mknod
@ln -sf @GNU_tar@ $(abs_srcdir)/bin/tar
+   @ln -sf @GNU_readlink@ $(abs_srcdir)/bin/readlink
@ln -sf @PYTHON@ $(abs_srcdir)/bin/python
@ln -sf @SED@ $(abs_srcdir)/bin/sed
@ln -sf @XARGS@ $(abs_srcdir)/bin/xargs
diff --git a/bin/ptxdist b/bin/ptxdist
index eb3366a..7636187 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1843,6 +1843,26 @@ EOF
  setup stuff only 
 ##
 
+#
+# bash implementation of realpath / readlink -f
+#   arg1 - filename
+realpath()
+{
+   local fname oldfname
+
+   fname=${1%/} # strips trailing '/'
+   while [ -L ${fname} ]; do
+   oldfname=${fname}
+   fname=$(readlink ${fname})
+   if [ $fname = . ] ; then
+   fname=$(dirname $oldfname)
+   elif [ ${fname} = ${fname#/} ]; then
+   fname=$(dirname ${oldfname})/${fname}
+   fi
+   done
+
+   (cd $(dirname ${fname}); echo $(pwd -P)/$(basename ${fname}))
+}
 
 #
 # figure out PTXDIST_TOPDIR
@@ -1859,7 +1879,7 @@ EOF
 setup_topdir() {
local ptxdist topdir
 
-   ptxdist=$(readlink -f ${0}) 
+   ptxdist=$(realpath ${0}) 
topdir=$(cd $(dirname ${ptxdist})/..  pwd) || return
 
#
diff --git a/configure.ac b/configure.ac
index 37a01ae..780bf28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,6 +155,7 @@ GNU_TOOL(mkdir, coreutils)
 GNU_TOOL(install, coreutils)
 GNU_TOOL(stat, coreutils)
 GNU_TOOL(mknod, coreutils)
+GNU_TOOL(readlink, coreutils)
 GNU_TOOL(tar, tar)
 
 dnl Check for egrep
-- 
1.7.9.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] How to patch a rule file

2012-02-29 Thread Bernhard Walle
Am 24.02.12 18:20, schrieb Robert Palmer:
 I've searched the archives (unfortunately patch is VERY common) 
 and I read the How to become a PTXdist Guru from the pengutronix 
 web site.  In section 4.1.2 patch series, it gives an overview of 
 patching and it then list the search order, giving FOUR cases.  
 The last case is bug fixing and it goes on to describe that this 
 case is intended for patching rules in the PTXdist rule files.  
 This is EXACTLY what I need to do, unfortunately, that's the last 
 thing is says about this case.
 
 specifically, I'm using ptxdist-2010.08.0 and GNU Make v3.82.
 I'm trying to build the OSELAS toolchain, so I'm working with 
 that as the project directory
 
 in the ptxdist rules there is apache2.make which needs to be
 patched to run under Make v3.82 (there is a missing line 
 continuation character)
 
 I have tried building a patch in my toolchain (project) /patches folder 
 
 a) naming the patch folder (package) 'apache2'  
-- matching the rule name found in ptxdist/rules
 b) naming the folder 'httpd-2.0.58'
-- matching the package name as described in the rule makefile

You can't patch the rules file. Just copy it to your project, it
overwrites the default one.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] Not reproducable bugs on compiling OSELAS Toolchain

2012-02-26 Thread Bernhard Walle
Hi,

* Andreas Bießmann andr...@biessmann.de [2012-02-25 09:21]:
 
 Next you will need some GNU tools like coreutils [1], gawk [2], sed [3],
 tar [4], flex [5] and bison/yacc [6]. Remaining requirements of ptxdist
 should be sufficient by OS X delivered software.

flex and bison can be used from Apple (at least I have /usr/bin/flex and
/usr/bin/bison in my $PATH). You also need 'md5sum' (macports has the
'md5sha1sum' package). And also GNU ar because of the 'f' option, but I
want to check if it's really needed before sending a patch to check for
GNU ar.

 If you got the required tools you can start using ptxdist source to
 build it for your host. There comes another requirement to mind while
 writing this. You will need ncurses[9] for building the kconf tools in
 ptxdist. Ptxdists configure will search the required tools and complain
 about missing ones.

I'm not sure if the ncurses from Apple is sufficient, but at least
/usr/lib/libncuses.dylib is there. Apart from building kconfig, ptxdist
uses its own host-ncurses, though.

 Bernhard Walle started a generic arm bsp [10] (targeted on beagle-board
 and clones). He uses ptxdist with OS X too, therefore this is a good
 place to go for OS X adoptions of ptxdist bsp.

I would have called it 'playground'. :) I just checked that it builds
with ptxdist-2012.02 without any additional patches.

The only remaining patch that is in the queue of Michael is the
localedef stuff. If you need it now, you can take it from
https://bitbucket.org/bwalle/localedef/overview (darwin-fixes branch)
or as patch from
https://bitbucket.org/bwalle/ptxdist-vetero/src/770a9a83af73/patches/localedef-eglibc-2.11.90-ptx1.

Please note that the ptxdist-vetero project doesn't build currently on
Mac OS because of the mtd tools. I need to fix that when I have time.
('ptxdist go' works but 'ptxdist images' will fail.)



Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] configure.ac: Check for GNU mknod

2012-02-26 Thread Bernhard Walle
We need that because scripts/lib/ptxd_make_xpkg_pkg.sh uses the -m
parameter of mknod which doesn't exist in BSD mknod.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 Makefile.in  |1 +
 configure.ac |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index e8544d1..0c05294 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -52,6 +52,7 @@ environment:
@ln -sf @GNU_mkdir@ $(abs_srcdir)/bin/mkdir
@ln -sf @GNU_install@ $(abs_srcdir)/bin/install
@ln -sf @GNU_stat@ $(abs_srcdir)/bin/stat
+   @ln -sf @GNU_mknod@ $(abs_srcdir)/bin/mknod
@ln -sf @PYTHON@ $(abs_srcdir)/bin/python
@ln -sf @SED@ $(abs_srcdir)/bin/sed
@ln -sf @TAR@ $(abs_srcdir)/bin/tar
diff --git a/configure.ac b/configure.ac
index 00c2521..ca06879 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,6 +152,7 @@ GNU_COREUTILS(md5sum)
 GNU_COREUTILS(mkdir)
 GNU_COREUTILS(install)
 GNU_COREUTILS(stat)
+GNU_COREUTILS(mknod)
 
 dnl Check for egrep
 AC_PROG_EGREP
-- 
1.7.9


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] configure.ac: Check for GNU tar

2012-02-26 Thread Bernhard Walle
ptxd_make_world_extract uses the option --remove-files which is a GNU
extension to tar.

Because GNU tar is not in GNU coreutils, I changed the GNU_COREUTILS
macro to GNU_TOOL and added a second parameter: the package where the
tool is found. I think that's better than providing a new macro just for
GNU tar.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 Makefile.in  |2 +-
 configure.ac |   41 +++--
 2 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 0c05294..b976a3f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -53,9 +53,9 @@ environment:
@ln -sf @GNU_install@ $(abs_srcdir)/bin/install
@ln -sf @GNU_stat@ $(abs_srcdir)/bin/stat
@ln -sf @GNU_mknod@ $(abs_srcdir)/bin/mknod
+   @ln -sf @GNU_tar@ $(abs_srcdir)/bin/tar
@ln -sf @PYTHON@ $(abs_srcdir)/bin/python
@ln -sf @SED@ $(abs_srcdir)/bin/sed
-   @ln -sf @TAR@ $(abs_srcdir)/bin/tar
@echo  done
 
 clean:
diff --git a/configure.ac b/configure.ac
index ca06879..37a01ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,26 +133,29 @@ case $SED_VERSION in
 esac
 AC_MSG_RESULT([$SED_VERSION])
 
-dnl check for gnu coreutils
-AC_DEFUN([GNU_COREUTILS],
-   [AC_CACHE_CHECK([for $1 from GNU coreutils], [ac_cv_path_gnu_$1],
+dnl check for gnu tools
+dnl   $1: tool to search for
+dnl   $2: package where the tool is (e.g. 'coreutils')
+AC_DEFUN([GNU_TOOL],
+   [AC_CACHE_CHECK([for GNU $1], [ac_cv_path_gnu_$1],
[AC_PATH_PROGS_FEATURE_CHECK([gnu_$1], [g$1 $1.gnu $1],
-   [[out=`$ac_path_gnu_$1 --version 2/dev/null | $SED -ne 
s/.*\(GNU\) coreutils.*/\1/p`
+   [[out=`$ac_path_gnu_$1 --version 2/dev/null | $SED -ne 
s/.*\(GNU\) $2.*/\1/p`
test x$out = xGNU  
ac_cv_path_gnu_$1=$ac_path_gnu_$1 ac_path_gnu_$1_found=:]],
-   [AC_MSG_ERROR([could not find $1 from GNU 
coreutils])])])
+   [AC_MSG_ERROR([could not find GNU $1])])])
AC_SUBST([GNU_$1], [$ac_cv_path_gnu_$1])])
 
-GNU_COREUTILS(chmod)
-GNU_COREUTILS(chown)
-GNU_COREUTILS(mv)
-GNU_COREUTILS(cp)
-GNU_COREUTILS(rm)
-GNU_COREUTILS(rmdir)
-GNU_COREUTILS(md5sum)
-GNU_COREUTILS(mkdir)
-GNU_COREUTILS(install)
-GNU_COREUTILS(stat)
-GNU_COREUTILS(mknod)
+GNU_TOOL(chmod, coreutils)
+GNU_TOOL(chown, coreutils)
+GNU_TOOL(mv, coreutils)
+GNU_TOOL(cp, coreutils)
+GNU_TOOL(rm, coreutils)
+GNU_TOOL(rmdir, coreutils)
+GNU_TOOL(md5sum, coreutils)
+GNU_TOOL(mkdir, coreutils)
+GNU_TOOL(install, coreutils)
+GNU_TOOL(stat, coreutils)
+GNU_TOOL(mknod, coreutils)
+GNU_TOOL(tar, tar)
 
 dnl Check for egrep
 AC_PROG_EGREP
@@ -261,12 +264,6 @@ if test -z $WGET; then
AC_MSG_ERROR([wget could not be found, please install])
 fi
 
-dnl Check for tar
-AC_PATH_PROGS(TAR, tar,, $PATH)
-if test -z $TAR; then
-   AC_MSG_ERROR([tar could not be found, please install])
-fi
-
 dnl Check for dirname
 AC_PATH_PROGS(DIRNAME, dirname,, $PATH)
 if test -z $DIRNAME; then
-- 
1.7.9


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] lpc21isp: Update to 1.83

2012-02-14 Thread Bernhard Walle
* Michael Olbrich m.olbr...@pengutronix.de [2012-02-14 09:11]:
 On Tue, Feb 07, 2012 at 06:00:06PM +0100, bernh...@bwalle.de wrote:
  From: Bernhard Walle wa...@corscience.de
  
  I don't know why the name of the tarball is completely different and I
  also don't know why the tarball doesn't contain a directory. That's
  upstream.
  
  At least the program builds and works correctly.
 
 I cannot apply this. There are some line-end issues with it.
 Please resend.

Ah yes, I remember, the line endings. :(

Here as gzip'd attachment.


Regards,
Bernhard


0001-lpc21isp-Update-to-1.83.patch.gz
Description: Binary data
-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-02-14 Thread Bernhard Walle
ptxdist heavily uses readlink -f which only works with GNU readlink.
So add the usual check here.

However, because readlink -f is also used before the symlinks in the
ptxdist directory is added to the PATH, that readlink -f call is
replaced by a bash-only implementation. This one is copied from
http://mailman.archlinux.org/pipermail/pacman-dev/2009-February/008130.html.

Tested on Mac OS 10.7.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 Makefile.in  |1 +
 bin/ptxdist  |   25 -
 configure.ac |1 +
 3 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index e8544d1..2181608 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -55,6 +55,7 @@ environment:
@ln -sf @PYTHON@ $(abs_srcdir)/bin/python
@ln -sf @SED@ $(abs_srcdir)/bin/sed
@ln -sf @TAR@ $(abs_srcdir)/bin/tar
+   @ln -sf @READLINK@ $(abs_srcdir)/bin/readlink
@echo  done
 
 clean:
diff --git a/bin/ptxdist b/bin/ptxdist
index eb3366a..9355b1f 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1843,6 +1843,29 @@ EOF
  setup stuff only 
 ##
 
+#
+# bash implementation of realpath / readlink -f
+#   arg1 - filename
+realpath()
+{
+   local fname oldfname
+
+   fname=${1%/} # strips trailing '/'
+   while [ -L $fname ]; do
+   oldfname=$fname
+   fname=$(command ls -l $fname)
+   fname=${fname#*\ }
+   if [ $fname = . ] ; then
+   fname=$(dirname $oldfname)
+   elif echo $fname | grep -vq '^/' - ; then
+   fname=$(dirname $oldfname)/$fname
+   fi
+   done
+   pushd $(dirname $fname)  /dev/null
+   fname=$(pwd -P)/$(basename $fname)
+   popd  /dev/null
+   echo $fname
+}
 
 #
 # figure out PTXDIST_TOPDIR
@@ -1859,7 +1882,7 @@ EOF
 setup_topdir() {
local ptxdist topdir
 
-   ptxdist=$(readlink -f ${0}) 
+   ptxdist=$(realpath ${0}) 
topdir=$(cd $(dirname ${ptxdist})/..  pwd) || return
 
#
diff --git a/configure.ac b/configure.ac
index 00c2521..497441c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,6 +152,7 @@ GNU_COREUTILS(md5sum)
 GNU_COREUTILS(mkdir)
 GNU_COREUTILS(install)
 GNU_COREUTILS(stat)
+GNU_COREUTILS(readlink)
 
 dnl Check for egrep
 AC_PROG_EGREP
-- 
1.7.9


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 3/3] Fix build without gettext

2012-02-12 Thread Bernhard Walle
The build system checks for gettext and if it doesn't find it, it uses
empty definitions for _(). However, localedef.c uses gettext() directly
on some places and calls textdomain(). Add two empty definitions in
libintl.h so that no liker errors are generated when linking gettext.

This patch is useful for systems without gettext in the default
installation like Darwin.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 include/libintl.h |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/libintl.h b/include/libintl.h
index 096aa8c..a8d33dd 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -13,3 +13,11 @@
 #ifndef _libc_intl_domainname
 #define _libc_intl_domainname libc
 #endif
+
+#ifndef gettext
+#define gettext(X) (X)
+#endif
+
+#ifndef textdomain
+#define textdomain(X)
+#endif
-- 
1.7.9


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] u-boot: Allow copying of u-boot SPL to images

2012-02-12 Thread Bernhard Walle
This patch adds two options:

 1) U_BOOT_INSTALL_MLO copies the MLO (u-boot SPL which replaces
x-loader for OMAP CPUs) to the images directory.
 2) U_BOOT_INSTALL_U_BOOT_IMG copies u-boot.img in addition to the
u-boot binary because u-boot SPL expects the u-boot.img (which
contains an additional u-boot header) on a SD card.

Because of the file name conflict, U_BOOT_INSTALL_MLO is only selectable
when x-loader is not built.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 platforms/u-boot.in |   19 +++
 rules/u-boot.make   |6 ++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index 86f0703..1cac07b 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -60,5 +60,24 @@ config U_BOOT_INSTALL_ELF
help
  Installing the U-Boot ELF binary into platform image directory.
 
+config U_BOOT_INSTALL_MLO
+   prompt install MLO
+bool
+   depends on !X_LOAD
+   help
+ Installing the U-Boot SPL (MLO) binary needed for OMAP CPUs into 
platform
+ image directory.
+
+if U_BOOT_INSTALL_MLO
+
+config U_BOOT_INSTALL_U_BOOT_IMG
+   prompt install u-boot.img
+bool
+   help
+ Installing the u-boot image with header (u-boot.img) which is 
executed
+ by u-boot SPL (MLO) into platform image directory.
+
+endif
+
 endif
 
diff --git a/rules/u-boot.make b/rules/u-boot.make
index bee7faf..36760ee 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -70,6 +70,12 @@ endif
 ifdef PTXCONF_U_BOOT_INSTALL_ELF
@install -D -m644 $(U_BOOT_DIR)/u-boot $(IMAGEDIR)/u-boot.elf
 endif
+ifdef PTXCONF_U_BOOT_INSTALL_MLO
+   @install -D -m644 $(U_BOOT_DIR)/MLO $(IMAGEDIR)/MLO
+endif
+ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_IMG
+   @install -D -m644 $(U_BOOT_DIR)/u-boot.img $(IMAGEDIR)/u-boot.img
+endif
@$(call touch)
 
 # 
-- 
1.7.9


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Update kexec-tools to 2.0.3

2012-02-11 Thread Bernhard Walle
The patches are obsolete as they are mainline. Verified on a NSLU2
(xscale-arm) little endian board/configuration.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 .../0001-revert-toolchain-problem.patch|  313 
 ...uild-Pass-no-undefined-as-a-linker-option.patch |   29 --
 patches/kexec-tools-2.0.2/series   |2 -
 rules/kexec-tools.make |6 +-
 4 files changed, 3 insertions(+), 347 deletions(-)
 delete mode 100644 
patches/kexec-tools-2.0.2/0001-revert-toolchain-problem.patch
 delete mode 100644 
patches/kexec-tools-2.0.2/0002-build-Pass-no-undefined-as-a-linker-option.patch
 delete mode 100644 patches/kexec-tools-2.0.2/series

diff --git a/patches/kexec-tools-2.0.2/0001-revert-toolchain-problem.patch 
b/patches/kexec-tools-2.0.2/0001-revert-toolchain-problem.patch
deleted file mode 100644
index fa0702c..000
--- a/patches/kexec-tools-2.0.2/0001-revert-toolchain-problem.patch
+++ /dev/null
@@ -1,313 +0,0 @@
-commit dbe1163152ef6fca2a1bd22e11e219f58fd40c08
-Author: Maxim Uvarov muva...@gmail.com
-Date:   Mon Sep 6 19:03:22 2010 +0400
-
-Revert powerpc new toolchains fix (crt.S)
-
-This reverts commit 45e8f29639d9f97b74389e5bd28c7a5cccbf3e2a.
-purgatory/arch/ppc/crt.S and purgatory/arch/ppc/misc.S are the same
-files.
-Signed-off-by: Maxim Uvarov muva...@gmail.com
-Signed-off-by: Simon Horman ho...@verge.net.au
-
-diff --git a/configure.ac b/configure.ac
-index 7f6acc6..2960c25 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -159,15 +159,6 @@ if test $with_xen = yes ; then
-   AC_MSG_NOTICE([Xen support disabled])))
- fi
- 
--dnl new toolchains
--if test $ARCH = ppc; then
--AC_ARG_WITH([oldtoolchain],
--  AC_HELP_STRING([--with-oldtoolchain],[compile without crt.S
--  required for new toolchains]),
--  AC_DEFINE(PPC_OLDTOOLCHAIN, 1,
--  [Define to compile with old toolchains]))
--fi
--
- dnl ---Sanity checks
- if test $CC  = no; then AC_MSG_ERROR([cc not found]); fi
- if test $CPP = no; then AC_MSG_ERROR([cpp not found]); fi
-diff --git a/purgatory/arch/ppc/Makefile b/purgatory/arch/ppc/Makefile
-index 4020778..72289a0 100644
 a/purgatory/arch/ppc/Makefile
-+++ b/purgatory/arch/ppc/Makefile
-@@ -6,7 +6,6 @@ ppc_PURGATORY_SRCS += purgatory/arch/ppc/v2wrap_32.S
- ppc_PURGATORY_SRCS += purgatory/arch/ppc/misc.S
- ppc_PURGATORY_SRCS += purgatory/arch/ppc/purgatory-ppc.c
- ppc_PURGATORY_SRCS += purgatory/arch/ppc/console-ppc.c
--ppc_PURGATORY_SRCS += purgatory/arch/ppc/crt.S
- 
- dist += purgatory/arch/ppc/Makefile $(ppc_PURGATORY_SRCS) \
-   purgatory/arch/ppc/purgatory-ppc.h purgatory/arch/ppc/ppc_asm.h
-diff --git a/purgatory/arch/ppc/crt.S b/purgatory/arch/ppc/crt.S
-deleted file mode 100644
-index 70f4d61..000
 a/purgatory/arch/ppc/crt.S
-+++ /dev/null
-@@ -1,263 +0,0 @@
--/* This is from linux-2.6/arch/powerpc/lib/crtsavres.S:
-- *
-- * Special support for eabi and SVR4
-- *
-- *   Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
-- *   Copyright 2008 Freescale Semiconductor, Inc.
-- *   Written By Michael Meissner
-- *
-- * Based on gcc/config/rs6000/crtsavres.asm from gcc
-- *
-- * This file is free software; you can redistribute it and/or modify it
-- * under the terms of the GNU General Public License as published by the
-- * Free Software Foundation; either version 2, or (at your option) any
-- * later version.
-- *
-- * In addition to the permissions in the GNU General Public License, the
-- * Free Software Foundation gives you unlimited permission to link the
-- * compiled version of this file with other programs, and to distribute
-- * those programs without any restriction coming from the use of this
-- * file.  (The General Public License restrictions do apply in other
-- * respects; for example, they cover modification of the file, and
-- * distribution when not linked into another program.)
-- *
-- * This file is distributed in the hope that it will be useful, but
-- * WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-- * General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; see the file COPYING.  If not, write to
-- * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-- * Boston, MA 02110-1301, USA.
-- *
-- *As a special exception, if you link this library with files
-- *compiled with GCC to produce an executable, this does not cause
-- *the resulting executable to be covered by the GNU General Public 
License.
-- *This exception does not however invalidate any other reasons why
-- *the executable file might be covered by the GNU General Public License.
-- */
--#include config.h
--
--/* On PowerPC64 Linux, these functions are provided

Re: [ptxdist] [PATCH] host-localedef: Fix on Darwin

2012-02-07 Thread Bernhard Walle
* Michael Olbrich m.olbr...@pengutronix.de [2012-02-07 15:46]:
 On Sun, Jan 22, 2012 at 12:29:48AM +0100, Bernhard Walle wrote:
  This patch is by far the most ugly part of all of the Darwin patches.
  At least the md5sum of a locale-archive when generating a de_DE.UTF-8
  locale is identical...
  
  A first review, please.
 
 We're creating the localedef package anyway, so I'd like to create a new
 tarball with all the paches included.
 I've pushed my current WIP to git://git.pengutronix.de/git/mol/localedef.git
 please test. This contains most of your patches (or modified versions). For
 the gettext stuff: we already have getttext-dummy package[1]. We can create
 a host-getttext-dummy package from that.

Ah, ok, thanks. Currently I'm reworking my patches but I didn't have
time to finish it and post it... Expect something at the end of the
week.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] zlib: Fix build on non-Linux hosts

2012-02-05 Thread Bernhard Walle
The build system of zlib uses 'uname' to determine the operating system
for which it compiles zlib. However, on non-Linux hosts, this leads to
wrong results.

Fixes Darwin (tested on Mac OS 10.7 Lion), doesn't break Linux (verified
with current Arch Linux on x86_64).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
I think that one is okay but just got lost, right?

 rules/zlib.make |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/rules/zlib.make b/rules/zlib.make
index 0d437e3..e51fe8a 100644
--- a/rules/zlib.make
+++ b/rules/zlib.make
@@ -47,7 +47,8 @@ ZLIB_CONF_ENV := \
 # autoconf
 #
 ZLIB_AUTOCONF := \
-   --prefix=/usr
+   --prefix=/usr \
+   --uname=Linux
 
 ifdef PTXCONF_ZLIB_STATIC
 ZLIB_AUTOCONF += --static
-- 
1.7.9


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion

2012-02-02 Thread Bernhard Walle
Since I switched to make 3.82 on my Mac (from MacPorts), ptxdist
images didn't produce any images. I compared the output of make
--debug=all with a working one (from make 3.81 that comes from Apple)
and one difference was the order in reading includes Makefiles.

With make 3.82, the wildcard command doesn't sort any more. See
https://bugzilla.redhat.com/show_bug.cgi?id=635607. This small fix
fixed the issue for me.

Don't ask my why this doesn't show up on Linux. Maybe the return values
of some library function that is make using internally is already
sorted. I have no clue.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/other/Toplevel.make |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make
index 35c2c27..85ad515 100644
--- a/rules/other/Toplevel.make
+++ b/rules/other/Toplevel.make
@@ -39,7 +39,7 @@ include $(PTX_MAP_ALL_MAKE)
 include $(RULESDIR)/other/Namespace.make
 
 # might be non existent
-include $(wildcard $(addsuffix /*.make,$(call reverse,$(subst 
:,$(space),$(PTXDIST_PATH_PRERULES)
+include $(foreach dir, $(call reverse,$(subst 
:,$(space),$(PTXDIST_PATH_PRERULES))), $(sort $(wildcard $(dir)/*.make)))
 
 include $(PTX_DGEN_DEPS_PRE)
 include $(PTX_DGEN_RULESFILES_MAKE)
@@ -95,7 +95,7 @@ PTX_PACKAGES_INSTALL  := \
$(PACKAGES-b)
 
 # might be non existent
-include $(wildcard $(addsuffix /*.make,$(call reverse,$(subst 
:,$(space),$(PTXDIST_PATH_POSTRULES)
+include $(foreach dir, $(call reverse,$(subst 
:,$(space),$(PTXDIST_PATH_POSTRULES))), $(sort $(wildcard $(dir)/*.make)))
 # install_alternative and install_copy has some configuration defined
 # dependencies. include the files specifying these dependencies.
 include $(wildcard $(STATEDIR)/*.deps)
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] beaglebone

2012-01-31 Thread Bernhard Walle
Hi,

* Tim Sander ti...@vlsi.informatik.tu-darmstadt.de [2012-02-01 00:53]:
 Hi
 
 Does anybody by chance have a beaglebone ptxdist whe (s)he likes to share?

 % hg clone https://bitbucket.org/bwalle/ptxdist-arm-boards -r 26030b06fd4a

However, the kernel configuration is not tested to have DVI output.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion

2012-01-30 Thread Bernhard Walle
Hi Michael,

* Michael Olbrich m.olbr...@pengutronix.de [2012-01-30 15:06]:
 
 This is not correct. It will sort all post files and does not honor the
 order of PTXDIST_PATH_POSTRULES. This should probably be something like
 this (untested):
 
 $(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))), 
 include (sort $(wildcard $(dir)/*.make)))

I'm not really a make guru like you. Your example doesn't work.
Following works:

include $(foreach dir, $(call reverse,$(subst 
:,$(space),$(PTXDIST_PATH_POSTRULES))), $(sort $(wildcard $(dir)/*.make)))

Does that look correct in your eyes?


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion

2012-01-29 Thread Bernhard Walle
Since I switched to make 3.82 on my Mac (from MacPorts), ptxdist
images didn't produce any images. I compared the output of make
--debug=all with a working one (from make 3.81 that comes from Apple)
and one difference was the order in reading includes Makefiles.

With make 3.82, the wildcard command doesn't sort any more. See
https://bugzilla.redhat.com/show_bug.cgi?id=635607. This small fix
fixed the issue for me.

Don't ask my why this doesn't show up on Linux. Maybe the return values
of some library function that is make using internally is already
sorted. I have no clue.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/other/Toplevel.make |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make
index 35c2c27..0cb7e82 100644
--- a/rules/other/Toplevel.make
+++ b/rules/other/Toplevel.make
@@ -95,7 +95,7 @@ PTX_PACKAGES_INSTALL  := \
$(PACKAGES-b)
 
 # might be non existent
-include $(wildcard $(addsuffix /*.make,$(call reverse,$(subst 
:,$(space),$(PTXDIST_PATH_POSTRULES)
+include $(sort $(wildcard $(addsuffix /*.make,$(call reverse,$(subst 
:,$(space),$(PTXDIST_PATH_POSTRULES))
 # install_alternative and install_copy has some configuration defined
 # dependencies. include the files specifying these dependencies.
 include $(wildcard $(STATEDIR)/*.deps)
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Support reading number of CPUs on Mac OS X

2012-01-24 Thread Bernhard Walle
Hi Michael,

Am 24.01.12 10:19, schrieb Michael Olbrich:
 
 - Is sysctl alwyas in $PATH? On Linux it's in sbin.

I think so, but it's in /usr/sbin, so I can use /usr/sbin/syctl to be
more safe.

 - the value should be quoted.

ok.

 - Does this _always_ and _only_ work on Mac OS X?

Good point. I have no other system than Linux and Mac OS here, but
according to http://systhread.net/texts/28sysctl.php it should work
on all BSDs, so yes, your solution is better.

Will create a new version of the patch later in the evening.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Support reading number of CPUs on Darwin and BSDs

2012-01-24 Thread Bernhard Walle
Tested on Mac OS 10.7 (Lion).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
v2: Use /usr/sbin/sysctl instead of relying on the $PATH and don't check
for the operating system but just try it out.

 bin/ptxdist |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/bin/ptxdist b/bin/ptxdist
index 74a52ad..52e9c76 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2088,12 +2088,14 @@ setup_config() {
local pmf_extern=-j1
local cpus
 
+   # this one is for Linux
if [ -r /proc/cpuinfo ]; then
cpus=$(egrep '^(processor|cpu  )' /proc/cpuinfo | wc -l)
if [ ${cpus} -eq 0 ]; then
cpus=1
fi
-   else
+   # and this one is tested on Darwin and should work on BSDs
+   elif ! cpus=$(/usr/sbin/sysctl -n hw.ncpu) 2 /dev/null; then
cpus=1
fi
local pmf_intern=-j$(( ${cpus} * 2 ))
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] Fix missing elf.h on Darwin (v2)

2012-01-24 Thread Bernhard Walle
This is the second version of the patches. The third patch is not needed any
more because host-elf-h-compat is now built as base package rather than as
dependency. All other remarks of the review have been integrated in the patch
series.

The package is maintained at https://bitbucket.org/bwalle/elf-h-compat but
unfortunately it cannot be downloaded from there automatically because Bitbucket
forwards http to https and that gives certificate errors on some hosts
(depending which certificates are available to wget). That's why I still have my
domain in the source URL of the package. Well, in the past it was much more
reliable compared to Berlios, so it shouldn't be a practical problem.


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/2] Add host-elf-h-compat package

2012-01-24 Thread Bernhard Walle
This package should provide elf.h on host operating systems that have
no /usr/include/elf.h. The header is copied from glibc, modified a bit
to remove GNU dependencies and is sufficient to compile the Linux kernel
and module-init-tools.

The package itself only checks if elf.h is present. If yes, it does
nothing on make install. If not, it installs its own copy of elf.h in
make install to the include directory set in autoconf.

We add this package as base package so that it gets built before the
packages which need it. Also, the package only gets required when
ptxdist is executed not on Linux (per uname -s output). This makes
maintaining the dependencies easier than requiring it in any packages
that need elf.h.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/host-elf-h-compat.in   |5 +
 rules/host-elf-h-compat.make |   36 
 2 files changed, 41 insertions(+), 0 deletions(-)
 create mode 100644 rules/host-elf-h-compat.in
 create mode 100644 rules/host-elf-h-compat.make

diff --git a/rules/host-elf-h-compat.in b/rules/host-elf-h-compat.in
new file mode 100644
index 000..9310216
--- /dev/null
+++ b/rules/host-elf-h-compat.in
@@ -0,0 +1,5 @@
+## SECTION=hosttools_noprompt
+
+config HOST_ELF_H_COMPAT
+   default y
+   bool
diff --git a/rules/host-elf-h-compat.make b/rules/host-elf-h-compat.make
new file mode 100644
index 000..9bd9a1d
--- /dev/null
+++ b/rules/host-elf-h-compat.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Bernhard Walle bernh...@bwalle.de
+#
+# 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
+#
+LAZY_PACKAGES-$(PTXCONF_HOST_ELF_H_COMPAT) += host-elf-h-compat
+
+#
+# Paths and names
+#
+HOST_ELF_H_COMPAT_VERSION  := 0.2
+HOST_ELF_H_COMPAT_MD5  := a2a21551133c9278014f71cdb983564a
+HOST_ELF_H_COMPAT  := elf-h-compat-$(HOST_ELF_H_COMPAT_VERSION)
+HOST_ELF_H_COMPAT_SUFFIX   := tar.bz2
+HOST_ELF_H_COMPAT_URL  := 
http://bwalle.de/programme/$(HOST_ELF_H_COMPAT).$(HOST_ELF_H_COMPAT_SUFFIX)
+HOST_ELF_H_COMPAT_SOURCE   := 
$(SRCDIR)/$(HOST_ELF_H_COMPAT).$(HOST_ELF_H_COMPAT_SUFFIX)
+HOST_ELF_H_COMPAT_DIR  := $(HOST_BUILDDIR)/$(HOST_ELF_H_COMPAT)
+
+#
+# autoconf
+#
+HOST_ELF_H_COMPAT_CONF_TOOL:= autoconf
+
+ifneq ($(shell uname -s),Linux)
+$(STATEDIR)/base.prepare: $(STATEDIR)/host-elf-h-compat.install.post
+endif
+
+# vim: syntax=make
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 2/2] kernel: Use host-elf-h-compat

2012-01-24 Thread Bernhard Walle
Set the host include flags of the Linux kernel so that it finds elf.h in
sysroot-host/include. It's required to specify HOST_EXTRACFLAGS in the
environment rather than as make argument because otherwise += doesn't
work which ends in other build errors (gettext problems).

See also http://article.gmane.org/gmane.linux.kbuild.devel/5210 for a
discussion about HOST_EXTRACFLAGS.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/kernel.make |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/rules/kernel.make b/rules/kernel.make
index a445182..336b76d 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -43,13 +43,12 @@ KERNEL_SOURCE   := 
$(SRCDIR)/$(KERNEL).$(KERNEL_SUFFIX)
 # 
 
 KERNEL_PATH:= PATH=$(CROSS_PATH)
-KERNEL_ENV := KCONFIG_NOTIMESTAMP=1
+KERNEL_ENV := KCONFIG_NOTIMESTAMP=1 HOST_EXTRACFLAGS=$(HOST_CPPFLAGS)
 KERNEL_MAKEVARS := \
$(PARALLELMFLAGS) \
HOSTCC=$(HOSTCC) \
ARCH=$(PTXCONF_KERNEL_ARCH_STRING) \
CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) \
-   \
INSTALL_MOD_PATH=$(KERNEL_PKGDIR) \
PTX_KERNEL_DIR=$(KERNEL_DIR) \
$(call remove_quotes,$(PTXCONF_KERNEL_EXTRA_MAKEVARS))
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH v2] replace umkimage by u-boot sources

2012-01-23 Thread Bernhard Walle
* Andreas Bießmann biessm...@corscience.de [2012-01-23 13:40]:
 
 shouldn't we build two different packages (u-boot-tool-mkimage,
 u-boot-tool-env) here?

I would add that tools as part of the u-boot package.

Mixing a host tool with target tools don't sound like a good idea.

Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH v2] replace umkimage by u-boot sources

2012-01-23 Thread Bernhard Walle
* Andreas Bießmann biessm...@corscience.de [2012-01-23 14:16]:
 
 no, you got me wrong here. We have a host-u-boot-tools package which
 have the mkimage build for the host (currently only that tool, but maybe
 sometimes mkenvimage too?). Here we have the target package build for
 the specified target architecture (yes some want to run mkimage ion the
 target ;)

Yes, sorry. Should have read the whole mail.

Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] host-localedef: Fix on Darwin

2012-01-23 Thread Bernhard Walle
* Andreas Bießmann andr...@biessmann.de [2012-01-23 22:29]:
 On 22.01.12 00:29, Bernhard Walle wrote:
  This patch is by far the most ugly part of all of the Darwin patches.
  At least the md5sum of a locale-archive when generating a de_DE.UTF-8
  locale is identical...
  
  A first review, please.
 
 I get some warnings and a linker error:

Is 'gcc' llvm-gcc (gcc --version)?

I'm using gcc-4.2 (FSF gcc) as host compiler, but of course it should be
fixed to work with llvm-gcc too as it's the default on Lion (and I think
even Snow Leopard).


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Setup vim folding in the logfile automatically

2012-01-22 Thread Bernhard Walle
This patch adds the modeline

# vim: set fdm=markers fdl=1:

to the Logfile. There's already a modeline for Emacs in the file, so it
shouldn't be too annoying for users that don't use vim.

The first setting tells vim to recognize the fold markers '{{{' and
'}}}' in the logfile (which doesn't have any file type in vim).

However, with this setting vim automatically closes all folds, including
the first '{{{' which only is for Emacs. That's why I add fdl=1, which
results in vim opening the file visible one fold per ptxdist run.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 bin/ptxdist |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/bin/ptxdist b/bin/ptxdist
index 73235c4..5528a14 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2270,6 +2270,9 @@ setup_logfile()
if [ \! -e ${PTX_LOGFILE} ]; then
# let emacs outline mode be compatible to vi's fold mode
echo -e # -*- mode:outline; outline-regexp:\{{{\ -*-\n  
${PTX_LOGFILE}
+   # help vim to recognise the fold markers and expand the first 
level of folding
+   # which in fact is the Emacs setting above
+   echo # vim: set fdm=markers fdl=1:  ${PTX_LOGFILE}
fi
 
#
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Setup vim folding in the logfile automatically

2012-01-22 Thread Bernhard Walle
This patch adds the modeline

# vim: set fdm=marker fdl=1:

to the Logfile. There's already a modeline for Emacs in the file, so it
shouldn't be too annoying for users that don't use vim.

The first setting tells vim to recognize the fold markers '{{{' and
'}}}' in the logfile (which doesn't have any file type in vim).

However, with this setting vim automatically closes all folds, including
the first '{{{' which only is for Emacs. That's why I add fdl=1, which
results in vim opening the file visible one fold per ptxdist run.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
v2: Use marker, not markers.

 bin/ptxdist |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/bin/ptxdist b/bin/ptxdist
index 73235c4..74a52ad 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2270,6 +2270,9 @@ setup_logfile()
if [ \! -e ${PTX_LOGFILE} ]; then
# let emacs outline mode be compatible to vi's fold mode
echo -e # -*- mode:outline; outline-regexp:\{{{\ -*-\n  
${PTX_LOGFILE}
+   # help vim to recognise the fold markers and expand the first 
level of folding
+   # which in fact is the Emacs setting above
+   echo # vim: set fdm=marker fdl=1:  ${PTX_LOGFILE}
fi
 
#
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] Fix missing elf.h on Darwin

2012-01-22 Thread Bernhard Walle
This patch series is an attempt to solve the problem that Darwin has no
/usr/include/elf.h. I'm sure that other non-Linux but POSIX-compatible operating
systems have no /usr/include/elf.h, so it should not only increase portability
for Mac OS but also for *BSD.

I think there are various ways to implement an solution, this one is based on a
newly created elf-h-compat package that uses autoconf to check if there's
already a elf.h present and if yes, it does nothing on make install.
Otherwise, an own copy of elf.h that is sufficient to compile the kernel and
module-init-tools is installed, which results in sysroot-host/include/elf.h.

The rest of the patches just add the dependencies and set the CFLAGS.

Some words on alternatives: I played a bit with libelf to provide the required
headers, but they don't have elf.h and even a compat-elf.h that includes gelf.h
doesn't bring all required defines. On the other side building libelf just to
get a few definitions is overkill.

Modifying the kernel build system to use its own copy of elf.h (basically
linux/elf.h) isn't easy either and will not help module-init-tools (didn't
check kmod).

Using the elf.h from the cross-toolchain would involve bringing the include path
of the cross toolchain in the include path of the host which I'm sure will
generate more problems.

Of course I'm open for alternatives, but discussion without suggesting a
solution doesn't work in most Open Source projects. ;-)


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 3/3] module-init-tools: Depend on HOST_ELF_H_COMPAT

2012-01-22 Thread Bernhard Walle
The kernel already depends on it, but module-init-tools may be built
earlier and if we don't add it here to the dependency chain, the build
order could be module-init-tools - host-elf-h-compat - kernel which
would not work on systems that have no /usr/include/elf.h.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/module-init-tools.in |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/rules/module-init-tools.in b/rules/module-init-tools.in
index 765de6b..3d98fd0 100644
--- a/rules/module-init-tools.in
+++ b/rules/module-init-tools.in
@@ -4,6 +4,7 @@
 menuconfig MODULE_INIT_TOOLS
tristate
prompt module-init-tools 
+   select HOST_ELF_H_COMPAT
help
  This package contains a set of programs for loading, inserting
  and removing kernel modules for Linux (versions 2.5.48 and
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 2/3] kernel: Use host-elf-h-compat

2012-01-22 Thread Bernhard Walle
Add a dependency to the host tool and set the include flags properly.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 platforms/hosttools.in |1 +
 platforms/kernel.in|1 +
 rules/kernel.make  |1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/platforms/hosttools.in b/platforms/hosttools.in
index 155b30b..0435545 100644
--- a/platforms/hosttools.in
+++ b/platforms/hosttools.in
@@ -5,6 +5,7 @@ source rules/host-cmake.in
 source rules/host-cramfs.in
 source rules/host-dosfstools.in
 source rules/host-e2fsprogs.in
+source rules/host-elf-h-compat.in
 source rules/host-genext2fs.in
 source rules/host-genpart.in
 source rules/host-gettext.in
diff --git a/platforms/kernel.in b/platforms/kernel.in
index b601284..4391e79 100644
--- a/platforms/kernel.in
+++ b/platforms/kernel.in
@@ -2,6 +2,7 @@ menuconfig KERNEL
bool
default y
select IMAGE_KERNEL
+   select HOST_ELF_H_COMPAT
select HOST_UMKIMAGEif KERNEL_IMAGE_U
select HOST_XZ  if KERNEL_XZ
select HOST_LZOPif KERNEL_LZOP
diff --git a/rules/kernel.make b/rules/kernel.make
index a445182..f125a69 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -47,6 +47,7 @@ KERNEL_ENV:= KCONFIG_NOTIMESTAMP=1
 KERNEL_MAKEVARS := \
$(PARALLELMFLAGS) \
HOSTCC=$(HOSTCC) \
+   HOSTCFLAGS=$(HOST_CPPFLAGS) $(HOST_CFLAGS) \
ARCH=$(PTXCONF_KERNEL_ARCH_STRING) \
CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) \
\
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/3] Add host-elf-h-compat package

2012-01-22 Thread Bernhard Walle
This package should provide elf.h on host operating systems that have
no /usr/include/elf.h. The header is copied from glibc, modified a bit
to remove Gnu dependencies and is sufficient to compile the Linux kernel
and module-init-tools.

The package itself only checks if elf.h is present. If yes, it does
nothing on make install. If not, it installs its own copy of elf.h in
make install to the include directory set in autoconf.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/host-elf-h-compat.in   |4 
 rules/host-elf-h-compat.make |   32 
 2 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100644 rules/host-elf-h-compat.in
 create mode 100644 rules/host-elf-h-compat.make

diff --git a/rules/host-elf-h-compat.in b/rules/host-elf-h-compat.in
new file mode 100644
index 000..8a263ea
--- /dev/null
+++ b/rules/host-elf-h-compat.in
@@ -0,0 +1,4 @@
+## SECTION=hosttools_noprompt
+
+config HOST_ELF_H_COMPAT
+   bool
diff --git a/rules/host-elf-h-compat.make b/rules/host-elf-h-compat.make
new file mode 100644
index 000..7001344
--- /dev/null
+++ b/rules/host-elf-h-compat.make
@@ -0,0 +1,32 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Bernhard Walle bernh...@bwalle.de
+#
+# 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
+#
+HOST_PACKAGES-$(PTXCONF_HOST_ELF_H_COMPAT) += host-elf-h-compat
+
+#
+# Paths and names
+#
+HOST_ELF_H_COMPAT_VERSION  := 0.1
+HOST_ELF_H_COMPAT_MD5  := dc45cdadcac50a42175f66ffed2d4375
+HOST_ELF_H_COMPAT  := elf-h-compat-$(HOST_ELF_H_COMPAT_VERSION)
+HOST_ELF_H_COMPAT_SUFFIX   := tar.bz2
+HOST_ELF_H_COMPAT_URL  := 
http://bwalle.de/programme//$(HOST_ELF_H_COMPAT).$(HOST_ELF_H_COMPAT_SUFFIX)
+HOST_ELF_H_COMPAT_SOURCE   := 
$(SRCDIR)/$(HOST_ELF_H_COMPAT).$(HOST_ELF_H_COMPAT_SUFFIX)
+HOST_ELF_H_COMPAT_DIR  := $(HOST_BUILDDIR)/$(HOST_ELF_H_COMPAT)
+
+#
+# autoconf
+#
+HOST_ELF_H_COMPAT_CONF_TOOL:= autoconf
+
+# vim: syntax=make
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts

2012-01-22 Thread Bernhard Walle
The build system of sitecopy uses 'uname' to determine the operating
system for which it compiles sitecopy. However, on non-Linux hosts, this
leads to wrong results.

Fixes Darwin (tested on Mac OS 10.7 Lion).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
v3: Same as v1 but with SITECOPY_CONF_ENV instead of SITECOPY_AUTOCONF and with 
comment.

 rules/sitecopy.make |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/rules/sitecopy.make b/rules/sitecopy.make
index 44a7b8a..4434fe9 100644
--- a/rules/sitecopy.make
+++ b/rules/sitecopy.make
@@ -42,6 +42,14 @@ SITECOPY_AUTOCONF := $(CROSS_AUTOCONF_USR) \
--without-socks \
--without-gssapi
 
+# m4/neon/neon.m4 uses uname to check for Darwin and adds some special compiler
+# options in that case. sitecopy doesn't build host tools, so anything built
+# is for the target. We can force the target operating system to Linux. That's 
simpler
+# than fixing the m4/neon/neon.m4 and doesn't need autoreconf to run.
+SITECOPY_CONF_ENV  := \
+   $(CROSS_ENV) \
+   ne_cv_os_uname=Linux
+
 ifdef PTXCONF_SITECOPY_SFTP
 SITECOPY_AUTOCONF += --enable-sftp
 else
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH v2] replace umkimage by u-boot sources

2012-01-22 Thread Bernhard Walle
* Andreas Bießmann andr...@biessmann.de [2012-01-22 15:49]:
  
 +config ROOTFS_FW_ENV_CONFIG
 + bool
 + prompt install /etc/fw_env.config
 + default y

Shouldn't this default to n if there's no generic fallback file
(in the generic/ directory)?


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Support reading number of CPUs on Mac OS X

2012-01-22 Thread Bernhard Walle
Tested on 10.7 (Lion).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 bin/ptxdist |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/bin/ptxdist b/bin/ptxdist
index 74a52ad..4edbac3 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2093,6 +2093,8 @@ setup_config() {
if [ ${cpus} -eq 0 ]; then
cpus=1
fi
+   elif [ $(uname -s) = Darwin ] ; then
+   cpus=$(sysctl -n hw.ncpu)
else
cpus=1
fi
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH / RFC] replace umkimage by u-boot sources

2012-01-21 Thread Bernhard Walle
Am 21.01.12 19:22, schrieb Michael Olbrich:
 I don't know fw_printenv. Please elaborate.

This is a tool to print the u-boot environment in Linux. fw_setenv can
be used to change the u-boot environment from Linux.


Regards,
Bernhard


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] opkg-utils: use toolchain provided ar

2012-01-19 Thread Bernhard Walle
Am 19.01.12 16:02, schrieb Andreas Bießmann:
 On OS X (and other maybe other systems) the default provided ar is not a
 GNU version and does not understand all the required switches.

That should also fix the problem that ar on Darwin (regardless whether
it's the GNU variant built by Mac Ports or if it's the ar from Apple)
create ar archives without leading '/' in the index, which needs a small
patch for arfile.py [1]. Right?


Regards,
Bernhard

[1]
https://bitbucket.org/bwalle/ptxdist-arm-boards/raw/5aace267/patches/opkg-utils-r4747/0005-opkg-darwin.diff


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts

2012-01-19 Thread Bernhard Walle
The build system of sitecopy uses 'uname' to determine the operating
system for which it compiles sitecopy. However, on non-Linux hosts, this
leads to wrong results.

Fixes Darwin (tested on Mac OS 10.7 Lion).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 patches/sitecopy-0.16.6/autoconf-neon-darwin.diff |   44 +
 patches/sitecopy-0.16.6/autogen.sh|1 +
 patches/sitecopy-0.16.6/series|1 +
 3 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100644 patches/sitecopy-0.16.6/autoconf-neon-darwin.diff
 create mode 12 patches/sitecopy-0.16.6/autogen.sh

diff --git a/patches/sitecopy-0.16.6/autoconf-neon-darwin.diff 
b/patches/sitecopy-0.16.6/autoconf-neon-darwin.diff
new file mode 100644
index 000..245f684
--- /dev/null
+++ b/patches/sitecopy-0.16.6/autoconf-neon-darwin.diff
@@ -0,0 +1,44 @@
+---
+ m4/neon/neon.m4 |   23 +++
+ 1 file changed, 11 insertions(+), 12 deletions(-)
+
+--- a/m4/neon/neon.m4
 b/m4/neon/neon.m4
+@@ -410,19 +410,17 @@ fi
+ ])
+ 
+ AC_DEFUN([NE_CHECK_OS], [
+-# Check for Darwin, which needs extra cpp and linker flags.
+-AC_CACHE_CHECK([for uname], ne_cv_os_uname, [
+- ne_cv_os_uname=`uname -s 2/dev/null`
+-])
+ 
+-if test $ne_cv_os_uname = Darwin; then
+-  CPPFLAGS=$CPPFLAGS -no-cpp-precomp
+-  LDFLAGS=$LDFLAGS -flat_namespace 
+-  # poll has various issues in various Darwin releases
+-  if test x${ac_cv_func_poll+set} != xset; then
+-ac_cv_func_poll=no
+-  fi
+-fi
++case $host_os in
++  darwin*)
++CPPFLAGS=$CPPFLAGS -no-cpp-precomp
++LDFLAGS=$LDFLAGS -flat_namespace
++# poll has various issues in various Darwin releases
++if test x${ac_cv_func_poll+set} != xset; then
++  ac_cv_func_poll=no
++fi
++;;
++esac
+ ])
+ 
+ AC_DEFUN([NEON_COMMON_CHECKS], [
+@@ -431,6 +429,7 @@ AC_DEFUN([NEON_COMMON_CHECKS], [
+ # is used.
+ 
+ AC_REQUIRE([AC_PROG_CC])
++AC_REQUIRE([AC_CANONICAL_SYSTEM])
+ AC_REQUIRE([AC_ISC_POSIX])
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_C_CONST])
diff --git a/patches/sitecopy-0.16.6/autogen.sh 
b/patches/sitecopy-0.16.6/autogen.sh
new file mode 12
index 000..9f8a4cb
--- /dev/null
+++ b/patches/sitecopy-0.16.6/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/sitecopy-0.16.6/series b/patches/sitecopy-0.16.6/series
index c295b75..f84ad01 100644
--- a/patches/sitecopy-0.16.6/series
+++ b/patches/sitecopy-0.16.6/series
@@ -1 +1,2 @@
 sitecopy-neon-openssl.diff
+autoconf-neon-darwin.diff
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2] zlib: Fix build on non-Linux hosts

2012-01-19 Thread Bernhard Walle
The build system of zlib uses 'uname' to determine the operating system
for which it compiles zlib. However, on non-Linux hosts, this leads to
wrong results.

Fixes Darwin (tested on Mac OS 10.7 Lion), doesn't break Linux (verified
with current Arch Linux on x86_64).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
v2: After reworking the sitecopy fix, I checked if it makes sense to
use the same fix for zlib. However, zlib isn't using autoconf, it just
uses a hand-written configure script. But now I think the --uname
option which is explicitly provided is more clean than just setting
some environment variable which indeed is an implementation detail of
the script.

 rules/zlib.make |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/rules/zlib.make b/rules/zlib.make
index 0d437e3..e51fe8a 100644
--- a/rules/zlib.make
+++ b/rules/zlib.make
@@ -47,7 +47,8 @@ ZLIB_CONF_ENV := \
 # autoconf
 #
 ZLIB_AUTOCONF := \
-   --prefix=/usr
+   --prefix=/usr \
+   --uname=Linux
 
 ifdef PTXCONF_ZLIB_STATIC
 ZLIB_AUTOCONF += --static
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] host-e2fsprogs: Fix build on Darwin

2012-01-19 Thread Bernhard Walle
The O_DIRECT flag in e2fsprogs is relatively new. MacPorts is still using the
old version of e2fsprogs. However, this patch from the upstream bug tracker
fixes the build of e2fsprogs.

Strictly direct I/O is not required for ptxdist because we're working on
images only. So removing O_DIRECT here would also work, but this solution is
cleaner.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 .../0003-darwin_directio_fix.patch |   46 
 patches/e2fsprogs-1.41.14/series   |1 +
 2 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100644 patches/e2fsprogs-1.41.14/0003-darwin_directio_fix.patch

diff --git a/patches/e2fsprogs-1.41.14/0003-darwin_directio_fix.patch 
b/patches/e2fsprogs-1.41.14/0003-darwin_directio_fix.patch
new file mode 100644
index 000..1e00c04
--- /dev/null
+++ b/patches/e2fsprogs-1.41.14/0003-darwin_directio_fix.patch
@@ -0,0 +1,46 @@
+Fix compilation on Darwin
+
+The patch is from upstream bug tracker [1]. However, it's not (yet) in the
+upstream repository.
+
+[1] 
http://sourceforge.net/tracker/?func=detailaid=3140289group_id=2406atid=102406
+---
+ lib/ext2fs/unix_io.c |   12 
+ 1 file changed, 12 insertions(+)
+
+--- a/lib/ext2fs/unix_io.c
 b/lib/ext2fs/unix_io.c
+@@ -428,6 +428,7 @@ static errcode_t unix_open(const char *n
+   struct unix_private_data *data = NULL;
+   errcode_t   retval;
+   int open_flags;
++  int f_nocache = 0;
+   struct stat st;
+ #ifdef __linux__
+   struct  utsname ut;
+@@ -464,7 +465,11 @@ static errcode_t unix_open(const char *n
+   if (flags  IO_FLAG_EXCLUSIVE)
+   open_flags |= O_EXCL;
+   if (flags  IO_FLAG_DIRECT_IO)
++#if !defined(O_DIRECT)  defined(F_NOCACHE)
++  f_nocache = F_NOCACHE;
++#else
+   open_flags |= O_DIRECT;
++#endif
+   data-flags = flags;
+ 
+ #ifdef HAVE_OPEN64
+@@ -477,6 +482,13 @@ static errcode_t unix_open(const char *n
+   goto cleanup;
+   }
+ 
++  if (f_nocache) {
++  if (fcntl(data-dev, f_nocache, 1)  0) {
++  retval = errno;
++  goto cleanup;
++  }
++  }
++
+ #ifdef BLKSSZGET
+   if (flags  IO_FLAG_DIRECT_IO) {
+   if (ioctl(data-dev, BLKSSZGET, data-align) != 0)
diff --git a/patches/e2fsprogs-1.41.14/series b/patches/e2fsprogs-1.41.14/series
index fac473a..26e2c33 100644
--- a/patches/e2fsprogs-1.41.14/series
+++ b/patches/e2fsprogs-1.41.14/series
@@ -3,3 +3,4 @@
 0001-Fixed-bitops.h-for-Coldfire-V4E.patch
 0002-fix-linking-problem.patch
 # ec0cc8b8677eb72a286f38e0e9ba63e9  - git-ptx-patches magic
+0003-darwin_directio_fix.patch
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Fix usage of fakeroot on Darwin

2012-01-19 Thread Bernhard Walle
Am 19.01.12 20:55, schrieb Michael Olbrich:
 On Mon, Jan 16, 2012 at 09:30:25PM +0100, Bernhard Walle wrote:
 The extension of shared libraries on Darwin is .dylib, not .so. While
 the fakeroot script itself (which is part of the fakeroot distribution)
 can handle Darwin, ptxdist calls 'fakeroot' with the '-l' parameter and
 directly provides the full path to the shared library which is
 pre-loaded.
 
 Can you try removing '-l lib' instead. From looking at the fakeroot
 source, it should work. We use it like that in other places already.

That works indeed. I also wondered why you're calling fakeroot with -l,
but I thought it must have a reason. :)

New version is coming.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Fix usage of fakeroot on Darwin

2012-01-19 Thread Bernhard Walle
The extension of shared libraries on Darwin is .dylib, not .so.
Because fakeroot doesn't need specification of the pre-load library
but finds the library automatically, remove calling fakeroot with -l.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/pre/Rules.make |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index c531a50..1d6da52 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make
@@ -13,7 +13,8 @@ GNU_BUILD := $(shell $(SCRIPTSDIR)/autoconf/config.guess)
 GNU_HOST   := $(shell echo $(GNU_BUILD) | sed s/-[a-zA-Z0-9_]*-/-host-/)
 
 INSTALL:= install
-FAKEROOT   := $(PTXDIST_SYSROOT_HOST)/bin/fakeroot -l 
$(PTXDIST_SYSROOT_HOST)/lib/libfakeroot.so
+
+FAKEROOT   := $(PTXDIST_SYSROOT_HOST)/bin/fakeroot
 
 CHECK_PIPE_STATUS := \
for i in  $${PIPESTATUS[@]}; do [ $$i -gt 0 ]  {
\
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] host-e2fsprogs: Fix build on Darwin

2012-01-19 Thread Bernhard Walle
The O_DIRECT flag in e2fsprogs is relatively new. MacPorts is still using the
old version of e2fsprogs. However, this patch from the upstream bug tracker
fixes the build of e2fsprogs.

Strictly direct I/O is not required for ptxdist because we're working on
images only. So removing O_DIRECT here would also work, but this solution is
cleaner.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 .../0003-Fix-compilation-on-Darwin.patch   |   44 
 patches/e2fsprogs-1.41.14/series   |3 +-
 2 files changed, 46 insertions(+), 1 deletions(-)
 create mode 100644 
patches/e2fsprogs-1.41.14/0003-Fix-compilation-on-Darwin.patch

diff --git a/patches/e2fsprogs-1.41.14/0003-Fix-compilation-on-Darwin.patch 
b/patches/e2fsprogs-1.41.14/0003-Fix-compilation-on-Darwin.patch
new file mode 100644
index 000..cb58afd
--- /dev/null
+++ b/patches/e2fsprogs-1.41.14/0003-Fix-compilation-on-Darwin.patch
@@ -0,0 +1,44 @@
+From: Bernhard Walle bernh...@bwalle.de
+Date: Thu, 19 Jan 2012 22:31:46 +0100
+Subject: [PATCH] Fix compilation on Darwin
+
+The patch is inspired by the patch at
+http://sourceforge.net/tracker/?func=detailaid=3140289group_id=2406atid=102406
+(bug tracker of the upstream project).
+
+Signed-off-by: Bernhard Walle bernh...@bwalle.de
+---
+ lib/ext2fs/unix_io.c |   11 +++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
+index 1df1fdd..cbd3d70 100644
+--- a/lib/ext2fs/unix_io.c
 b/lib/ext2fs/unix_io.c
+@@ -463,8 +463,10 @@ static errcode_t unix_open(const char *name, int flags, 
io_channel *channel)
+   open_flags = (flags  IO_FLAG_RW) ? O_RDWR : O_RDONLY;
+   if (flags  IO_FLAG_EXCLUSIVE)
+   open_flags |= O_EXCL;
++#ifdef O_DIRECT
+   if (flags  IO_FLAG_DIRECT_IO)
+   open_flags |= O_DIRECT;
++#endif
+   data-flags = flags;
+ 
+ #ifdef HAVE_OPEN64
+@@ -477,6 +479,15 @@ static errcode_t unix_open(const char *name, int flags, 
io_channel *channel)
+   goto cleanup;
+   }
+ 
++#if !defined(O_DIRECT)  defined(F_NOCACHE)
++  if (flags  IO_FLAG_DIRECT_IO) {
++  if (fcntl(data-dev, F_NOCACHE, 1)  0) {
++  retval = errno;
++  goto cleanup;
++  }
++  }
++#endif
++
+ #ifdef BLKSSZGET
+   if (flags  IO_FLAG_DIRECT_IO) {
+   if (ioctl(data-dev, BLKSSZGET, data-align) != 0)
diff --git a/patches/e2fsprogs-1.41.14/series b/patches/e2fsprogs-1.41.14/series
index fac473a..44a543e 100644
--- a/patches/e2fsprogs-1.41.14/series
+++ b/patches/e2fsprogs-1.41.14/series
@@ -2,4 +2,5 @@
 #tag:base --start-number 1
 0001-Fixed-bitops.h-for-Coldfire-V4E.patch
 0002-fix-linking-problem.patch
-# ec0cc8b8677eb72a286f38e0e9ba63e9  - git-ptx-patches magic
+0003-Fix-compilation-on-Darwin.patch
+# b3f719def2b2e0004e2d9a830ebc59d0  - git-ptx-patches magic
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts

2012-01-18 Thread Bernhard Walle
Hi Jürgen,

Am 18.01.2012 11:05, schrieb Juergen Beisert:
 
 Can you send me the config.log file of the sitecopy package, after 
 *preparing* (prepare stage) it? Please run it one times without your patch 
 shown above.
 I have no other system than Linux here, to check what the autotools really 
 detecting on different systems.

Will do in the evening, but as I remember, it was the '-no-cpp-precomp'
compiler flag that caused the compilation failure:


(from configure:)

if test $ne_cv_os_uname = Darwin; then
  CPPFLAGS=$CPPFLAGS -no-cpp-precomp
  LDFLAGS=$LDFLAGS -flat_namespace
  # poll has various issues in various Darwin releases
  if test x${ac_cv_func_poll+set} != xset; then
ac_cv_func_poll=no
  fi
fi


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts

2012-01-18 Thread Bernhard Walle
Am 18.01.12 11:23, schrieb Juergen Beisert:
 Hi Bernhard,
 
 Bernhard Walle wrote:
 Am 18.01.2012 11:05, schrieb Juergen Beisert:
 Can you send me the config.log file of the sitecopy package, after
 *preparing* (prepare stage) it? Please run it one times without your
 patch shown above.
 I have no other system than Linux here, to check what the autotools
 really detecting on different systems.

 Will do in the evening,
 
 Thanks.

A bite late for the evening, but anyway attached. ;-)

The check comes from m4/neon/neon.m4 which is included in sitecopy
sources. Maybe I should patch that to check for the target system and
link ptxdist autogen.sh?


Regards,
Bernhard
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by sitecopy configure 0.16.6, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 
--host=arm-v5te-linux-gnueabi --build=i386-host-darwin11.2.0 --disable-gnomefe 
--enable-threadsafe-ssl=posix --disable-nls --enable-threads=posix 
--disable-rpath --without-pakchois --without-socks --without-gssapi 
--enable-sftp --enable-rsh --enable-ftp --enable-webdav --with-expat

## - ##
## Platform. ##
## - ##

hostname = galilei.fritz.box
uname -m = x86_64
uname -r = 11.2.0
uname -s = Darwin
uname -v = Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011; 
root:xnu-1699.24.8~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = Mach kernel version:
 Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011; 
root:xnu-1699.24.8~1/RELEASE_X86_64
Kernel configured for up to 2 processors.
2 processors are physically available.
2 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1
Primary memory available: 4.00 gigabytes
Default processor set: 118 tasks, 534 threads, 2 processors
Load average: 4.61, Mach factor: 0.35
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /Volumes/mdevel/ptxdist-vetero/platform-dockstar/sysroot-cross/bin
PATH: /Volumes/mdevel/ptxdist-vetero/platform-dockstar/sysroot-cross/sbin
PATH: /Volumes/mdevel/ptxdist-vetero/platform-dockstar/sysroot-host/bin
PATH: /Volumes/mdevel/ptxdist-vetero/platform-dockstar/sysroot-host/sbin
PATH: 
/opt/OSELAS.Toolchain-2011.11.0/arm-v5te-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/bin
PATH: /opt/ptxdist/lib/ptxdist-2012.01.0/bin
PATH: /opt/ptxdist/bin
PATH: /opt/texlive/2011-new/bin/universal-darwin
PATH: /Users/bwalle/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/X11/bin


## --- ##
## Core tests. ##
## --- ##

configure:1905: checking for arm-v5te-linux-gnueabi-gcc
configure:1932: result: arm-v5te-linux-gnueabi-gcc
configure:2210: checking for C compiler version
configure:2217: arm-v5te-linux-gnueabi-gcc --version 5
arm-v5te-linux-gnueabi-gcc (OSELAS.Toolchain-2011.11.0) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2220: $? = 0
configure:2227: arm-v5te-linux-gnueabi-gcc -v 5
Using built-in specs.
COLLECT_GCC=arm-v5te-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/opt/OSELAS.Toolchain-2011.11.0/arm-v5te-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/libexec/gcc/arm-v5te-linux-gnueabi/4.6.2/lto-wrapper
Target: arm-v5te-linux-gnueabi
Configured with: 
/Volumes/Devel/OSELAS.Toolchain-2011.11.0/platform-arm-v5te-linux-gnueabi-gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/build-cross/gcc-4.6.2/configure
 --target=arm-v5te-linux-gnueabi 
--with-sysroot=/opt/OSELAS.Toolchain-2011.11.0/arm-v5te-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/sysroot-arm-v5te-linux-gnueabi
 --disable-multilib --with-float=soft --with-fpu=vfp --with-cpu=arm926ej-s 
--enable-__cxa_atexit --disable-sjlj-exceptions --disable-nls 
--disable-decimal-float --disable-fixed-point --disable-win32-registry 
--enable-symvers=gnu --with-pkgversion=OSELAS.Toolchain-2011.11.0 
--with-system-zlib 
--with-gmp=/Volumes/Devel/OSELAS.Toolchain-2011.11.0/platform-arm-v5te-linux-gnueabi-gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/sysroot-host
 
--with-mpfr=/Volumes/Devel/OSELAS.Toolchain-2011.11.0/platform-arm-v5te-linux-gnueabi-gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/sysroot-host
 
--prefix=/opt/OSELAS.Toolchain-2011.11.0/arm-v5te-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized
 --enable-languages=c,c++ --enable

[ptxdist] [PATCH] rootfs: Allow installation of /etc/modprobe.conf

2012-01-17 Thread Bernhard Walle
I added this option in rootfs and not in module-init-tools because there
are various implementations of modprobe that are using that file
(module-init-tools, busybox and possibly kmod in future).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/rootfs.in   |   10 ++
 rules/rootfs.make |3 +++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/rules/rootfs.in b/rules/rootfs.in
index ecc3bf8..d8777c2 100644
--- a/rules/rootfs.in
+++ b/rules/rootfs.in
@@ -395,5 +395,15 @@ config ROOTFS_SERVICES
  If enabled, it installs the ./projectroot/etc/services file if
  present, else a generic one from the ptxdist directory.
 
+config ROOTFS_MODPROBE_CONF
+   bool
+   default n
+   prompt install /etc/modprobe.conf
+   help
+ If enabled, it installs the ./projectroot/etc/modprobe.conf file if
+ present. Default options for kernel modules can be configured in that
+ file. It's read either in busybox modprobe or in the module-init-tools
+ modprobe implementation.
+
 endmenu
 
diff --git a/rules/rootfs.make b/rules/rootfs.make
index ca7d3f4..e6187fc 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -226,6 +226,9 @@ endif
 ifdef PTXCONF_ROOTFS_SERVICES
@$(call install_alternative, rootfs, 0, 0, 0644, /etc/services)
 endif
+ifdef PTXCONF_ROOTFS_MODPROBE_CONF
+   @$(call install_alternative, rootfs, 0, 0, 0644, /etc/modprobe.conf)
+endif
 
@$(call install_finish, rootfs)
 
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] sqlite: Update to 3.7.10

2012-01-17 Thread Bernhard Walle
Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/sqlite.make |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/sqlite.make b/rules/sqlite.make
index 9491c4e..451c3b3 100644
--- a/rules/sqlite.make
+++ b/rules/sqlite.make
@@ -20,8 +20,8 @@ PACKAGES-$(PTXCONF_SQLITE) += sqlite
 #
 # Paths and names
 #
-SQLITE_VERSION := 3070900
-SQLITE_MD5 := dce303524736fe89a76b8ed29d566352
+SQLITE_VERSION := 3071000
+SQLITE_MD5 := 9ed2ca93577b58cfa0d01f64b9312ab9
 SQLITE_TYPE:= autoconf
 ifeq ($(SQLITE_TYPE),)
 SQLITE := sqlite-$(SQLITE_VERSION)
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts

2012-01-16 Thread Bernhard Walle
The build system of sitecopy uses 'uname' to determine the operating system for
which it compiles sitecopy. However, on non-Linux hosts, this leads to wrong
results.

Fixes Darwin (tested on Mac OS 10.7 Lion), doesn't break Linux (verified with
current Arch Linux on x86_64).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/sitecopy.make |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/rules/sitecopy.make b/rules/sitecopy.make
index 44a7b8a..c5af415 100644
--- a/rules/sitecopy.make
+++ b/rules/sitecopy.make
@@ -40,7 +40,8 @@ SITECOPY_AUTOCONF := $(CROSS_AUTOCONF_USR) \
--disable-rpath \
--without-pakchois \
--without-socks \
-   --without-gssapi
+   --without-gssapi \
+   ne_cv_os_uname=Linux
 
 ifdef PTXCONF_SITECOPY_SFTP
 SITECOPY_AUTOCONF += --enable-sftp
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Fix usage of fakeroot on Darwin

2012-01-16 Thread Bernhard Walle
The extension of shared libraries on Darwin is .dylib, not .so. While
the fakeroot script itself (which is part of the fakeroot distribution)
can handle Darwin, ptxdist calls 'fakeroot' with the '-l' parameter and
directly provides the full path to the shared library which is
pre-loaded.

This patch adds a simple check, explicitly checking for Darwin in the
'uname -s' output. Verified to fix the build on Mac OS 10.7 (Lion).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/pre/Rules.make |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index c531a50..32c198b 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make
@@ -13,7 +13,14 @@ GNU_BUILD:= $(shell $(SCRIPTSDIR)/autoconf/config.guess)
 GNU_HOST   := $(shell echo $(GNU_BUILD) | sed s/-[a-zA-Z0-9_]*-/-host-/)
 
 INSTALL:= install
-FAKEROOT   := $(PTXDIST_SYSROOT_HOST)/bin/fakeroot -l 
$(PTXDIST_SYSROOT_HOST)/lib/libfakeroot.so
+
+ifeq ($(shell uname -s),Darwin)
+SHLIB_SUFFIX   := dylib
+else
+SHLIB_SUFFIX   := so
+endif
+
+FAKEROOT   := $(PTXDIST_SYSROOT_HOST)/bin/fakeroot -l 
$(PTXDIST_SYSROOT_HOST)/lib/libfakeroot.$(SHLIB_SUFFIX)
 
 CHECK_PIPE_STATUS := \
for i in  $${PIPESTATUS[@]}; do [ $$i -gt 0 ]  {
\
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] host-tz-database: Fix build on Darwin

2012-01-16 Thread Bernhard Walle
This patch fixes following build error:

localtime.c:1174: error: static declaration of 'tzsetwall' follows 
non-static declaration
/usr/include/time.h:150: error: previous declaration of 'tzsetwall' was here

On Linux:

% grep -r tzsetwall /usr/include/
[nothing]

On Mac OS 10.7:

% grep -r tzsetwall /usr/include/
/usr/include/time.h:void tzsetwall(void);

So this patch doesn't break Linux.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/host-tz-database.make |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rules/host-tz-database.make b/rules/host-tz-database.make
index 018ec97..54a1003 100644
--- a/rules/host-tz-database.make
+++ b/rules/host-tz-database.make
@@ -75,7 +75,7 @@ $(STATEDIR)/host-tz-database.extract:
 HOST_TZ_DATABASE_PATH  := PATH=$(HOST_PATH)
 HOST_TZ_DATABASE_CONF_TOOL := NO
 HOST_TZ_DATABASE_MAKE_OPT  := \
-   zic TZDIR=/usr/share/zoneinfo
+   zic TZDIR=/usr/share/zoneinfo CFLAGS=-DSTD_INSPIRED
 HOST_TZ_DATABASE_INSTALL_OPT   := \
posix_only TZDIR=$(HOST_TZ_DATABASE_PKGDIR)/usr/share/zoneinfo
 
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] zlib: Fix build on non-Linux hosts

2012-01-15 Thread Bernhard Walle
The build system of zlib uses 'uname' to determine the operating system
for which it compiles zlib. However, on non-Linux hosts, this leads to
wrong results.

Fixes Darwin (tested on Mac OS 10.7 Lion), doesn't break Linux (verified
with current Arch Linux on x86_64).

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/zlib.make |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/rules/zlib.make b/rules/zlib.make
index 0d437e3..2013384 100644
--- a/rules/zlib.make
+++ b/rules/zlib.make
@@ -40,6 +40,7 @@ $(ZLIB_SOURCE):
 
 ZLIB_CONF_ENV := \
$(CROSS_ENV) \
+   uname=Linux \
CROSS_PREFIX=$(PTXCONF_COMPILER_PREFIX) \
CFLAGS=$(CROSS_CPPFLAGS) -O2 -g
 
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] i2c-tools: version bump (3.0.3 - 3.1.0)

2012-01-03 Thread Bernhard Walle
Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/i2c-tools.make |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/i2c-tools.make b/rules/i2c-tools.make
index 6ee8582..a8d2d00 100644
--- a/rules/i2c-tools.make
+++ b/rules/i2c-tools.make
@@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_I2C_TOOLS) += i2c-tools
 #
 # Paths and names
 #
-I2C_TOOLS_VERSION  := 3.0.3
-I2C_TOOLS_MD5  := 511376eed04455cdb277ef19c5f73bb4
+I2C_TOOLS_VERSION  := 3.1.0
+I2C_TOOLS_MD5  := f15019e559e378c6e9d5d6299a00df21
 I2C_TOOLS  := i2c-tools-$(I2C_TOOLS_VERSION)
 I2C_TOOLS_SUFFIX   := tar.bz2
 I2C_TOOLS_URL  := 
http://dl.lm-sensors.org/i2c-tools/releases/$(I2C_TOOLS).$(I2C_TOOLS_SUFFIX)
-- 
1.7.8.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Update host-cmake to 2.8.7

2012-01-02 Thread Bernhard Walle
Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 ...-only-look-for-Python-with-version-number.patch |0
 patches/{cmake-2.8.6 = cmake-2.8.7}/series|0
 rules/host-cmake.make  |4 ++--
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename patches/{cmake-2.8.6 = 
cmake-2.8.7}/0001-only-look-for-Python-with-version-number.patch (100%)
 rename patches/{cmake-2.8.6 = cmake-2.8.7}/series (100%)

diff --git 
a/patches/cmake-2.8.6/0001-only-look-for-Python-with-version-number.patch 
b/patches/cmake-2.8.7/0001-only-look-for-Python-with-version-number.patch
similarity index 100%
rename from 
patches/cmake-2.8.6/0001-only-look-for-Python-with-version-number.patch
rename to 
patches/cmake-2.8.7/0001-only-look-for-Python-with-version-number.patch
diff --git a/patches/cmake-2.8.6/series b/patches/cmake-2.8.7/series
similarity index 100%
rename from patches/cmake-2.8.6/series
rename to patches/cmake-2.8.7/series
diff --git a/rules/host-cmake.make b/rules/host-cmake.make
index 03e560a..b3fb413 100644
--- a/rules/host-cmake.make
+++ b/rules/host-cmake.make
@@ -17,8 +17,8 @@ HOST_PACKAGES-$(PTXCONF_HOST_CMAKE) += host-cmake
 #
 # Paths and names
 #
-HOST_CMAKE_VERSION := 2.8.6
-HOST_CMAKE_MD5 := 2147da452fd9212bb9b4542a9eee9d5b
+HOST_CMAKE_VERSION := 2.8.7
+HOST_CMAKE_MD5 := e1b237aeaed880f65dec9c20602452f6
 HOST_CMAKE := cmake-$(HOST_CMAKE_VERSION)
 HOST_CMAKE_SUFFIX  := tar.gz
 HOST_CMAKE_URL := 
http://www.cmake.org/files/v2.8/$(HOST_CMAKE).$(HOST_CMAKE_SUFFIX)
-- 
1.7.8.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] strace: Version bump to 4.6

2011-12-08 Thread Bernhard Walle
Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/strace.make |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rules/strace.make b/rules/strace.make
index 3598c9c..2ac89e4 100644
--- a/rules/strace.make
+++ b/rules/strace.make
@@ -18,10 +18,10 @@ PACKAGES-$(PTXCONF_STRACE) += strace
 #
 # Paths and names
 #
-STRACE_VERSION := 4.5.20
-STRACE_MD5 := 64dfe10d9db0c1e34030891695ffca4b
+STRACE_VERSION := 4.6
+STRACE_MD5 := e537b2b1afeec70c0e6e27a0d0fd671e
 STRACE := strace-$(STRACE_VERSION)
-STRACE_SUFFIX  := tar.bz2
+STRACE_SUFFIX  := tar.xz
 STRACE_URL := $(PTXCONF_SETUP_SFMIRROR)/strace/$(STRACE).$(STRACE_SUFFIX)
 STRACE_SOURCE  := $(SRCDIR)/$(STRACE).$(STRACE_SUFFIX)
 STRACE_DIR := $(BUILDDIR)/$(STRACE)
-- 
1.7.8


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] alsa-lib: Allow installation of /etc/asound.conf

2011-11-08 Thread Bernhard Walle
* Juergen Beisert j...@pengutronix.de [2011-11-08 15:29]:
 bernh...@bwalle.de wrote:
  [...]
  diff --git a/rules/alsa-lib.make b/rules/alsa-lib.make
  index 929ab4e..bfec83f 100644
  --- a/rules/alsa-lib.make
  +++ b/rules/alsa-lib.make
  @@ -207,6 +207,12 @@ endif
  /usr/share/alsa/pcm/dsnoop.conf)
   endif
 
  +ifdef PTXCONF_ALSA_LIB_ASOUND_CONF
  +   @$(call install_copy, alsa-lib, 0, 0, 0644, \
  +   $(PTXDIST_WORKSPACE)/projectroot/etc/asound.conf, \
  +   /etc/asound.conf)
  +endif
  +
 
 You should use the 'install_alternative' macro here. It's more flexible and 
 you also can store this special file in the platform instead of the BSP 
 project (as this file is more related to the platform than the BSP).

Ah, yes, sorry. It's still from my first steps with ptxdist and after
the latest ALSA update I had to adjust my copied alsa-lib.*, so I
thought it's better to send it mainline. Unfortunately, I didn't take a
closer look ...

Updated patch will follow.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] ptxdist options help

2011-11-07 Thread Bernhard Walle
Hi,

* Erwin Rol mailingli...@erwinrol.com [2011-11-03 23:48]:
 
 could someone explain the idea behind the following ptxdist options ?
 
 Build Type (development)
 [ ] use pre-built production release
 [ ] built on top of another platform

Don't know about that options, but I'm also interested in the second two
options.

Hopefully somebody of the ptxdist gurus (Michael? Jürgen?) can comment
if that's correct and answer my remaining questions:

 [ ] create dev packages

This option creates (in addition to the ipk packages that can be
installed on the target and that are used to create the target image)
for each package a PKGNAME_$HASH_$ARCH-dev.tar.gz  (in
platform-$PLATFORM/packages) that contains everything the packages
installs, not only the subset that is selected by the package.mk.
Especially it contains header files for libraries that are not on the
target. So some kind of $package.deb + $package-dev.deb.

This package can be used in this step:

 [ ] use dev packages

If a development package is available, then ptxdist uses the contents of
the development package to package the ipk package and to build the
sysroot. It doesn't compile the package from source. This even works if
the source isn't available.

One remaining question: What exactly is the checksum? Is it honoured in
the process when ptxdist checks if it uses the development package
instead of building it from source? The ptxdist sources are a bit hard
to read in that area ... at least for me. ;) Wouldn't it make sense to
include the version number of the package in the file name?


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] host-tz-database: Update tzdata to 2011n

2011-11-07 Thread Bernhard Walle
Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/host-tz-database.make |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/host-tz-database.make b/rules/host-tz-database.make
index 180e2bd..453c120 100644
--- a/rules/host-tz-database.make
+++ b/rules/host-tz-database.make
@@ -31,8 +31,8 @@ TZCODE_SOURCE := $(SRCDIR)/$(TZCODE).$(TZCODE_SUFFIX)
 TZCODE_DIR := $(HOST_TZDATABASE_DIR)
 TZCODE_STRIP_LEVEL := 0
 
-TZDATA_VERSION := 2011i
-TZDATA_MD5 := c7a86ec34f30f8d6aa77ef94902a3047
+TZDATA_VERSION := 2011n
+TZDATA_MD5 := 20dbfb28efa008ddbf6dd34601ea40fa
 TZDATA := tzdata$(TZDATA_VERSION)
 TZDATA_SUFFIX  := tar.gz
 TZDATA_URL := \
-- 
1.7.7.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH RESEND 1/2] Add host-bison package

2011-11-07 Thread Bernhard Walle
From: Bernhard Walle wa...@corscience.de

Since we have host-flex, it makes also sense to get independent of
the bison installation of the host.

Signed-off-by: Bernhard Walle wa...@corscience.de
---
 rules/host-bison.in   |8 
 rules/host-bison.make |   32 
 rules/pre/bison.make  |5 +
 3 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 rules/host-bison.in
 create mode 100644 rules/host-bison.make
 create mode 100644 rules/pre/bison.make

diff --git a/rules/host-bison.in b/rules/host-bison.in
new file mode 100644
index 000..41bb930
--- /dev/null
+++ b/rules/host-bison.in
@@ -0,0 +1,8 @@
+## SECTION=hosttools_noprompt
+
+config HOST_BISON
+   tristate
+   help
+ The parser generator (replaces yacc).
+
+# vim: syntax=kconfig
diff --git a/rules/host-bison.make b/rules/host-bison.make
new file mode 100644
index 000..d62b0b4
--- /dev/null
+++ b/rules/host-bison.make
@@ -0,0 +1,32 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Bernhard Walle wa...@corscience.de
+#
+# 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
+#
+HOST_PACKAGES-$(PTXCONF_HOST_BISON) += host-bison
+
+#
+# Paths and names
+#
+HOST_BISON_VERSION := 2.5
+HOST_BISON_MD5 := 9dba20116b13fc61a0846b0058fbe004
+HOST_BISON := bison-$(HOST_BISON_VERSION)
+HOST_BISON_SUFFIX  := tar.bz2
+HOST_BISON_URL := 
http://ftp.gnu.org/gnu/bison/$(HOST_BISON).$(HOST_BISON_SUFFIX)
+HOST_BISON_SOURCE  := $(SRCDIR)/$(HOST_BISON).$(HOST_BISON_SUFFIX)
+HOST_BISON_DIR := $(HOST_BUILDDIR)/$(HOST_BISON)
+
+#
+# autoconf
+#
+HOST_BISON_CONF_TOOL   := autoconf
+
+# vim: syntax=make
diff --git a/rules/pre/bison.make b/rules/pre/bison.make
new file mode 100644
index 000..cfbee38
--- /dev/null
+++ b/rules/pre/bison.make
@@ -0,0 +1,5 @@
+# -*-makefile-*-
+
+ifdef PTXCONF_HOST_BISON
+export BISON_PKGDATADIR=$(PTXCONF_SYSROOT_HOST)/share/bison
+endif
-- 
1.7.7.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH RESEND 2/2] bash: Use host-bison

2011-11-07 Thread Bernhard Walle
From: Bernhard Walle wa...@corscience.de

This commit contains also two small whitespace fixes.

Signed-off-by: Bernhard Walle wa...@corscience.de
---
 rules/bash.in |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/rules/bash.in b/rules/bash.in
index 7ef65a9..fd5a9a6 100644
--- a/rules/bash.in
+++ b/rules/bash.in
@@ -4,14 +4,15 @@ menuconfig BASH
select LIBC_DL
select GCCLIBS_GCC_S
select NCURSES if BASH_CURSES
+   select HOST_BISON
help
  The GNU Bourne Again SHell
  Bash is an sh-compatible command language interpreter that executes
- commands read from the standard input or from a file.  Bash also
- incorporates useful features from the Korn and C shells (ksh and csh).
+ commands read from the standard input or from a file.  Bash also
+ incorporates useful features from the Korn and C shells (ksh and csh).
 
  Bash is ultimately intended to be a conformant implementation of the
- IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).
+ IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).
 
  Included in the bash package is the Programmable Completion Code,
  by Ian Macdonald.
-- 
1.7.7.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] sqlite: Update to 3.7.9

2011-11-04 Thread Bernhard Walle
See http://www.sqlite.org/releaselog/3_7_9.html for a full changelog.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/sqlite.make |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/sqlite.make b/rules/sqlite.make
index a86e394..9491c4e 100644
--- a/rules/sqlite.make
+++ b/rules/sqlite.make
@@ -20,8 +20,8 @@ PACKAGES-$(PTXCONF_SQLITE) += sqlite
 #
 # Paths and names
 #
-SQLITE_VERSION := 3070800
-SQLITE_MD5 := 6bfb46d73caaa1bbbcd2b52184b6c542
+SQLITE_VERSION := 3070900
+SQLITE_MD5 := dce303524736fe89a76b8ed29d566352
 SQLITE_TYPE:= autoconf
 ifeq ($(SQLITE_TYPE),)
 SQLITE := sqlite-$(SQLITE_VERSION)
-- 
1.7.7.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] Install a iconv libraries

2011-11-03 Thread Bernhard Walle
* Robert Schwebel r.schwe...@pengutronix.de [2011-11-01 17:28]:
 
 On Tue, Nov 01, 2011 at 02:07:59AM +0100, Ludovic BOUE wrote:
  My program returns empty string from iconv function.
 
 I think iconv is not well tested (if at all) in ptxdist, so any help in
 that area is welcome!

Basically it works. I use it to convert utf-8 to iso8859-1 for a LCD
display. The only special thing I did in ptxdist is to generate an
utf-8 locale.

My ptxdist project is at https://bitbucket.org/bwalle/ptxdist-vetero,
and my adjusted locales.in and locales.make are at 
https://bitbucket.org/bwalle/ptxdist-vetero/src/54844be01185/rules.

HTH a bit.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] ptxd_ipkg_rev_smaller: fix compare with empty micro

2011-10-20 Thread Bernhard Walle
* Jon Ringle j...@ringle.org [2011-10-19 21:55]:
 
 What do you think about the bash implementation found here:
 http://lists.us.dell.com/pipermail/dkms-devel/2004-July/000142.html

If it is correct and works, why not.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] ptxd_ipkg_rev_smaller: fix compare with empty micro

2011-10-19 Thread Bernhard Walle

Am 19.10.2011 19:46, schrieb Robert Schwebel:

On Tue, Oct 18, 2011 at 04:42:46AM -0400, Jon Ringle wrote:

After more testing, I found that there were other situations where the version
comparison does not work well.

I ended up replacing the implementation of ptxd_ipkg_rev_smaller() with
something much simpler, albeit dependent on dpkg that seems to work well:

ptxd_ipkg_rev_smaller() {
 dpkg --compare-versions $1 lt $2
}


Hmm, that makes us dependend on dpkg (and thus on Debian). PTXdist tries
hard to run on any distribution, so I'm not happy with this.


Maybe Perl would be okay?

http://www.emdebian.org/trac/browser/current/target/dpkg/trunk/scripts/Dpkg/Version.pm?rev=6998

Seems to be quite official, and the Dpkg::ErrorHandling and 
Dpkg::Gettext could be easily removed.



Regards,
Bernhard

--
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*

2011-10-17 Thread Bernhard Walle
* Andreas Bießmann andr...@biessmann.de [2011-10-17 09:06]:
 
 It's not really nice, but I think it's better than patching lots of
 tools. And having scripts as executable programs is IMO still better
 than having to call the interpreter manually (which is necessary with
 your $PTXDIST_SED approach.
 
 But how should we handle a script's sheebang? If we require the
 scripts/migrate tools to be executable scripts we need to preprocess
 the scripts to adopt the sheebang to e.g. $PTXDIST_BINDIR. I think
 it is much more portable to have the shell scripts kall the
 interpreter with the respective configuration, e.g.
 $PTXDIST_BINDIR/sed -f scripts/migrate/migrate_platform.

sed is the only exception I know that requires an argument.
#!/usr/bin/env perl, #!/usr/bin/env python, #!/usr/bin/env ruby works.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*

2011-10-14 Thread Bernhard Walle
Hi,

* Michael Olbrich m.olbr...@pengutronix.de [2011-10-14 16:04]:
 Hmmm, I just had another idea: How about fixing the environment in ptxdist:
 
 mkdir TMP_BIN/
 ln -s @PYTHON@ TMP_BIN/python
 ln -s @SED@ TMP_BIN/sed
 [...]
 export PATH=TMP_BIN:$PATH
 [...]
 
 just do this as early as possible in ptxdist and PATH will provide the
 correct tools. Do you think that could work?

That's what I'm doing in the Arch Linux ptxdist package [1]. Arch Linux
has /usr/bin/python pointing to /usr/bin/python3 instead of python2.
There's a configure flag for ptxdist and Python, but that doesn't work.

I sent a patch [2], but even that patch doesn't fix everything (there's
still some ipkg problem). Because I was too lazy I changed it that way
(modifying PATH).

I'm doing 

- 8 
export PATH=$(dirname $(readlink -f $0)):$PATH
- 8 

which inclues /usr/lib/ptxdist-2011.xx.y/bin into $PATH and that works.
It's not really nice, but I think it's better than patching lots of
tools. And having scripts as executable programs is IMO still better
than having to call the interpreter manually (which is necessary with
your $PTXDIST_SED approach.


Regards,
Bernhard

[1] http://aur.archlinux.org/packages.php?ID=49649
[2] http://www.mail-archive.com/ptxdist@pengutronix.de/msg04264.html

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [ANNOUNCE] PTXdist 2011.10.1 released

2011-10-11 Thread Bernhard Walle
Hi Michael,

* Michael Olbrich m.olbr...@pengutronix.de [2011-10-10 14:53]:
 
 I've just released PTXdist 2011.10.1. Just one patch this time, but an
 annoying issue, the Qt 4.7.4 md5sum changed.

could you also provide a tarball at 
http://www.pengutronix.de/software/ptxdist/download/?


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 1/2] udev: Use ptxdist kernel headers

2011-09-19 Thread Bernhard Walle
Am 20.09.11 05:37, schrieb Jon Ringle:

 diff --git a/rules/udev.make b/rules/udev.make
 index ac2f0d4..b57bd01 100644
 --- a/rules/udev.make
 +++ b/rules/udev.make
 @@ -47,6 +47,11 @@ $(UDEV_SOURCE):

  #
  # autoconf
 +
 +UDEV_CONF_ENV := \
 +   $(CROSS_ENV) \
 +   CPPFLAGS=-I$(KERNEL_HEADERS_INCLUDE_DIR) $(CROSS_CPPFLAGS)
 +
 
 This breaks udev for me. #include scsi/scsi.h includes the wrong header 
 file:

So why do you enable the option at all if your toolchain has up-to-date
kernel headers?


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 1/2] Add host-bison package

2011-08-31 Thread Bernhard Walle
Hi,

thanks for the review. I'll post the updated patch.

Am 29.08.11 12:04, schrieb Michael Olbrich:
 --- /dev/null
  +++ b/rules/pre/bison.make
  @@ -0,0 +1,5 @@
  +# -*-makefile-*-
  +
  +ifdef PTXCONF_HOST_BISON
  +export BISON_PKGDATADIR=$(PTXCONF_SYSROOT_HOST)/share/bison
  +endif
 What is this for?

Without this, bison doesn't find its runtime files
($(PTXCONF_SYSROOT_HOST)/share/bison/m4sugar/m4sugar.m4). It uses PREFIX
(DATADIR) which is /usr/share.

I tried to set --prefix to $(PTXCONF_SYSROOT_HOST) and DESTDIR to '',
but it didn't work. Don't remember the cause.

Setting the environment variable was the easiest solution without
patching the source code, but if you don't accept that, I can
investigate the isse again and find a better solution. But give me some
days as I'm quite busy...


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/2] Add host-bison package

2011-08-31 Thread Bernhard Walle
From: Bernhard Walle wa...@corscience.de

Since we have host-flex, it makes also sense to get independent of
the bison installation of the host.

Signed-off-by: Bernhard Walle wa...@corscience.de
---
 rules/host-bison.in   |8 
 rules/host-bison.make |   32 
 rules/pre/bison.make  |5 +
 3 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 rules/host-bison.in
 create mode 100644 rules/host-bison.make
 create mode 100644 rules/pre/bison.make

diff --git a/rules/host-bison.in b/rules/host-bison.in
new file mode 100644
index 000..41bb930
--- /dev/null
+++ b/rules/host-bison.in
@@ -0,0 +1,8 @@
+## SECTION=hosttools_noprompt
+
+config HOST_BISON
+   tristate
+   help
+ The parser generator (replaces yacc).
+
+# vim: syntax=kconfig
diff --git a/rules/host-bison.make b/rules/host-bison.make
new file mode 100644
index 000..d62b0b4
--- /dev/null
+++ b/rules/host-bison.make
@@ -0,0 +1,32 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Bernhard Walle wa...@corscience.de
+#
+# 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
+#
+HOST_PACKAGES-$(PTXCONF_HOST_BISON) += host-bison
+
+#
+# Paths and names
+#
+HOST_BISON_VERSION := 2.5
+HOST_BISON_MD5 := 9dba20116b13fc61a0846b0058fbe004
+HOST_BISON := bison-$(HOST_BISON_VERSION)
+HOST_BISON_SUFFIX  := tar.bz2
+HOST_BISON_URL := 
http://ftp.gnu.org/gnu/bison/$(HOST_BISON).$(HOST_BISON_SUFFIX)
+HOST_BISON_SOURCE  := $(SRCDIR)/$(HOST_BISON).$(HOST_BISON_SUFFIX)
+HOST_BISON_DIR := $(HOST_BUILDDIR)/$(HOST_BISON)
+
+#
+# autoconf
+#
+HOST_BISON_CONF_TOOL   := autoconf
+
+# vim: syntax=make
diff --git a/rules/pre/bison.make b/rules/pre/bison.make
new file mode 100644
index 000..cfbee38
--- /dev/null
+++ b/rules/pre/bison.make
@@ -0,0 +1,5 @@
+# -*-makefile-*-
+
+ifdef PTXCONF_HOST_BISON
+export BISON_PKGDATADIR=$(PTXCONF_SYSROOT_HOST)/share/bison
+endif
-- 
1.7.6.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] udev: Use ptxdist kernel headers

2011-08-17 Thread Bernhard Walle
Am 16.08.2011 15:56, schrieb Michael Olbrich:
 On Mon, Aug 15, 2011 at 07:34:58PM +0200, bernh...@bwalle.de wrote:
 From: Bernhard Walle wa...@corscience.de

 When a toolchain without kernel headers (such as the Lite version from
 Codesourcery) or with very old kernel header is used, udev doesn't build
 because videodev.h is missing.

 This patch adds the $(KERNEL_HEADERS_INCLUDE_DIR) to the include path of
 udev like it's done for busybox or barebox.

 Tested on ARM with kernel headers 2.6.36.4 (the version
 OSELAS.Toolchain() is currently using).
 
 You need to select KERNEL_HEADERS as well otherwise udev might be build
 before the kernel headers are available.

But how to express the fact that we don't want to force the kernel
headers to be built. But if they are built, they should be built before
udev.

Does select KERNEL_HEADERS if KERNEL_HEADERS work?


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] OSELAS.Toolchain: fixup_ptxconfigs.sh

2011-08-16 Thread Bernhard Walle
Hi,

if I run ./fixup_ptxconfigs.sh, I get an error message in line 280 that
./p doesn't exist. What is ./p?


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [oselas] [PATCH] Add i486 toolchain

2011-08-15 Thread Bernhard Walle
* Marc Kleine-Budde m...@pengutronix.de [2011-08-15 12:25]:
 On 08/15/2011 12:20 PM, Juergen Beisert wrote:
  Marc Kleine-Budde wrote:
  On 08/14/2011 12:51 PM, Bernhard Walle wrote:
  The toolchain has been tested with a so-called Bifferboard
  (http://bifferos.co.uk/) which has a S3282 BGA CPU (R861x/R321x
  equivalent) that understands 486SX instructions.
 
  What about the FPU? Does the cpu support float instructions? Does the
  toolchain genereate them?
  
  486*SX* means no FPU. 486*DX* means with FPU.
 
 What does cat /proc/cpuinfo show?
 
 So the processor doesn't support fpu, does the toolchain generate FPU
 instructions?

No, the CPU has no FPU. But the kernel is able to emulate the FPU,
so it's just slow but it works.

I just didn't manage to create a i486 toolchain with soft-float.
See also http://old.nabble.com/i486-toolchain-with-softfloat-td31879412.html.

The hint about multilib didn't help either. Do you have any ideas?



Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [oselas] [PATCH] Add i486 toolchain

2011-08-15 Thread Bernhard Walle
Am 15.08.2011 12:31, schrieb Marc Kleine-Budde:
 
 You have to build the compiler with no fpu support - and probably the
 glibc, too.

In theory it's clear, but it didn't work. I'll check which args I did
use and will post them, once I'm at home...


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 2/2] valgrind: Fix build with Linux 3.0

2011-08-07 Thread Bernhard Walle
While valgrind shouldn't check the Linux kernel version of the host, it
does and this commit fixes the build if the host is running a 3.0
kernel.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 .../0002-configure-fix-build-with-linux-3.0.patch  |   47 
 patches/valgrind-3.6.1/series  |1 +
 2 files changed, 48 insertions(+), 0 deletions(-)
 create mode 100644 
patches/valgrind-3.6.1/0002-configure-fix-build-with-linux-3.0.patch

diff --git 
a/patches/valgrind-3.6.1/0002-configure-fix-build-with-linux-3.0.patch 
b/patches/valgrind-3.6.1/0002-configure-fix-build-with-linux-3.0.patch
new file mode 100644
index 000..3c4d931
--- /dev/null
+++ b/patches/valgrind-3.6.1/0002-configure-fix-build-with-linux-3.0.patch
@@ -0,0 +1,47 @@
+Fix build with Linux 3.0
+
+This commit is from the Valgrind SVN
+(svn://svn.valgrind.org/valgrind/trunk):
+
+
+r11796 | bart | 2011-06-05 10:51:47 +0200 (So, 05. Jun 2011) | 4 Zeilen
+
+Make Valgrind build on Linux kernel 3.0 and beyond. Closes #274926. An official
+statement that the Linux kernel 3.0 API and ABI is compatible with Linux kernel
+2.6 can be found here: http://lkml.org/lkml/2011/5/29/204.
+
+
+
+To avoid running autoreconf, the change has also been made in configure
+directly.
+
+
+Signed-off-by: Bernhard Walle bernh...@bwalle.de
+
+---
+ configure|2 +-
+ configure.in |2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/configure.in
 b/configure.in
+@@ -220,7 +220,7 @@ case ${host_os} in
+ kernel=`uname -r`
+ 
+ case ${kernel} in
+- 2.6.*) 
++ 2.6.*|3.*) 
+   AC_MSG_RESULT([2.6 family (${kernel})])
+   AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using 
Linux 2.6.x])
+   ;;
+--- a/configure
 b/configure
+@@ -5348,7 +5348,7 @@ $as_echo_n checking for the kernel vers
+ kernel=`uname -r`
+ 
+ case ${kernel} in
+- 2.6.*)
++ 2.6.*|3.*) 
+   { $as_echo $as_me:${as_lineno-$LINENO}: result: 2.6 family 
(${kernel}) 5
+ $as_echo 2.6 family (${kernel}) 6; }
+ 
diff --git a/patches/valgrind-3.6.1/series b/patches/valgrind-3.6.1/series
index 4db899d..8bbcb5f 100644
--- a/patches/valgrind-3.6.1/series
+++ b/patches/valgrind-3.6.1/series
@@ -1,3 +1,4 @@
 # generated by git-ptx-patches
 0001-configure-allow-all-arm-don-t-restrict-to-armv7.patch
 # bfabec993b2d4636784bbd5fd034c019  - git-ptx-patches magic
+0002-configure-fix-build-with-linux-3.0.patch
-- 
1.7.6


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/2] valgrind: Also patch configure.in, not only configure

2011-08-07 Thread Bernhard Walle
While it's a good idea to avoid running autoreconf just because two
letters that have changed, it makes sense to add the change in the
configure.in file, so that autoreconf doesn't break the build.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 ...ure-allow-all-arm-don-t-restrict-to-armv7.patch |   21 +--
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git 
a/patches/valgrind-3.6.1/0001-configure-allow-all-arm-don-t-restrict-to-armv7.patch
 
b/patches/valgrind-3.6.1/0001-configure-allow-all-arm-don-t-restrict-to-armv7.patch
index b2fe6c2..63447b7 100644
--- 
a/patches/valgrind-3.6.1/0001-configure-allow-all-arm-don-t-restrict-to-armv7.patch
+++ 
b/patches/valgrind-3.6.1/0001-configure-allow-all-arm-don-t-restrict-to-armv7.patch
@@ -4,11 +4,10 @@ Subject: [PATCH] configure: allow all arm, don't restrict to 
armv7
 
 Signed-off-by: Marc Kleine-Budde m...@pengutronix.de
 ---
- configure |2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ configure|2 +-
+ configure.in |2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/configure b/configure
-index 699137b..1179122 100755
 --- a/configure
 +++ b/configure
 @@ -5262,7 +5262,7 @@ $as_echo ok (${host_cpu}) 6; }
@@ -20,6 +19,14 @@ index 699137b..1179122 100755
{ $as_echo $as_me:${as_lineno-$LINENO}: result: ok (${host_cpu}) 5
  $as_echo ok (${host_cpu}) 6; }
ARCH_MAX=arm
--- 
-1.7.4.1
-
+--- a/configure.in
 b/configure.in
+@@ -158,7 +158,7 @@ case ${host_cpu} in
+ esac
+ ;;
+ 
+- armv7*)
++ arm*)
+   AC_MSG_RESULT([ok (${host_cpu})])
+   ARCH_MAX=arm
+   ;;
-- 
1.7.6


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] state of ext3 on OSELAS Generic

2011-08-01 Thread Bernhard Walle
Hi,

Am 01.08.2011 08:50, schrieb Raz:
 Hello
 I am trying to create ext3 image and I came across the bellow discussion.

See that commit
http://git.pengutronix.de/?p=ptxdist.git;a=commit;h=2e2bf6b952c86f4ee25c61876b80bd290e8389b9.

It's not yet in a released version of ptxdist, so you need to use the
git version.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] Memory Status

2011-07-15 Thread Bernhard Walle
* Josef Holzmayr holzm...@rsi-elektrotechnik.de [2011-07-15 09:39]:
  How can I determine how much RAM is
  available for my use (user application).
 
 Type man free into a terminal application on your development
 machine and use the knowledge gained to apply the command to your
 target. :-)

cat /proc/meminfo might also be an option if busybox has been compiled
without free.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Make it possible to create ext3 file system images

2011-07-15 Thread Bernhard Walle
Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 platforms/image_ext2.in|8 
 rules/post/image_ext2.make |   13 +
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/platforms/image_ext2.in b/platforms/image_ext2.in
index b28c5e3..c26efd0 100644
--- a/platforms/image_ext2.in
+++ b/platforms/image_ext2.in
@@ -30,4 +30,12 @@ config IMAGE_EXT2_GZIP
help
  FIXME: This item needs to be documented
 
+config IMAGE_EXT2_JOURNAL
+   bool
+   select HOST_E2FSPROGS
+   prompt Add a journal to the ext2 file system image, making it ext3
+   help
+ Enable this option if you want to mount the root file system as
+ ext3 image.
+
 endif
diff --git a/rules/post/image_ext2.make b/rules/post/image_ext2.make
index 849c8fe..edddf56 100644
--- a/rules/post/image_ext2.make
+++ b/rules/post/image_ext2.make
@@ -24,6 +24,19 @@ $(IMAGEDIR)/root.ext2: $(STATEDIR)/image_working_dir
) | $(FAKEROOT) --
@echo done.
 
+ifdef PTXCONF_IMAGE_EXT2_JOURNAL
+#  # Since genext2fs cannot generate ext3 images, we use tune2fs to create
+#  # the journal entry and then run e2fsck to update the revision from 0
+#  # to 1 to prevent a mount warning. Since both programs lack a quiet
+#  # mode we use output redirection (and since we're operating on files
+#  # and not on real block devices, it's very unlikely that there are
+#  # errors we want to see.
+   @echo -n Adding a journal to root.ext2 ...
+   @cd $(image/work_dir)
+   @tune2fs -j $(IMAGEDIR)/root.ext2  /dev/null
+   @e2fsck -y $(IMAGEDIR)/root.ext2  /dev/null 21
+   @echo  done.
+endif
 
 $(IMAGEDIR)/root.ext2.gz: $(IMAGEDIR)/root.ext2
@echo -n Creating root.ext2.gz from root.ext2...;
-- 
1.7.6


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Fix CMAKE_SYSTEM_PROCESSOR entry in cmake toolchain file

2011-07-15 Thread Bernhard Walle
This fixes commit 51aaa12b07b03b8e60909539a3dabf6594f462f2. Without that
fix, the CMAKE_SYSTEM_PROCESSOR entry in the toolchain file was actually
empty.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/post/ptxd_make_cmake_toolchain.make |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/rules/post/ptxd_make_cmake_toolchain.make 
b/rules/post/ptxd_make_cmake_toolchain.make
index da49bc6..1eeb3ff 100644
--- a/rules/post/ptxd_make_cmake_toolchain.make
+++ b/rules/post/ptxd_make_cmake_toolchain.make
@@ -10,6 +10,7 @@
 
 $(PTXDIST_CMAKE_TOOLCHAIN_TARGET):
@$(CROSS_ENV) \
+   PTXCONF_ARCH_STRING=${PTXCONF_ARCH_STRING} \
ptxd_make_cmake_toolchain_target ${@}
 
 $(PTXDIST_CMAKE_TOOLCHAIN_HOST):
-- 
1.7.6


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Make it possible to create ext3 file system images

2011-07-15 Thread Bernhard Walle
Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 platforms/image_ext2.in|8 
 rules/post/image_ext2.make |   12 
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/platforms/image_ext2.in b/platforms/image_ext2.in
index b28c5e3..c26efd0 100644
--- a/platforms/image_ext2.in
+++ b/platforms/image_ext2.in
@@ -30,4 +30,12 @@ config IMAGE_EXT2_GZIP
help
  FIXME: This item needs to be documented
 
+config IMAGE_EXT2_JOURNAL
+   bool
+   select HOST_E2FSPROGS
+   prompt Add a journal to the ext2 file system image, making it ext3
+   help
+ Enable this option if you want to mount the root file system as
+ ext3 image.
+
 endif
diff --git a/rules/post/image_ext2.make b/rules/post/image_ext2.make
index 849c8fe..ed7d037 100644
--- a/rules/post/image_ext2.make
+++ b/rules/post/image_ext2.make
@@ -24,6 +24,18 @@ $(IMAGEDIR)/root.ext2: $(STATEDIR)/image_working_dir
) | $(FAKEROOT) --
@echo done.
 
+ifdef PTXCONF_IMAGE_EXT2_JOURNAL
+#  # Since genext2fs cannot generate ext3 images, we use tune2fs to create
+#  # the journal entry and then run e2fsck to update the revision from 0
+#  # to 1 to prevent a mount warning. Since both programs lack a quiet
+#  # mode we use output redirection (and since we're operating on files
+#  # and not on real block devices, it's very unlikely that there are
+#  # errors we want to see.
+   @echo -n Adding a journal to root.ext2 ...
+   @tune2fs -j $(IMAGEDIR)/root.ext2  /dev/null
+   @e2fsck -y $(IMAGEDIR)/root.ext2  /dev/null 21
+   @echo  done.
+endif
 
 $(IMAGEDIR)/root.ext2.gz: $(IMAGEDIR)/root.ext2
@echo -n Creating root.ext2.gz from root.ext2...;
-- 
1.7.6


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Update gnuplot to 4.4.3

2011-06-23 Thread Bernhard Walle
Also install Gnuplot runtime files which are needed for some formats
like Postscript or HTML5/Javascript when the configuration option is
selected.

Disable lua regardless whether lua is available or not.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 patches/gnuplot-4.2.6/series   |1 -
 .../{gnuplot-4.2.6 = gnuplot-4.4.3}/autogen.sh|0
 .../gnuplot-4.4.3-cc-for-build.diff}   |0
 patches/gnuplot-4.4.3/series   |1 +
 rules/gnuplot.in   |   26 ++-
 rules/gnuplot.make |   26 ++-
 6 files changed, 44 insertions(+), 10 deletions(-)
 delete mode 100644 patches/gnuplot-4.2.6/series
 rename patches/{gnuplot-4.2.6 = gnuplot-4.4.3}/autogen.sh (100%)
 rename patches/{gnuplot-4.2.6/gnuplot-4.2.2-cc-for-build.diff = 
gnuplot-4.4.3/gnuplot-4.4.3-cc-for-build.diff} (100%)
 create mode 100644 patches/gnuplot-4.4.3/series

diff --git a/patches/gnuplot-4.2.6/series b/patches/gnuplot-4.2.6/series
deleted file mode 100644
index 12cf91b..000
--- a/patches/gnuplot-4.2.6/series
+++ /dev/null
@@ -1 +0,0 @@
-gnuplot-4.2.2-cc-for-build.diff
diff --git a/patches/gnuplot-4.2.6/autogen.sh b/patches/gnuplot-4.4.3/autogen.sh
similarity index 100%
rename from patches/gnuplot-4.2.6/autogen.sh
rename to patches/gnuplot-4.4.3/autogen.sh
diff --git a/patches/gnuplot-4.2.6/gnuplot-4.2.2-cc-for-build.diff 
b/patches/gnuplot-4.4.3/gnuplot-4.4.3-cc-for-build.diff
similarity index 100%
rename from patches/gnuplot-4.2.6/gnuplot-4.2.2-cc-for-build.diff
rename to patches/gnuplot-4.4.3/gnuplot-4.4.3-cc-for-build.diff
diff --git a/patches/gnuplot-4.4.3/series b/patches/gnuplot-4.4.3/series
new file mode 100644
index 000..76fe674
--- /dev/null
+++ b/patches/gnuplot-4.4.3/series
@@ -0,0 +1 @@
+gnuplot-4.4.3-cc-for-build.diff
diff --git a/rules/gnuplot.in b/rules/gnuplot.in
index bf9b87b..e7062e7 100644
--- a/rules/gnuplot.in
+++ b/rules/gnuplot.in
@@ -16,11 +16,33 @@ menuconfig GNUPLOT
  many printers, (La)TeX, (x)fig, Postscript, and so on.
 
  Data files and self-defined functions can be manipulated by internal
- C-like language.  Can perform smoothing, spline-fitting, or nonlinear
- fits. Can work with complex numbers.
+ C-like language.  Can perform smoothing, spline-fitting, or nonlinear
+ fits. Can work with complex numbers.
 
 if GNUPLOT
 
+config GNUPLOT_HELP
+   bool
+   prompt Install interactive help
+   help
+ Installs the interactive help files on the target.
+ Requires about 600 kByte of space.
+
+config GNUPLOT_POSTSCRIPT
+   bool
+   prompt Install Postscript prolog files
+   help
+ Installs the prolog files needed to generate Postscript output. If you
+ don't need Postscript, you can turn off that setting. Requires about
+ 100 kByte of space.
+
+config GNUPLOT_JS
+   bool
+   prompt Install JavaScript runtime files
+   help
+ Installs some JavaScript files and PNG images which will be needed if
+ HTML5 output should be generated. Requires about 300 kByte of disk 
space.
+
 config GNUPLOT_FITERRVARS
bool
prompt Support for fitting error variables
diff --git a/rules/gnuplot.make b/rules/gnuplot.make
index 4de83b0..896087c 100644
--- a/rules/gnuplot.make
+++ b/rules/gnuplot.make
@@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_GNUPLOT) += gnuplot
 #
 # Paths and names
 #
-GNUPLOT_VERSION:= 4.2.6
-GNUPLOT_MD5:= c10468d74030e8bed0fd6865a45cf1fd
+GNUPLOT_VERSION:= 4.4.3
+GNUPLOT_MD5:= 639603752996f4923bc02c895fa03b45
 GNUPLOT:= gnuplot-$(GNUPLOT_VERSION)
 GNUPLOT_SUFFIX := tar.gz
 GNUPLOT_URL:= 
$(PTXCONF_SETUP_SFMIRROR)/gnuplot/$(GNUPLOT).$(GNUPLOT_SUFFIX)
@@ -49,7 +49,6 @@ GNUPLOT_ENV   := $(CROSS_ENV)
 GNUPLOT_AUTOCONF = \
$(CROSS_AUTOCONF_USR) \
--disable-history-file \
-   --disable-mouse \
--disable-x11-mbfonts \
--enable-binary-data-file \
--disable-with-image \
@@ -76,7 +75,8 @@ GNUPLOT_AUTOCONF = \
--without-lisp-files \
--without-row-help \
--without-tutorial \
-   --without-wx-config
+   --without-wx-config \
+   --without-lua
 
 ifdef PTXCONF_GNUPLOT_FITERRVARS
 GNUPLOT_AUTOCONF += --enable-fiterrvars
@@ -85,9 +85,9 @@ GNUPLOT_AUTOCONF += --disable-fiterrvars
 endif
 
 ifdef PTXCONF_GNUPLOT_X
-GNUPLOT_AUTOCONF += --with-x
+GNUPLOT_AUTOCONF += --with-x --enable-mouse
 else
-GNUPLOT_AUTOCONF += --without-x
+GNUPLOT_AUTOCONF += --without-x --disable-mouse
 endif
 
 ifdef PTXCONF_GNUPLOT_PLOT
@@ -138,8 +138,20 @@ $(STATEDIR)/gnuplot.targetinstall:
 
@$(call install_copy, gnuplot, 0, 0, 0755, -, /usr/bin/gnuplot)
 
+ifdef PTXCONF_GNUPLOT_HELP
+   @$(call install_copy, gnuplot, 0, 0, 0644, -, 
/usr/share/gnuplot/4.4/gnuplot.gih)
+endif
+
+ifdef PTXCONF_GNUPLOT_POSTSCRIPT

Re: [ptxdist] [PATCH] Add modeline for vim to *.in files

2011-06-23 Thread Bernhard Walle
* Alexander Dahl p...@lespocky.de [2011-06-23 18:10]:
 Hei hei, 
 
 On Thu, 23 Jun 2011 17:48:02 +0200, Bernhard Walle wrote:
  Set the file type to kconfig. The *.make files have a modeline for vim,
  so why not also for the Kconfig files.
 
 % grep vim: rules/*.in
 rules/argtable2.in:# vim: syntax=kconfig
 rules/calibrator.in:# vim: syntax=kconfig
 rules/hackbench.in:# vim: syntax=kconfig
 
 I would recommend altering these instead of adding an addtional line.
 ;-)

Granted.

 Despite of that: +1, very handy for vim users.
 
 If you're already on this topic: Would you mind adapting the modeline
 for the rules/*.make files to something like this?
 
 # vim: ft=make noet

Well, IMO setting the filetype is better than just the syntax, because
then you can add

autocmd FileType kconfig set ts=8 sw=8 noet
autocmd FileType makeset ts=8 sw=8 noet

to your .vimrc.

 But I guess the templates used by `ptxdist newpackage` should be
 changed too, so freshly created packages get modelines in the same
 style.

My patch touched also the templates.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Add modeline for vim to *.in files

2011-06-23 Thread Bernhard Walle
* Alexander Dahl p...@lespocky.de [2011-06-23 19:42]:
 Hello,
 
 On 23.06.2011 18:37, Bernhard Walle wrote:
  Well, IMO setting the filetype is better than just the syntax, because
  then you can add
  
  autocmd FileType kconfig set ts=8 sw=8 noet
  autocmd FileType makeset ts=8 sw=8 noet
  
  to your .vimrc.
 
 I would also recommend setting the file type. However the noet option
 would be helpful in the mode line itself because Makefiles don't work
 without tabs. Should one let this option of the user or override in the
 mode line because it's the only sense making setting? What do you think?

For Makefiles you're right, for Kconfig it's a matter of taste. But I
would use 'noexpandtab' because it's also readable for non vim-gurus
(although I myself use 'noet').

But let one of the ptxdist maintainers comment on the issue...


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Update gnuplot to 4.4.3

2011-06-22 Thread Bernhard Walle
* Michael Olbrich m.olbr...@pengutronix.de [2011-06-21 12:25]:
 Geht auf !x86 nicht:
 
 ./doc2gih ./gnuplot.doc gnuplot.gih
 ./doc2gih: 1: Syntax error: word unexpected (expecting ))
 
 doc2gih wird fuers target compiliert.
 
 GNUPLOT_MAKE_OPT  := -C src/
 GNUPLOT_INSTALL_OPT   := $(GNUPLOT_MAKE_OPT) install
 
 anstelle der momentanen compile stage sollte helfen.

It's much simpler: My check whether the build fix has been integrated
upstream was wrong.

However, I also recognised that the runtime files (including the
interactive help) is not installed. The new patch version installs
these. While we can discuss if it makes sense to have the help file on
the target (maybe an option?), we definitively need the runtime files,
e.g. the Postscript files if EPS should be generated.

Should I make configuratino options to disable some formats that need
runtime files? When generating SVG (what is what I am doing) I don't
need HTML5 runtime files. However, in my case it doesn't matter because
my space is quite unlimited.



Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Update gnuplot to 4.4.3

2011-06-22 Thread Bernhard Walle
Also install Gnuplot runtime files which are needed for some formats
like Postscript or HTML5/Javascript.

Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 patches/gnuplot-4.2.6/series   |1 -
 .../{gnuplot-4.2.6 = gnuplot-4.4.3}/autogen.sh|0
 .../gnuplot-4.4.3-cc-for-build.diff}   |0
 patches/gnuplot-4.4.3/series   |1 +
 rules/gnuplot.make |   10 ++
 5 files changed, 7 insertions(+), 5 deletions(-)
 delete mode 100644 patches/gnuplot-4.2.6/series
 rename patches/{gnuplot-4.2.6 = gnuplot-4.4.3}/autogen.sh (100%)
 rename patches/{gnuplot-4.2.6/gnuplot-4.2.2-cc-for-build.diff = 
gnuplot-4.4.3/gnuplot-4.4.3-cc-for-build.diff} (100%)
 create mode 100644 patches/gnuplot-4.4.3/series

diff --git a/patches/gnuplot-4.2.6/series b/patches/gnuplot-4.2.6/series
deleted file mode 100644
index 12cf91b..000
--- a/patches/gnuplot-4.2.6/series
+++ /dev/null
@@ -1 +0,0 @@
-gnuplot-4.2.2-cc-for-build.diff
diff --git a/patches/gnuplot-4.2.6/autogen.sh b/patches/gnuplot-4.4.3/autogen.sh
similarity index 100%
rename from patches/gnuplot-4.2.6/autogen.sh
rename to patches/gnuplot-4.4.3/autogen.sh
diff --git a/patches/gnuplot-4.2.6/gnuplot-4.2.2-cc-for-build.diff 
b/patches/gnuplot-4.4.3/gnuplot-4.4.3-cc-for-build.diff
similarity index 100%
rename from patches/gnuplot-4.2.6/gnuplot-4.2.2-cc-for-build.diff
rename to patches/gnuplot-4.4.3/gnuplot-4.4.3-cc-for-build.diff
diff --git a/patches/gnuplot-4.4.3/series b/patches/gnuplot-4.4.3/series
new file mode 100644
index 000..76fe674
--- /dev/null
+++ b/patches/gnuplot-4.4.3/series
@@ -0,0 +1 @@
+gnuplot-4.4.3-cc-for-build.diff
diff --git a/rules/gnuplot.make b/rules/gnuplot.make
index 4de83b0..bbfa340 100644
--- a/rules/gnuplot.make
+++ b/rules/gnuplot.make
@@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_GNUPLOT) += gnuplot
 #
 # Paths and names
 #
-GNUPLOT_VERSION:= 4.2.6
-GNUPLOT_MD5:= c10468d74030e8bed0fd6865a45cf1fd
+GNUPLOT_VERSION:= 4.4.3
+GNUPLOT_MD5:= 639603752996f4923bc02c895fa03b45
 GNUPLOT:= gnuplot-$(GNUPLOT_VERSION)
 GNUPLOT_SUFFIX := tar.gz
 GNUPLOT_URL:= 
$(PTXCONF_SETUP_SFMIRROR)/gnuplot/$(GNUPLOT).$(GNUPLOT_SUFFIX)
@@ -49,7 +49,6 @@ GNUPLOT_ENV   := $(CROSS_ENV)
 GNUPLOT_AUTOCONF = \
$(CROSS_AUTOCONF_USR) \
--disable-history-file \
-   --disable-mouse \
--disable-x11-mbfonts \
--enable-binary-data-file \
--disable-with-image \
@@ -86,8 +85,10 @@ endif
 
 ifdef PTXCONF_GNUPLOT_X
 GNUPLOT_AUTOCONF += --with-x
+GNUPLOT_AUTOCONF += --enable-mouse
 else
 GNUPLOT_AUTOCONF += --without-x
+GNUPLOT_AUTOCONF += --disable-mouse
 endif
 
 ifdef PTXCONF_GNUPLOT_PLOT
@@ -137,9 +138,10 @@ $(STATEDIR)/gnuplot.targetinstall:
@$(call install_fixup, gnuplot,DESCRIPTION,missing)
 
@$(call install_copy, gnuplot, 0, 0, 0755, -, /usr/bin/gnuplot)
+   @$(call install_tree, gnuplot, 0, 0, -, /usr/share/gnuplot)
 
 ifdef PTXCONF_GNUPLOT_X
-   @$(call install_copy, gnuplot, 0, 0, 0755, -, 
/usr/libexec/gnuplot/4.2/gnuplot_x11)
+   @$(call install_copy, gnuplot, 0, 0, 0755, -, 
/usr/libexec/gnuplot/4.4/gnuplot_x11)
 endif
 
@$(call install_finish, gnuplot)
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Add lpc21isp package

2011-06-20 Thread Bernhard Walle
Hi,

* Michael Olbrich m.olbr...@pengutronix.de [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-20 Thread Bernhard Walle
* Bernhard Walle bernh...@bwalle.de [2011-06-20 09:57]:
 * Michael Olbrich m.olbr...@pengutronix.de [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
* Bernhard Walle bernh...@bwalle.de [2011-06-20 10:46]:
 * Bernhard Walle bernh...@bwalle.de [2011-06-20 09:57]:
  * Michael Olbrich m.olbr...@pengutronix.de [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


[ptxdist] [PATCH] Update gnuplot to 4.4.3

2011-06-20 Thread Bernhard Walle
Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
 rules/gnuplot.make |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/rules/gnuplot.make b/rules/gnuplot.make
index 4de83b0..d8fabf6 100644
--- a/rules/gnuplot.make
+++ b/rules/gnuplot.make
@@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_GNUPLOT) += gnuplot
 #
 # Paths and names
 #
-GNUPLOT_VERSION:= 4.2.6
-GNUPLOT_MD5:= c10468d74030e8bed0fd6865a45cf1fd
+GNUPLOT_VERSION:= 4.4.3
+GNUPLOT_MD5:= 639603752996f4923bc02c895fa03b45
 GNUPLOT:= gnuplot-$(GNUPLOT_VERSION)
 GNUPLOT_SUFFIX := tar.gz
 GNUPLOT_URL:= 
$(PTXCONF_SETUP_SFMIRROR)/gnuplot/$(GNUPLOT).$(GNUPLOT_SUFFIX)
@@ -49,7 +49,6 @@ GNUPLOT_ENV   := $(CROSS_ENV)
 GNUPLOT_AUTOCONF = \
$(CROSS_AUTOCONF_USR) \
--disable-history-file \
-   --disable-mouse \
--disable-x11-mbfonts \
--enable-binary-data-file \
--disable-with-image \
@@ -86,8 +85,10 @@ endif
 
 ifdef PTXCONF_GNUPLOT_X
 GNUPLOT_AUTOCONF += --with-x
+GNUPLOT_AUTOCONF += --enable-mouse
 else
 GNUPLOT_AUTOCONF += --without-x
+GNUPLOT_AUTOCONF += --disable-mouse
 endif
 
 ifdef PTXCONF_GNUPLOT_PLOT
@@ -139,7 +140,7 @@ $(STATEDIR)/gnuplot.targetinstall:
@$(call install_copy, gnuplot, 0, 0, 0755, -, /usr/bin/gnuplot)
 
 ifdef PTXCONF_GNUPLOT_X
-   @$(call install_copy, gnuplot, 0, 0, 0755, -, 
/usr/libexec/gnuplot/4.2/gnuplot_x11)
+   @$(call install_copy, gnuplot, 0, 0, 0755, -, 
/usr/libexec/gnuplot/4.4/gnuplot_x11)
 endif
 
@$(call install_finish, gnuplot)
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


<    1   2   3   4   >