[ptxdist] [PATCH] Define CMAKE_SYSTEM_PROCESSOR

2011-05-09 Thread bernhard
From: Bernhard Walle 

Signed-off-by: Bernhard Walle 
---
 config/cmake/toolchain-target.cmake.in   |3 +++
 scripts/lib/ptxd_make_cmake_toolchain.sh |2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/config/cmake/toolchain-target.cmake.in 
b/config/cmake/toolchain-target.cmake.in
index eeb2e39..d316db5 100644
--- a/config/cmake/toolchain-target.cmake.in
+++ b/config/cmake/toolchain-target.cmake.in
@@ -6,6 +6,9 @@ SET(CMAKE_SYSTEM_NAME   @SYSTEM_NAME@)
 # this one not so much
 SET(CMAKE_SYSTEM_VERSION   @SYSTEM_VERSION@)
 
+# specify the target CPU
+SET(CMAKE_SYSTEM_PROCESSOR @SYSTEM_PROCESSOR@)
+
 # specify the cross compiler
 SET(CMAKE_C_COMPILER   @CC@)
 SET(CMAKE_CXX_COMPILER @CXX@)
diff --git a/scripts/lib/ptxd_make_cmake_toolchain.sh 
b/scripts/lib/ptxd_make_cmake_toolchain.sh
index 1712934..5a6ee9d 100644
--- a/scripts/lib/ptxd_make_cmake_toolchain.sh
+++ b/scripts/lib/ptxd_make_cmake_toolchain.sh
@@ -27,6 +27,8 @@ ptxd_make_cmake_toolchain_target() {
 SYSTEM_NAME="Linux" \
SYSTEM_VERSION="1" \
\
+   SYSTEM_PROCESSOR="${PTXDIST_IPKG_ARCH_STRING}" \
+   \
CC="$(which "${CC}")" \
CXX="$(which "${CXX}")" \
\
-- 
1.7.5.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] ptxdist menuconfig: accessing ptxdist menuconfig platform variables?

2011-05-09 Thread Alexander Stein
Hello,

I'm wondering how I can access variables set by ptxdist menuconfig platform in 
ptxdist menuconfig. E.g. if the Linux kernel is set and will be build.
I want to add a new rule set which needs the Linux kernel source.

Best regards,
Alexander

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [BUG ptxdist-2011.05.0] gtk2-engines

2011-05-09 Thread Michael Olbrich
On Fri, May 06, 2011 at 06:59:38PM +0200, Benoît Burnichon wrote:
> > On Fri, May 06, 2011 at 12:23:44PM +0200, Benoît Burnichon wrote:
> > > On a freshly installed ubuntu 64 bit vm, I installed ptxdist-
> > 2011.05.0, I ran
> > > an old config that was working with ptxdist-2011.01.0.
> > 
> > you should use "ptxdist migrate" for this.
> 
> That's what I did. It was just to indicate that the config was previously 
> working fine.
> 
> > 
> > > I had some dependencies not well handled with some XORG libs not
> > > automatically selected (no big deal, I selected the XORG by hand).
> > 
> > Can you elaborate? ptxdist should handle all dependencies.
> > 
> 
> Ptxdist was handling the dependencies. It was indicating warning at the 
> beginning that the dependency was not fullfilled.
> warning: (CAIRO && CAIRO_XLIB && !GTK_TARGET_HOST_X11 || QT4 && 
> QT4_X11_XRENDER || XORG_APP_XEYES && XORG || XORG_APP_XRANDR && XORG || 
> XORG_LIB_XCURSOR && XORG || XORG_LIB_XFT && XORG || XORG_LIB_XRANDR && XORG) 
> selects XORG_LIB_XRENDER which has unmet direct dependencies (XORG)
> warning: (GNUPLOT && GNUPLOT_X || CAIRO && CAIRO_XLIB && !GTK_TARGET_HOST_X11 
> || SDL && SDL_XORG || XORG_APP_XEYES && XORG || XORG_APP_XRDB && XORG || 
> XORG_APP_XSET && XORG || XTERM && XORG || XORG_LIB_XAW && XORG || 
> XORG_LIB_XMU && XORG || XORG_LIB_XPRINTUTIL && XORG || XORG_LIB_XKBUI && 
> XORG) selects XORG_LIB_XT which has unmet direct dependencies (XORG)
> warning: (CAIRO && CAIRO_XLIB && !GTK_TARGET_HOST_X11 || QT4 && 
> QT4_X11_XRENDER || XORG_APP_XEYES && XORG || XORG_APP_XRANDR && XORG || 
> XORG_LIB_XCURSOR && XORG || XORG_LIB_XFT && XORG || XORG_LIB_XRANDR && XORG) 
> selects XORG_LIB_XRENDER which has unmet direct dependencies (XORG)
> warning: (GNUPLOT && GNUPLOT_X || CAIRO && CAIRO_XLIB && !GTK_TARGET_HOST_X11 
> || SDL && SDL_XORG || XORG_APP_XEYES && XORG || XORG_APP_XRDB && XORG || 
> XORG_APP_XSET && XORG || XTERM && XORG || XORG_LIB_XAW && XORG || 
> XORG_LIB_XMU && XORG || XORG_LIB_XPRINTUTIL && XORG || XORG_LIB_XKBUI && 
> XORG) selects XORG_LIB_XT which has unmet direct dependencies (XORG)

You don't use Xorg, right? You've probably enabled a gtk or sdl backend
that depends on some xorg stuff, but not xorg itself. That's a dependency
chain that cannot be resolved by kconfig.
The strange this is that most of my dependency cleanup work is already in
ptxdist-2011.01.0.

> > >
> > > Does anybody knows from where this could come from?
> > 
> > This does no happen here. But if libtool cannot find those libs, then
> > something is very wrong. Can you send the log from the whole
> > gtk2-engines.compile stage?
> 
> I enclose the full gtk2-engines compile stage.

very strange. What toolchain are you using? Can you send me your complete
logfile and ptxconfig (as pm, it's too large for the mailing list).

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


Re: [ptxdist] [PATCH] Define CMAKE_SYSTEM_PROCESSOR

2011-05-09 Thread Michael Olbrich
Hi,

On Mon, May 09, 2011 at 09:04:54AM +0200, bernh...@bwalle.de wrote:
> From: Bernhard Walle 
> 
> Signed-off-by: Bernhard Walle 
> ---
>  config/cmake/toolchain-target.cmake.in   |3 +++
>  scripts/lib/ptxd_make_cmake_toolchain.sh |2 ++
>  2 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/config/cmake/toolchain-target.cmake.in 
> b/config/cmake/toolchain-target.cmake.in
> index eeb2e39..d316db5 100644
> --- a/config/cmake/toolchain-target.cmake.in
> +++ b/config/cmake/toolchain-target.cmake.in
> @@ -6,6 +6,9 @@ SET(CMAKE_SYSTEM_NAME @SYSTEM_NAME@)
>  # this one not so much
>  SET(CMAKE_SYSTEM_VERSION @SYSTEM_VERSION@)
>  
> +# specify the target CPU
> +SET(CMAKE_SYSTEM_PROCESSOR   @SYSTEM_PROCESSOR@)
> +
>  # specify the cross compiler
>  SET(CMAKE_C_COMPILER @CC@)
>  SET(CMAKE_CXX_COMPILER   @CXX@)
> diff --git a/scripts/lib/ptxd_make_cmake_toolchain.sh 
> b/scripts/lib/ptxd_make_cmake_toolchain.sh
> index 1712934..5a6ee9d 100644
> --- a/scripts/lib/ptxd_make_cmake_toolchain.sh
> +++ b/scripts/lib/ptxd_make_cmake_toolchain.sh
> @@ -27,6 +27,8 @@ ptxd_make_cmake_toolchain_target() {
>  SYSTEM_NAME="Linux" \
>   SYSTEM_VERSION="1" \
>   \
> + SYSTEM_PROCESSOR="${PTXDIST_IPKG_ARCH_STRING}" \

any reason, why you're using PTXDIST_IPKG_ARCH_STRING instead of
PTXCONF_ARCH_STRING?

Michael

> + \
>   CC="$(which "${CC}")" \
>   CXX="$(which "${CXX}")" \
>   \
> -- 
> 1.7.5.1
> 
> 
> -- 
> 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] Define CMAKE_SYSTEM_PROCESSOR

2011-05-09 Thread Bernhard Walle
* Michael Olbrich  [2011-05-09 12:36]:
> 
> any reason, why you're using PTXDIST_IPKG_ARCH_STRING instead of
> PTXCONF_ARCH_STRING?

No, PTXDIST_IPKG_ARCH_STRING was just the one I found. Should I resend the
patch with PTXCONF_ARCH_STRING?


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] ptxdist menuconfig: accessing ptxdist menuconfig platform variables?

2011-05-09 Thread Michael Olbrich
Hi,

On Mon, May 09, 2011 at 09:14:35AM +0200, Alexander Stein wrote:
> I'm wondering how I can access variables set by ptxdist menuconfig platform 
> in 
> ptxdist menuconfig. E.g. if the Linux kernel is set and will be build.
> I want to add a new rule set which needs the Linux kernel source.

That's not possible. But you can add it to the platform:

platforms/my_pkg.in
and
rules/my_pkg.make

Unless you find an appropriate section you need to copy and modify
platforms/Kconfig.

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


Re: [ptxdist] [PATCH] Define CMAKE_SYSTEM_PROCESSOR

2011-05-09 Thread Michael Olbrich
On Mon, May 09, 2011 at 12:38:45PM +0200, Bernhard Walle wrote:
> * Michael Olbrich  [2011-05-09 12:36]:
> > 
> > any reason, why you're using PTXDIST_IPKG_ARCH_STRING instead of
> > PTXCONF_ARCH_STRING?
> 
> No, PTXDIST_IPKG_ARCH_STRING was just the one I found. Should I resend the
> patch with PTXCONF_ARCH_STRING?

Yes, please.

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


Re: [ptxdist] ptxdist menuconfig: accessing ptxdist menuconfig platform variables?

2011-05-09 Thread Alexander Stein
Hello,

Am Montag, 9. Mai 2011, 13:00:32 schrieb Michael Olbrich:
> On Mon, May 09, 2011 at 09:14:35AM +0200, Alexander Stein wrote:
> > I'm wondering how I can access variables set by ptxdist menuconfig
> > platform in ptxdist menuconfig. E.g. if the Linux kernel is set and will
> > be build. I want to add a new rule set which needs the Linux kernel
> > source.
> 
> That's not possible. But you can add it to the platform:
> 
> platforms/my_pkg.in
> and
> rules/my_pkg.make
> 
> Unless you find an appropriate section you need to copy and modify
> platforms/Kconfig.

I want to add perf (from kernel source) to ptxdist. So it suits best, if it is 
included in platform/kernel.in. But perf needs elfutils which should be added 
by rules/elfutils.{in,make} instead. As far as I understand you there is no 
way that perf (platform/kernel.in) could depend on elfutils, no?

Alexander

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] ptxdist menuconfig: accessing ptxdist menuconfig platform variables?

2011-05-09 Thread Michael Olbrich
On Mon, May 09, 2011 at 01:21:14PM +0200, Alexander Stein wrote:
> Am Montag, 9. Mai 2011, 13:00:32 schrieb Michael Olbrich:
> > On Mon, May 09, 2011 at 09:14:35AM +0200, Alexander Stein wrote:
> > > I'm wondering how I can access variables set by ptxdist menuconfig
> > > platform in ptxdist menuconfig. E.g. if the Linux kernel is set and will
> > > be build. I want to add a new rule set which needs the Linux kernel
> > > source.
> > 
> > That's not possible. But you can add it to the platform:
> > 
> > platforms/my_pkg.in
> > and
> > rules/my_pkg.make
> > 
> > Unless you find an appropriate section you need to copy and modify
> > platforms/Kconfig.
> 
> I want to add perf (from kernel source) to ptxdist. So it suits best, if it 
> is 
> included in platform/kernel.in. But perf needs elfutils which should be added 
> by rules/elfutils.{in,make} instead. As far as I understand you there is no 
> way that perf (platform/kernel.in) could depend on elfutils, no?

I'm not sure what needs to happen to 'add perf', but I can give you some
hints: If elfutils are needed for building, then it must be a host-tool.
Take a look at platforms/hosttools.in. These are all packages without a
prompt. They are included in the ptxconfig (via "SECTION=hosttools_noprompt")
and the platformconfig (via platforms/hosttools.in), so they can be
selected from both sides.
You'll probably add an option and "select HOST_ELFUTILS if KERNEL_FOO" to
kernel.in.

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


Re: [ptxdist] ptxdist menuconfig: accessing ptxdist menuconfig platform variables?

2011-05-09 Thread Alexander Stein
Am Montag, 9. Mai 2011, 14:33:12 schrieb Michael Olbrich:
> On Mon, May 09, 2011 at 01:21:14PM +0200, Alexander Stein wrote:
> > Am Montag, 9. Mai 2011, 13:00:32 schrieb Michael Olbrich:
> > > On Mon, May 09, 2011 at 09:14:35AM +0200, Alexander Stein wrote:
> > > > I'm wondering how I can access variables set by ptxdist menuconfig
> > > > platform in ptxdist menuconfig. E.g. if the Linux kernel is set and
> > > > will be build. I want to add a new rule set which needs the Linux
> > > > kernel source.
> > > 
> > > That's not possible. But you can add it to the platform:
> > > 
> > > platforms/my_pkg.in
> > > and
> > > rules/my_pkg.make
> > > 
> > > Unless you find an appropriate section you need to copy and modify
> > > platforms/Kconfig.
> > 
> > I want to add perf (from kernel source) to ptxdist. So it suits best, if
> > it is included in platform/kernel.in. But perf needs elfutils which
> > should be added by rules/elfutils.{in,make} instead. As far as I
> > understand you there is no way that perf (platform/kernel.in) could
> > depend on elfutils, no?
> 
> I'm not sure what needs to happen to 'add perf', but I can give you some
> hints: If elfutils are needed for building, then it must be a host-tool.

No, elfutils (libelf.so) must be installed on the target. I don't think there 
is a need for a host-tool for building perf itself. Generating the man-pages 
and help texts is another story.

> Take a look at platforms/hosttools.in. These are all packages without a
> prompt. They are included in the ptxconfig (via
> "SECTION=hosttools_noprompt") and the platformconfig (via
> platforms/hosttools.in), so they can be selected from both sides.
> You'll probably add an option and "select HOST_ELFUTILS if KERNEL_FOO" to
> kernel.in.

So, if I put a "select ELFUTILS if KERNEL_PERF" in platform/kernel.in it gets 
selected in my ptxdist_config?
I guess host-tools are a bit easier to handle because they are only build time 
dependencies. But here I have a build-time and run-time dependency.

Alexander

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Define CMAKE_SYSTEM_PROCESSOR

2011-05-09 Thread bernhard
From: Bernhard Walle 

Signed-off-by: Bernhard Walle 
---
 config/cmake/toolchain-target.cmake.in   |3 +++
 scripts/lib/ptxd_make_cmake_toolchain.sh |2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/config/cmake/toolchain-target.cmake.in 
b/config/cmake/toolchain-target.cmake.in
index eeb2e39..d316db5 100644
--- a/config/cmake/toolchain-target.cmake.in
+++ b/config/cmake/toolchain-target.cmake.in
@@ -6,6 +6,9 @@ SET(CMAKE_SYSTEM_NAME   @SYSTEM_NAME@)
 # this one not so much
 SET(CMAKE_SYSTEM_VERSION   @SYSTEM_VERSION@)
 
+# specify the target CPU
+SET(CMAKE_SYSTEM_PROCESSOR @SYSTEM_PROCESSOR@)
+
 # specify the cross compiler
 SET(CMAKE_C_COMPILER   @CC@)
 SET(CMAKE_CXX_COMPILER @CXX@)
diff --git a/scripts/lib/ptxd_make_cmake_toolchain.sh 
b/scripts/lib/ptxd_make_cmake_toolchain.sh
index 1712934..4848475 100644
--- a/scripts/lib/ptxd_make_cmake_toolchain.sh
+++ b/scripts/lib/ptxd_make_cmake_toolchain.sh
@@ -27,6 +27,8 @@ ptxd_make_cmake_toolchain_target() {
 SYSTEM_NAME="Linux" \
SYSTEM_VERSION="1" \
\
+   SYSTEM_PROCESSOR="${PTXCONF_ARCH_STRING}" \
+   \
CC="$(which "${CC}")" \
CXX="$(which "${CXX}")" \
\
-- 
1.7.5.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Correct gdb checksum

2011-05-09 Thread bernhard
From: Bernhard Walle 

Signed-off-by: Bernhard Walle 
---
 rules/gdb.make |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rules/gdb.make b/rules/gdb.make
index c480497..b3d7be0 100644
--- a/rules/gdb.make
+++ b/rules/gdb.make
@@ -19,7 +19,7 @@ PACKAGES-$(PTXCONF_GDB) += gdb
 # Paths and names
 #
 GDB_VERSION:= $(call remove_quotes,$(PTXCONF_GDB_VERSION))
-GDB_MD5:= c9da266b884fb8fa54df786dfaadbc7a
+GDB_MD5:= 53ebade39bfdc1d06744e5188b6438b1
 GDB:= gdb-$(GDB_VERSION)
 GDB_SUFFIX := tar.bz2
 GDB_SOURCE := $(SRCDIR)/$(GDB).$(GDB_SUFFIX)
-- 
1.7.5.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] Correct host-cmake checksum

2011-05-09 Thread bernhard
From: Bernhard Walle 

Signed-off-by: Bernhard Walle 
---
 rules/host-cmake.make |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rules/host-cmake.make b/rules/host-cmake.make
index ac67d5b..40eb8a2 100644
--- a/rules/host-cmake.make
+++ b/rules/host-cmake.make
@@ -18,7 +18,7 @@ HOST_PACKAGES-$(PTXCONF_HOST_CMAKE) += host-cmake
 # Paths and names
 #
 HOST_CMAKE_VERSION := 2.8.1
-HOST_CMAKE_MD5 := a92ad653f9ccc1595d16cd9707f49acc
+HOST_CMAKE_MD5 := feadc2e5ebbfed0efc90178583503725
 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.5.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] qt: Fix build with gcc 4.6

2011-05-09 Thread bernhard
From: Bernhard Walle 

Signed-off-by: Bernhard Walle 
---
 ...diff_t-s-namespace-in-stltest-configure-t.patch |   28 
 patches/qt-everywhere-opensource-src-4.6.3/series  |3 +-
 2 files changed, 30 insertions(+), 1 deletions(-)
 create mode 100644 
patches/qt-everywhere-opensource-src-4.6.3/0010-Qualify-ptrdiff_t-s-namespace-in-stltest-configure-t.patch

diff --git 
a/patches/qt-everywhere-opensource-src-4.6.3/0010-Qualify-ptrdiff_t-s-namespace-in-stltest-configure-t.patch
 
b/patches/qt-everywhere-opensource-src-4.6.3/0010-Qualify-ptrdiff_t-s-namespace-in-stltest-configure-t.patch
new file mode 100644
index 000..2ff8827
--- /dev/null
+++ 
b/patches/qt-everywhere-opensource-src-4.6.3/0010-Qualify-ptrdiff_t-s-namespace-in-stltest-configure-t.patch
@@ -0,0 +1,28 @@
+From: Bernhard Walle 
+Date: Mon, 9 May 2011 16:53:35 +0200
+Subject: [PATCH] Qualify ptrdiff_t's namespace in stltest configure test
+
+Originally from:
+https://qt.gitorious.org/qt/qt/commit/f1bbb1648a9770f37ca39b8d68d6bd269dd06250
+
+Signed-off-by: Bernhard Walle 
+---
+ config.tests/unix/stl/stltest.cpp |2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/config.tests/unix/stl/stltest.cpp 
b/config.tests/unix/stl/stltest.cpp
+index bfda2e3..191ec76 100644
+--- a/config.tests/unix/stl/stltest.cpp
 b/config.tests/unix/stl/stltest.cpp
+@@ -69,7 +69,7 @@ class DummyIterator
+ public:
+ T *i;
+ typedef std::random_access_iterator_tag  iterator_category;
+-typedef ptrdiff_t difference_type;
++typedef std::ptrdiff_t difference_type;
+ typedef T value_type;
+ typedef T *pointer;
+ typedef T &reference;
+-- 
+1.7.5.1
+
diff --git a/patches/qt-everywhere-opensource-src-4.6.3/series 
b/patches/qt-everywhere-opensource-src-4.6.3/series
index fd6385c..fdd460f 100644
--- a/patches/qt-everywhere-opensource-src-4.6.3/series
+++ b/patches/qt-everywhere-opensource-src-4.6.3/series
@@ -8,4 +8,5 @@
 0007-Hack-disable-Wl-gc-sections-on-ppc.patch
 0008-qmake-make-sure-local-include-dirs-come-first.patch
 0009-phonon-fix-colors-for-video-on-qgraphicsview.patch
-# 4850bc496f565516b8725a1e3a1b3a37  - git-ptx-patches magic
+0010-Qualify-ptrdiff_t-s-namespace-in-stltest-configure-t.patch
+# 99a3b72c0e064df9b4f0975bdab09508  - git-ptx-patches magic
-- 
1.7.5.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] ptxdist menuconfig: accessing ptxdist menuconfig platform variables?

2011-05-09 Thread Michael Olbrich
On Mon, May 09, 2011 at 04:11:43PM +0200, Alexander Stein wrote:
> Am Montag, 9. Mai 2011, 14:33:12 schrieb Michael Olbrich:
> > On Mon, May 09, 2011 at 01:21:14PM +0200, Alexander Stein wrote:
> > > Am Montag, 9. Mai 2011, 13:00:32 schrieb Michael Olbrich:
> > > > On Mon, May 09, 2011 at 09:14:35AM +0200, Alexander Stein wrote:
> > > > > I'm wondering how I can access variables set by ptxdist menuconfig
> > > > > platform in ptxdist menuconfig. E.g. if the Linux kernel is set and
> > > > > will be build. I want to add a new rule set which needs the Linux
> > > > > kernel source.
> > > > 
> > > > That's not possible. But you can add it to the platform:
> > > > 
> > > > platforms/my_pkg.in
> > > > and
> > > > rules/my_pkg.make
> > > > 
> > > > Unless you find an appropriate section you need to copy and modify
> > > > platforms/Kconfig.
> > > 
> > > I want to add perf (from kernel source) to ptxdist. So it suits best, if
> > > it is included in platform/kernel.in. But perf needs elfutils which
> > > should be added by rules/elfutils.{in,make} instead. As far as I
> > > understand you there is no way that perf (platform/kernel.in) could
> > > depend on elfutils, no?
> > 
> > I'm not sure what needs to happen to 'add perf', but I can give you some
> > hints: If elfutils are needed for building, then it must be a host-tool.
> 
> No, elfutils (libelf.so) must be installed on the target. I don't think there 
> is a need for a host-tool for building perf itself. Generating the man-pages 
> and help texts is another story.
> 
> > Take a look at platforms/hosttools.in. These are all packages without a
> > prompt. They are included in the ptxconfig (via
> > "SECTION=hosttools_noprompt") and the platformconfig (via
> > platforms/hosttools.in), so they can be selected from both sides.
> > You'll probably add an option and "select HOST_ELFUTILS if KERNEL_FOO" to
> > kernel.in.
> 
> So, if I put a "select ELFUTILS if KERNEL_PERF" in platform/kernel.in it gets 
> selected in my ptxdist_config?
> 
> I guess host-tools are a bit easier to handle because they are only build 
> time 
> dependencies. But here I have a build-time and run-time dependency.

you need to create:
platforms/elfutils.in
rules/elfutils.make
With the usual stuff.

add platforms/elfutils.in to platforms/Kconfig (not sure where right now,
we can decide that later).

Then you can add "select ELFUTILS if KERNEL_PERF". to platform/kernel.in.

To install perf on the target you should probably create a new ipkg
(install_init ... install_finish)

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] Skip the Enter press in PTXdist go

2011-05-09 Thread Leandro Favarin
Hi all,

I'm trying to automate a lot of builds in a remote server using a shell
script that triggers the "ptxdist go".
In the end of the process I'm asked to press enter/type root passwd to get
a proper NFS-root environment.
Is there a way to skip this verification? 'sudo ptxdist go' doesn't work.

Thanks,

Leandro Favarin
-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] Skip the Enter press in PTXdist go

2011-05-09 Thread Marc Kleine-Budde
On 05/09/2011 07:43 PM, Leandro Favarin wrote:
> Hi all,
> 
> I'm trying to automate a lot of builds in a remote server using a shell
> script that triggers the "ptxdist go".
> In the end of the process I'm asked to press enter/type root passwd to get
> a proper NFS-root environment.
> Is there a way to skip this verification? 'sudo ptxdist go' doesn't work.

Running ptxdist as root is simply too risky, we don't want to be in
charge for deleting your whole system

You can either start ptxdist with the switch "-q", then it will skip
this step, or you can switch off the generation of the nfs-root stuff via:

ptxdist menuconfig
PTXdist Options ->
create primary rootfs devnodes for nfs and fix permissions

..or.. you can add the script that will run via sudo to the allowed
commands for you user to the sudo configuration.

cheers, Marc

-- 
Pengutronix e.K.  | Marc Kleine-Budde   |
Industrial Linux Solutions| Phone: +49-231-2826-924 |
Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



signature.asc
Description: OpenPGP digital signature
-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] Skip the Enter press in PTXdist go

2011-05-09 Thread Leandro Favarin
On Mon, May 9, 2011 at 3:42 PM, Marc Kleine-Budde wrote:

>
> ..or.. you can add the script that will run via sudo to the allowed
> commands for you user to the sudo configuration.
>
>
Thanks for helping me, Marc.

Unfortunately I can't skip that step (it has to be automatized), so I guess
I should follow your third option. Do you care to elaborate that phrase
again? I didn't get it.

Leandro Favarin
-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] Skip the Enter press in PTXdist go

2011-05-09 Thread Marc Kleine-Budde
On 05/09/2011 09:19 PM, Leandro Favarin wrote:
> On Mon, May 9, 2011 at 3:42 PM, Marc Kleine-Budde wrote:
> 
>>
>> ..or.. you can add the script that will run via sudo to the allowed
>> commands for you user to the sudo configuration.
>>
>>
> Thanks for helping me, Marc.
> 
> Unfortunately I can't skip that step (it has to be automatized), so I guess
> I should follow your third option. Do you care to elaborate that phrase
> again? I didn't get it.

Have a look at the sudo documentation (man sudoers), you can allow
certain users to run certain programs as root without the need to enter
a password.

For example this line allows all users to use "sudo apt-get" with beeing
asked for a password.

ALL ALL = NOPASSWD: /usr/bin/apt-get

Unfortunately the script is generated in a temporary directory. But this
can be changed, have a look at:
"scripts/lib/ptxd_make_image_fix_permissions.sh" line 89++.

A completely different solution is to use devtmpfs, the kernel will
create the initial device nodes automatically. I'm not sure which is the
minimum kernel version needed.

cheers, Marc

-- 
Pengutronix e.K.  | Marc Kleine-Budde   |
Industrial Linux Solutions| Phone: +49-231-2826-924 |
Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



signature.asc
Description: OpenPGP digital signature
-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] busybox: Fix build with make 3.82

2011-05-09 Thread Bernhard Walle
This is the original patch from upstream
http://git.busybox.net/busybox/commit/?h=1_18_stable&id=adbe3b5b982874071b9b826cea1632fc00c85982.

Signed-off-by: Bernhard Walle 
---
 .../0001-reactivate-check-for-tty.patch|2 +-
 ...nstant-unsigned-to-avoid-integer-overflow.patch |2 +-
 ...ild-system-make-3.82-fix.-Closes-bug-2323.patch |   46 
 patches/busybox-1.17.1/series  |3 +-
 4 files changed, 50 insertions(+), 3 deletions(-)
 create mode 100644 
patches/busybox-1.17.1/0003-build-system-make-3.82-fix.-Closes-bug-2323.patch

diff --git a/patches/busybox-1.17.1/0001-reactivate-check-for-tty.patch 
b/patches/busybox-1.17.1/0001-reactivate-check-for-tty.patch
index 059d2f6..d42fb51 100644
--- a/patches/busybox-1.17.1/0001-reactivate-check-for-tty.patch
+++ b/patches/busybox-1.17.1/0001-reactivate-check-for-tty.patch
@@ -27,5 +27,5 @@ index 9befa2b..e65e25c 100644
case 'd':
input_mode = set_default;
 -- 
-1.7.1
+1.7.5.1
 
diff --git 
a/patches/busybox-1.17.1/0002-make-constant-unsigned-to-avoid-integer-overflow.patch
 
b/patches/busybox-1.17.1/0002-make-constant-unsigned-to-avoid-integer-overflow.patch
index a29ff31..3a2c88d 100644
--- 
a/patches/busybox-1.17.1/0002-make-constant-unsigned-to-avoid-integer-overflow.patch
+++ 
b/patches/busybox-1.17.1/0002-make-constant-unsigned-to-avoid-integer-overflow.patch
@@ -21,5 +21,5 @@ index b55af6d..4ec4b08 100644
  #else
COMPRESS_MAGIC = 0x9d1f,
 -- 
-1.7.1
+1.7.5.1
 
diff --git 
a/patches/busybox-1.17.1/0003-build-system-make-3.82-fix.-Closes-bug-2323.patch 
b/patches/busybox-1.17.1/0003-build-system-make-3.82-fix.-Closes-bug-2323.patch
new file mode 100644
index 000..ecd8653
--- /dev/null
+++ 
b/patches/busybox-1.17.1/0003-build-system-make-3.82-fix.-Closes-bug-2323.patch
@@ -0,0 +1,46 @@
+From: Denys Vlasenko 
+Date: Sun, 22 Aug 2010 07:28:46 +
+Subject: [PATCH] build system: make 3.82 fix. Closes bug 2323
+
+Signed-off-by: Denys Vlasenko 
+Signed-off-by: Bernhard Walle 
+---
+ Makefile |   13 +++--
+ 1 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 03e9885..a1e9cce 100644
+--- a/Makefile
 b/Makefile
+@@ -433,7 +433,12 @@ ifeq ($(config-targets),1)
+ -include $(srctree)/arch/$(ARCH)/Makefile
+ export KBUILD_DEFCONFIG
+ 
+-config %config: scripts_basic outputmakefile gen_build_files FORCE
++config: scripts_basic outputmakefile gen_build_files FORCE
++  $(Q)mkdir -p include
++  $(Q)$(MAKE) $(build)=scripts/kconfig $@
++  $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
++
++%config: scripts_basic outputmakefile gen_build_files FORCE
+   $(Q)mkdir -p include
+   $(Q)$(MAKE) $(build)=scripts/kconfig $@
+   $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
+@@ -1285,9 +1290,13 @@ endif
+   $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+ 
+ # Modules
+-/ %/: prepare scripts FORCE
++%/: prepare scripts FORCE
+   $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+   $(build)=$(build-dir)
++/: prepare scripts FORCE
++  $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
++  $(build)=$(build-dir)
++
+ %.ko: prepare scripts FORCE
+   $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
+   $(build)=$(build-dir) $(@:.ko=.o)
+-- 
+1.7.5.1
+
diff --git a/patches/busybox-1.17.1/series b/patches/busybox-1.17.1/series
index aaa104a..559fd11 100644
--- a/patches/busybox-1.17.1/series
+++ b/patches/busybox-1.17.1/series
@@ -1,4 +1,5 @@
 # generated by git-ptx-patches
 0001-reactivate-check-for-tty.patch
 0002-make-constant-unsigned-to-avoid-integer-overflow.patch
-# c20526b5b00fb9214f7c11f09bfa60c8  - git-ptx-patches magic
+0003-build-system-make-3.82-fix.-Closes-bug-2323.patch
+# e028d583e9f6b6fec5ad3deb8a550489  - git-ptx-patches magic
-- 
1.7.5.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de