[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 
---
 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 v2] replace umkimage by u-boot sources

2012-01-22 Thread Bernhard Walle
* Andreas Bießmann  [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 v2] replace umkimage by u-boot sources

2012-01-22 Thread Andreas Bießmann
This patch removes the forked mkimage u-boot tool and uses the mainline
u-boot code to build this tool.

Signed-off-by: Andreas Bießmann 
---
Changes since v1:
 * add ROOTFS_FW_ENV_CONFIG parameter which installes /etc/fw_env.config
 * changes requested by Michael

 ...f8dcdbe5c690c-compiler.h-add-uint-typedef.patch |   26 --
 patches/u-boot-mkimage-2010.03-1/series|1 -
 platforms/hosttools.in |2 +-
 platforms/image_uimage.in  |8 +-
 platforms/kernel.in|2 +-
 rules/host-u-boot-tools.in |5 +
 rules/host-u-boot-tools.make   |   35 +
 rules/host-umkimage.in |8 --
 rules/host-umkimage.make   |   37 -
 rules/rootfs.in|   10 +++
 rules/rootfs.make  |3 +
 rules/templates/template-kernel-in |2 +-
 rules/u-boot-tools.in  |   31 
 rules/u-boot-tools.make|   81 
 rules/umkimage.in  |8 --
 rules/umkimage.make|   66 
 16 files changed, 172 insertions(+), 153 deletions(-)
 delete mode 100644 
patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch
 delete mode 100644 patches/u-boot-mkimage-2010.03-1/series
 create mode 100644 rules/host-u-boot-tools.in
 create mode 100644 rules/host-u-boot-tools.make
 delete mode 100644 rules/host-umkimage.in
 delete mode 100644 rules/host-umkimage.make
 create mode 100644 rules/u-boot-tools.in
 create mode 100644 rules/u-boot-tools.make
 delete mode 100644 rules/umkimage.in
 delete mode 100644 rules/umkimage.make

diff --git 
a/patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch
 
b/patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch
deleted file mode 100644
index f20a663..000
--- 
a/patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit b050c72d52c4e30d5b978ab6758f8dcdbe5c690c
-Author: Mike Frysinger 
-Date:   Tue Apr 20 05:49:30 2010 -0400
-
-compiler.h: add uint typedef
-
-Recent crc changes started using the "uint" type in headers that are used
-on the build system.  This subsequently broke mingw targets as they do not
-provide such a type.  So add this basic typedef to compiler.h so that we
-do not have to worry about this breaking again in the future.
-
-Signed-off-by: Mike Frysinger 
-Signed-off-by: Remy Bohmer 
-
-diff --git a/include/compiler.h b/include/compiler.h
-index 332618e..8030bf6 100644
 a/include/compiler.h
-+++ b/include/compiler.h
-@@ -55,6 +55,7 @@ typedef unsigned int  uint;
- typedef uint8_t __u8;
- typedef uint16_t __u16;
- typedef uint32_t __u32;
-+typedef unsigned int uint;
- 
- #define uswap_16(x) \
-   x) & 0xff00) >> 8) | \
diff --git a/patches/u-boot-mkimage-2010.03-1/series 
b/patches/u-boot-mkimage-2010.03-1/series
deleted file mode 100644
index dbf4bb4..000
--- a/patches/u-boot-mkimage-2010.03-1/series
+++ /dev/null
@@ -1 +0,0 @@
-b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch
diff --git a/platforms/hosttools.in b/platforms/hosttools.in
index 155b30b..e9ce0fc 100644
--- a/platforms/hosttools.in
+++ b/platforms/hosttools.in
@@ -19,7 +19,7 @@ source "rules/host-mtd-utils.in"
 source "rules/host-mtools.in"
 source "rules/host-openssl.in"
 source "rules/host-squashfs-tools.in"
-source "rules/host-umkimage.in"
+source "rules/host-u-boot-tools.in"
 source "rules/host-util-linux-ng.in"
 source "rules/host-xl-tools.in"
 source "rules/host-xz.in"
diff --git a/platforms/image_uimage.in b/platforms/image_uimage.in
index 62119c4..719793d 100644
--- a/platforms/image_uimage.in
+++ b/platforms/image_uimage.in
@@ -3,7 +3,7 @@
 menuconfig IMAGE_UIMAGE
bool
prompt "Generate images/uRamdisk  "
-   select HOST_UMKIMAGE
+   select HOST_U_BOOT_TOOLS
select IMAGE_EXT2
select IMAGE_EXT2_GZIP
help
@@ -21,16 +21,16 @@ config IMAGE_UIMAGE_NAME
 config IMAGE_UIMAGE_EXTRA_ARGS
string
default ""
-   prompt "extra arguments passed to umkimage"
+   prompt "extra arguments passed to mkimage"
help
- If needed you can add extra arguments for umkimage here
+ If needed you can add extra arguments for mkimage here
  (e.g. -a 0xaa0 -e 0xaa0 )
 
 # TODO: See comment in rules/post/images.make for this topic
 #config IMAGE_UIMAGE_MULTI
 #  bool
 #  prompt "Generate a multi image images/muimage"
-#  select HOST_UMKIMAGE
+#  select HOST_U_BOOT_T

[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 
---
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


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

2012-01-22 Thread Bernhard Walle
This package should provide  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 
---
 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 
+#
+# 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 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 
---
 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 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 
---
 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] 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
) 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


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

2012-01-22 Thread Michael Olbrich
On Mon, Jan 16, 2012 at 09:27:22PM +0100, Bernhard Walle wrote:
> 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).

In this case I actually prefer this over the patch. The cached variable is
rather straightforward. Most importantly upstream seems to be dead (no
release in over 3 years). This means we'll have to keep the patch forever,
and I'd like to keep such patches at a minimum.

Michael

> Signed-off-by: Bernhard Walle 
> ---
>  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

It's a variable, so it should be defined in SITECOPY_CONF_ENV. See e.g.
rules/libpv.make as an example. And add a comment why it's needed.

Michael

>  
>  ifdef PTXCONF_SITECOPY_SFTP
>  SITECOPY_AUTOCONF += --enable-sftp
> -- 
> 1.7.7.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

-- 
ptxdist mailing list
ptxdist@pengutronix.de


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

2012-01-22 Thread Michael Olbrich
On Sun, Jan 22, 2012 at 10:58:59AM +0100, Andreas Bießmann wrote:
> > I don't know fw_printenv. Please elaborate.
> 
> As Bernhard said it is a tool to access u-boot configuration from linux
> through /dev/mtdX, but some target specific configuration is required
> here. So would be some ToDo comment required or just leave this til
> someone stumble over the missing target configuration?

Is this a config file, or what? If yes, add an option for it, and use
install_alternative to install it. Then you can add your target specific
file to your BSP. Or always install and add one to generic/ in ptxdist, if
there are some sane default values.

> I know we will need the fw_printenv tool in some of our products in near
> future but at the moment I just want to have a submenu for U-Boot tools.
> A submenu with just one entry would be a bit empty ...
> 
> 
> 
> >> --- /dev/null
> >> +++ b/rules/host-u-boot-tools.in
> >> @@ -0,0 +1,8 @@
> >> +## SECTION=hosttools_noprompt
> >> +
> >> +config HOST_U_BOOT_TOOLS
> >> +  tristate
> >> +  default ALLYES
> >> +  help
> >> +the U-Boot tools contains the mkimage command which is used
> >> +to create boot images for the U-Boot bootloader.
> > 
> > Can we even see the help for a noprompt option?
> 
> I don't know ... it was like this before (in host-umkimage.in).

Remove the help. host-umkimage used to have a prompt and the help was not
removed with it.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

-- 
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 
---
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


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

2012-01-22 Thread Andreas Bießmann
Hi Michael,

On 21.01.12 19:22, Michael Olbrich wrote:
> On Sat, Jan 21, 2012 at 05:59:01PM +0100, Andreas Bießmann wrote:
>> This patch removes the forked mkimage u-boot tool and uses the mainline
>> u-boot code to build this tool.
>>
>> Signed-off-by: Andreas Bießmann 
>> ---
>> Treat this as an RFC, especially the fw_{save|print}env tool is subject to
>> discuss.
>>
>> Some additional questions:
>>  * how to handle the situation where only U_BOOT_TOOLS but no
>>U_BOOT_TOOLS_TOOL_xxx is choosen?
> 
> Keep it like it is. We have many other packages like that.

OK

> 
>>  * How to inject a user provided configuration for fw_printenv?
> 
> I don't know fw_printenv. Please elaborate.

As Bernhard said it is a tool to access u-boot configuration from linux
through /dev/mtdX, but some target specific configuration is required
here. So would be some ToDo comment required or just leave this til
someone stumble over the missing target configuration?

I know we will need the fw_printenv tool in some of our products in near
future but at the moment I just want to have a submenu for U-Boot tools.
A submenu with just one entry would be a bit empty ...



>> --- /dev/null
>> +++ b/rules/host-u-boot-tools.in
>> @@ -0,0 +1,8 @@
>> +## SECTION=hosttools_noprompt
>> +
>> +config HOST_U_BOOT_TOOLS
>> +tristate
>> +default ALLYES
>> +help
>> +  the U-Boot tools contains the mkimage command which is used
>> +  to create boot images for the U-Boot bootloader.
> 
> Can we even see the help for a noprompt option?

I don't know ... it was like this before (in host-umkimage.in).

regards

Andreas Bießmann

-- 
ptxdist mailing list
ptxdist@pengutronix.de


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

2012-01-22 Thread Andreas Bießmann
On OS X (and maybe some other systems) the default provided ar is not a
GNU version and does not understand all the required switches.

To circumvent this fact always use the ar from cross tools which is
proven to be a GNU binutils version (at least with OSELAS.Toolchain).

Signed-off-by: Andreas Bießmann 
---
Changes since v2
 * don't use ptx/escape

Changes since v1
 * provide proper patch series

 ...tils-use-env-python-instead-of-fixed-path.patch |3 --
 .../0002-opkg-make-ar-deterministic.patch  |3 --
 .../0003-opkg-build-don-t-use-bashism.patch|3 --
 .../0004-opkg-Added-sha256-support.patch   |6 +---
 .../0005-opkg-build-use-CROSS_COMPILE-ar.patch |   28 
 patches/opkg-utils-r4747/series|4 ++-
 rules/post/ptxd_make_xpkg_finish.make  |3 +-
 7 files changed, 34 insertions(+), 16 deletions(-)
 create mode 100644 
patches/opkg-utils-r4747/0005-opkg-build-use-CROSS_COMPILE-ar.patch

diff --git 
a/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch
 
b/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch
index 4e64f97..7f2fe24 100644
--- 
a/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch
+++ 
b/patches/opkg-utils-r4747/0001-opkg-utils-use-env-python-instead-of-fixed-path.patch
@@ -65,6 +65,3 @@ index 807f8f4..3864fa5 100755
  
  import sys, os
  from glob import glob
--- 
-1.7.5.1
-
diff --git a/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch 
b/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch
index 8bca65f..a0d219f 100644
--- a/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch
+++ b/patches/opkg-utils-r4747/0002-opkg-make-ar-deterministic.patch
@@ -48,6 +48,3 @@ index 012afd3..1c323c3 100755
  else
( cd $tmp_dir && tar -zcf $pkg_file ./debian-binary ./data.tar.gz 
./control.tar.gz )
  fi
--- 
-1.7.5.1
-
diff --git a/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch 
b/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch
index 159ad3c..582fe1e 100644
--- a/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch
+++ b/patches/opkg-utils-r4747/0003-opkg-build-don-t-use-bashism.patch
@@ -20,6 +20,3 @@ index 1c323c3..f9251ea 100755
pkg_file=$dest_dir/${pkg}_${version}_${arch}.opk
  else
pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk
--- 
-1.7.5.1
-
diff --git a/patches/opkg-utils-r4747/0004-opkg-Added-sha256-support.patch 
b/patches/opkg-utils-r4747/0004-opkg-Added-sha256-support.patch
index 16e35c5..1e94faa 100644
--- a/patches/opkg-utils-r4747/0004-opkg-Added-sha256-support.patch
+++ b/patches/opkg-utils-r4747/0004-opkg-Added-sha256-support.patch
@@ -1,7 +1,6 @@
-From a3c1fe9c1ec7e5257fd186a7720f412fe0cc Mon Sep 17 00:00:00 2001
 From: George McCollister 
 Date: Mon, 11 Jul 2011 12:32:37 -0500
-Subject: [PATCH 4/4] opkg: Added sha256 support.
+Subject: [PATCH] opkg: Added sha256 support.
 
 MD5 and SHA256 hashes are generated for each package now.
 
@@ -88,6 +87,3 @@ index 3fda9b5..b82 100644
  if self.size: out = out + "Size: %d\n" % int(self.size)
  if self.installed_size: out = out + "InstalledSize: %d\n" % 
int(self.installed_size)
  if self.filename: out = out + "Filename: %s\n" % (self.filename)
--- 
-1.7.1
-
diff --git 
a/patches/opkg-utils-r4747/0005-opkg-build-use-CROSS_COMPILE-ar.patch 
b/patches/opkg-utils-r4747/0005-opkg-build-use-CROSS_COMPILE-ar.patch
new file mode 100644
index 000..486eae5
--- /dev/null
+++ b/patches/opkg-utils-r4747/0005-opkg-build-use-CROSS_COMPILE-ar.patch
@@ -0,0 +1,28 @@
+From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= 
+Date: Fri, 20 Jan 2012 09:03:55 +0100
+Subject: [PATCH] opkg-build: use ${CROSS_COMPILE}ar
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Some host systems do not provide proper ar, make it possible to switch
+to cross-ar here.
+
+Signed-off-by: Andreas Bießmann 
+---
+ opkg-build |2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index f9251ea..425faea 100755
+--- a/opkg-build
 b/opkg-build
+@@ -250,7 +250,7 @@ if [ "$outer" = "ar" ] ; then
+   # chown the content to "0:0".  files. This is needed as high UID values (>
+   # 9) cause problems when parsing ar file headers
+   ( cd $tmp_dir && chown 0:0 ./debian-binary ./data.tar.gz ./control.tar.gz &&
+-  ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
++  ${CROSS_COMPILE}ar -crf $pkg_file ./debian-binary ./data.tar.gz 
./control.tar.gz )
+ else
+   ( cd $tmp_dir && tar -zcf $pkg_file ./debian-binary ./data.tar.gz 
./control.tar.gz )
+ fi
diff --git a/patches/opkg-utils-r4747/series b/patches/opkg-utils-r4747/series
index d6f32a6..af02bbc 100644
--- a/patches/opkg-utils-r4747/series
+++ b/patches/opkg-utils-r4747/series
@@ -1,6 +1,8 @@
 # generated

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

2012-01-22 Thread Michael Olbrich
On Sun, Jan 22, 2012 at 10:12:29AM +0100, Bernhard Walle wrote:
> 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.

I like it.

> Signed-off-by: Bernhard Walle 
> ---
>  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}"

s/markers/marker/

At least with my vim.

Michael

>   fi
>  
>   #
> -- 
> 1.7.7.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

-- 
ptxdist mailing list
ptxdist@pengutronix.de


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

2012-01-22 Thread Michael Olbrich
On Sat, Jan 21, 2012 at 09:08:06PM +0100, Bernhard Walle wrote:
> 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.

Ok. Lets just install the tool here. If someone needs more, they can do it
in an extra package.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

-- 
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 
---
 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