All of lore.kernel.org
 help / color / mirror / Atom feed
* hal-0.5.11 fails with external toolchain/SDK
@ 2008-11-04  0:55 Denys Dmytriyenko
  2008-11-04 11:13 ` Holger Freyther
  2008-11-14 22:24 ` Koen Kooi
  0 siblings, 2 replies; 10+ messages in thread
From: Denys Dmytriyenko @ 2008-11-04  0:55 UTC (permalink / raw)
  To: openembedded-devel

Hi,

New hal-0.5.11 from OpenMoko breaks builds with external-toolchain/SDK, as it 
hardcodes linux/input.h like this:

EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h"

In case of external-toolchain/SDK, linux-libc-headers are not installed in 
staging, but rather supplied by the SDK and referenced with extra "-I" in 
TARGET_CPPFLAGS_append, thus there is no ${STAGING_INCDIR}/linux/input.h

The above EXTRA_OECONF is used mainly for hal-right-input-h.patch (see link
below), which piggy-backs HAL's --with-linux-input-header option to use the
correct linux/input.h file in the tools/Makefile.am for proper
hal-setup-keymap-keys.txt, but breaks the build of
hald/linux/probing/probe-input.c, where it tries to include the missing
hardcoded linux/input.h

http://gitweb.openembedded.net/?p=openembedded.git;a=blob;f=packages/hal/files/hal-right-input-h.patch;hb=org.openembedded.dev

Unfortunately, the location of linux/input.h and linux-libc-headers inside the
SDK are not very standardized. I've seen them in several localtions, such as:

${SDK_PREFIX}/${TARGET_SYS}/libc/usr/include
${SDK_PREFIX}/target/usr/include

Any ideas on how to fix hal-0.5.11 with external-toolchain/SDK are welcome.

I've also submitted a ticket to track this issue - #4799

-- 
Denys



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hal-0.5.11 fails with external toolchain/SDK
  2008-11-04  0:55 hal-0.5.11 fails with external toolchain/SDK Denys Dmytriyenko
@ 2008-11-04 11:13 ` Holger Freyther
  2008-11-04 19:48   ` Denys Dmytriyenko
  2008-11-14 22:24 ` Koen Kooi
  1 sibling, 1 reply; 10+ messages in thread
From: Holger Freyther @ 2008-11-04 11:13 UTC (permalink / raw)
  To: openembedded-devel

On Tuesday 04 November 2008 01:55:12 Denys Dmytriyenko wrote:
> Hi,
>
> New hal-0.5.11 from OpenMoko breaks builds with external-toolchain/SDK, as
> it hardcodes linux/input.h like this:

It is Openmoko, and I did add it.

what about something among the lines of?

echo "#include <linux/input.h>" | cpp | less | grep "linux\/input.h"


z.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hal-0.5.11 fails with external toolchain/SDK
  2008-11-04 11:13 ` Holger Freyther
@ 2008-11-04 19:48   ` Denys Dmytriyenko
  2008-11-06 23:12     ` Denys Dmytriyenko
  0 siblings, 1 reply; 10+ messages in thread
From: Denys Dmytriyenko @ 2008-11-04 19:48 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

On Tue, Nov 04, 2008 at 12:13:24PM +0100, Holger Freyther wrote:
> On Tuesday 04 November 2008 01:55:12 Denys Dmytriyenko wrote:
> > Hi,
> >
> > New hal-0.5.11 from OpenMoko breaks builds with external-toolchain/SDK, as
> > it hardcodes linux/input.h like this:
> 
> It is Openmoko, and I did add it.
> 
> what about something among the lines of?
> 
> echo "#include <linux/input.h>" | cpp | less | grep "linux\/input.h"

Thanks for the hint. I was able to fix it, so it finds the right linux/input.h 
file even with external-toolchain/SDK.

The patch is attached to the ticket #4799 and this email. I was not able to 
call autoreconf, as it was giving too many problems. autotools_do_configure 
worked fine, but unfortunately, it doesn't take parameters to pass to the 
oe_runconf, so I had to call it again with the correct --with flag. Let me 
know if it's Ok or not. Thanks.

-- 
Denys

[-- Attachment #2: hal-0.5.11-linux-input-h-sdk.patch --]
[-- Type: text/plain, Size: 761 bytes --]

diff --git a/packages/hal/hal_0.5.11.bb b/packages/hal/hal_0.5.11.bb
index e93ad64..432af22 100644
--- a/packages/hal/hal_0.5.11.bb
+++ b/packages/hal/hal_0.5.11.bb
@@ -1,8 +1,15 @@
 require hal.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI += " file://hal-right-input-h.patch;patch=1 \
              file://fix-configure.diff;patch=1"
 
-EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h"
+# The following code finds the right linux/input.h,
+# which also works with external-toolchain/SDK
+do_configure() {
+	linux_input_h=`echo "#include <linux/input.h>" | ${CPP} - | \
+		grep "linux\/input.h" | head -n 1 | awk -F '"' '{print $2}'`
+	autotools_do_configure
+	oe_runconf --with-linux-input-header=${linux_input_h}
+}

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: hal-0.5.11 fails with external toolchain/SDK
  2008-11-04 19:48   ` Denys Dmytriyenko
@ 2008-11-06 23:12     ` Denys Dmytriyenko
  2008-11-07  9:11       ` Koen Kooi
  0 siblings, 1 reply; 10+ messages in thread
From: Denys Dmytriyenko @ 2008-11-06 23:12 UTC (permalink / raw)
  To: openembedded-devel

On Tue, Nov 04, 2008 at 02:48:12PM -0500, Denys Dmytriyenko wrote:
> On Tue, Nov 04, 2008 at 12:13:24PM +0100, Holger Freyther wrote:
> > On Tuesday 04 November 2008 01:55:12 Denys Dmytriyenko wrote:
> > > Hi,
> > >
> > > New hal-0.5.11 from OpenMoko breaks builds with external-toolchain/SDK, as
> > > it hardcodes linux/input.h like this:
> > 
> > It is Openmoko, and I did add it.
> > 
> > what about something among the lines of?
> > 
> > echo "#include <linux/input.h>" | cpp | less | grep "linux\/input.h"
> 
> Thanks for the hint. I was able to fix it, so it finds the right linux/input.h 
> file even with external-toolchain/SDK.
> 
> The patch is attached to the ticket #4799 and this email. I was not able to 
> call autoreconf, as it was giving too many problems. autotools_do_configure 
> worked fine, but unfortunately, it doesn't take parameters to pass to the 
> oe_runconf, so I had to call it again with the correct --with flag. Let me 
> know if it's Ok or not. Thanks.

What about this patch? Does it look good? Any comments/suggestions? Can we 
push it? Thanks.

-- 
Denys


> diff --git a/packages/hal/hal_0.5.11.bb b/packages/hal/hal_0.5.11.bb
> index e93ad64..432af22 100644
> --- a/packages/hal/hal_0.5.11.bb
> +++ b/packages/hal/hal_0.5.11.bb
> @@ -1,8 +1,15 @@
>  require hal.inc
>  
> -PR = "r1"
> +PR = "r2"
>  
>  SRC_URI += " file://hal-right-input-h.patch;patch=1 \
>               file://fix-configure.diff;patch=1"
>  
> -EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h"
> +# The following code finds the right linux/input.h,
> +# which also works with external-toolchain/SDK
> +do_configure() {
> +	linux_input_h=`echo "#include <linux/input.h>" | ${CPP} - | \
> +		grep "linux\/input.h" | head -n 1 | awk -F '"' '{print $2}'`
> +	autotools_do_configure
> +	oe_runconf --with-linux-input-header=${linux_input_h}
> +}



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hal-0.5.11 fails with external toolchain/SDK
  2008-11-06 23:12     ` Denys Dmytriyenko
@ 2008-11-07  9:11       ` Koen Kooi
  2008-11-11  1:37         ` Denys Dmytriyenko
  0 siblings, 1 reply; 10+ messages in thread
From: Koen Kooi @ 2008-11-07  9:11 UTC (permalink / raw)
  To: openembedded-devel

On 07-11-2008 00:12, Denys Dmytriyenko wrote:
> On Tue, Nov 04, 2008 at 02:48:12PM -0500, Denys Dmytriyenko wrote:
>> On Tue, Nov 04, 2008 at 12:13:24PM +0100, Holger Freyther wrote:
>>> On Tuesday 04 November 2008 01:55:12 Denys Dmytriyenko wrote:
>>>> Hi,
>>>>
>>>> New hal-0.5.11 from OpenMoko breaks builds with external-toolchain/SDK, as
>>>> it hardcodes linux/input.h like this:
>>> It is Openmoko, and I did add it.
>>>
>>> what about something among the lines of?
>>>
>>> echo "#include<linux/input.h>" | cpp | less | grep "linux\/input.h"
>> Thanks for the hint. I was able to fix it, so it finds the right linux/input.h
>> file even with external-toolchain/SDK.
>>
>> The patch is attached to the ticket #4799 and this email. I was not able to
>> call autoreconf, as it was giving too many problems. autotools_do_configure
>> worked fine, but unfortunately, it doesn't take parameters to pass to the
>> oe_runconf, so I had to call it again with the correct --with flag. Let me
>> know if it's Ok or not. Thanks.
>
> What about this patch? Does it look good? Any comments/suggestions?

I was about to propose somethine like:

do_configure_prepend() {
linux_input_h=$(echo "#include <linux/input.h>" | ${CPP} - | \
	grep "linux\/input.h" | head -n 1 | awk -F '"' '{print $2}')	
}
EXTRA_OECONF += "--with-linux-input-header=${linux_input_h}"

But I then I realized that probably won't work as I expect it to work :)

regards,

Koen




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hal-0.5.11 fails with external toolchain/SDK
  2008-11-07  9:11       ` Koen Kooi
@ 2008-11-11  1:37         ` Denys Dmytriyenko
  0 siblings, 0 replies; 10+ messages in thread
From: Denys Dmytriyenko @ 2008-11-11  1:37 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1761 bytes --]

On Fri, Nov 07, 2008 at 10:11:30AM +0100, Koen Kooi wrote:
> On 07-11-2008 00:12, Denys Dmytriyenko wrote:
>> On Tue, Nov 04, 2008 at 02:48:12PM -0500, Denys Dmytriyenko wrote:
>>> On Tue, Nov 04, 2008 at 12:13:24PM +0100, Holger Freyther wrote:
>>>> On Tuesday 04 November 2008 01:55:12 Denys Dmytriyenko wrote:
>>>>> Hi,
>>>>>
>>>>> New hal-0.5.11 from OpenMoko breaks builds with external-toolchain/SDK, 
>>>>> as
>>>>> it hardcodes linux/input.h like this:
>>>> It is Openmoko, and I did add it.
>>>>
>>>> what about something among the lines of?
>>>>
>>>> echo "#include<linux/input.h>" | cpp | less | grep "linux\/input.h"
>>> Thanks for the hint. I was able to fix it, so it finds the right 
>>> linux/input.h
>>> file even with external-toolchain/SDK.
>>>
>>> The patch is attached to the ticket #4799 and this email. I was not able 
>>> to
>>> call autoreconf, as it was giving too many problems. 
>>> autotools_do_configure
>>> worked fine, but unfortunately, it doesn't take parameters to pass to the
>>> oe_runconf, so I had to call it again with the correct --with flag. Let 
>>> me
>>> know if it's Ok or not. Thanks.
>>
>> What about this patch? Does it look good? Any comments/suggestions?
>
> I was about to propose somethine like:
>
> do_configure_prepend() {
> linux_input_h=$(echo "#include <linux/input.h>" | ${CPP} - | \
> 	grep "linux\/input.h" | head -n 1 | awk -F '"' '{print $2}')	
> }
> EXTRA_OECONF += "--with-linux-input-header=${linux_input_h}"
>
> But I then I realized that probably won't work as I expect it to work :)

Ok, what if we change autotools_do_configure to accept parameters and pass 
them to oe_runconf? It's quite a trivial change - see two patches attached.

-- 
Denys

[-- Attachment #2: autotools_do_configure-accept-parameters.patch --]
[-- Type: text/plain, Size: 774 bytes --]

From 507ee230617603258736ecbcf4895de5429f8672 Mon Sep 17 00:00:00 2001
From: Denys Dmytriyenko <denis@denix.org>
Date: Mon, 10 Nov 2008 20:13:22 -0500
Subject: [PATCH] autotools.bbclass: allow autotools_do_configure to accept parameters and pass to oe_runconf


Signed-off-by: Denys Dmytriyenko <denis@denix.org>
---
 classes/autotools.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index 82b5311..adb57f6 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -134,7 +134,7 @@ autotools_do_configure() {
 	;;
 	esac
 	if [ -e ${S}/configure ]; then
-		oe_runconf
+		oe_runconf $@
 	else
 		oenote "nothing to configure"
 	fi
-- 
1.5.6.4


[-- Attachment #3: hal-0.5.11-fix-sdk-linux-input-h.patch --]
[-- Type: text/plain, Size: 1170 bytes --]

From 1a568f9490eb7bfd1060f47e2584d3ce41820b6b Mon Sep 17 00:00:00 2001
From: Denys Dmytriyenko <denis@denix.org>
Date: Mon, 10 Nov 2008 20:17:02 -0500
Subject: [PATCH] hal: Find and use the right linux/input.h to work with external toolchain


Signed-off-by: Denys Dmytriyenko <denis@denix.org>
---
 packages/hal/hal_0.5.11.bb |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/packages/hal/hal_0.5.11.bb b/packages/hal/hal_0.5.11.bb
index e93ad64..2b56fdf 100644
--- a/packages/hal/hal_0.5.11.bb
+++ b/packages/hal/hal_0.5.11.bb
@@ -1,8 +1,14 @@
 require hal.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI += " file://hal-right-input-h.patch;patch=1 \
              file://fix-configure.diff;patch=1"
 
-EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h"
+# The following code finds the right linux/input.h,
+# which also works with external-toolchain/SDK
+do_configure() {
+	linux_input_h=`echo "#include <linux/input.h>" | ${CPP} - | \
+		grep "linux\/input.h" | head -n 1 | awk -F '"' '{print $2}'`
+	autotools_do_configure --with-linux-input-header=${linux_input_h}
+}
-- 
1.5.6.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: hal-0.5.11 fails with external toolchain/SDK
  2008-11-04  0:55 hal-0.5.11 fails with external toolchain/SDK Denys Dmytriyenko
  2008-11-04 11:13 ` Holger Freyther
@ 2008-11-14 22:24 ` Koen Kooi
  2008-11-15 11:45   ` Michael 'Mickey' Lauer
  1 sibling, 1 reply; 10+ messages in thread
From: Koen Kooi @ 2008-11-14 22:24 UTC (permalink / raw)
  To: openembedded-devel

On 04-11-08 01:55, Denys Dmytriyenko wrote:
> Hi,

Can't we give Denys commit access? I've been fairly impressed with his 
work to get angstrom building using an external SDK.

regards,

Koen




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hal-0.5.11 fails with external toolchain/SDK
  2008-11-14 22:24 ` Koen Kooi
@ 2008-11-15 11:45   ` Michael 'Mickey' Lauer
  2008-11-15 14:53     ` Philip Balister
  0 siblings, 1 reply; 10+ messages in thread
From: Michael 'Mickey' Lauer @ 2008-11-15 11:45 UTC (permalink / raw)
  To: openembedded-devel

Am Friday 14 November 2008 23:24:28 schrieb Koen Kooi:
> On 04-11-08 01:55, Denys Dmytriyenko wrote:
> > Hi,
>
> Can't we give Denys commit access? I've been fairly impressed with his
> work to get angstrom building using an external SDK.

+1

-- 
:M:



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hal-0.5.11 fails with external toolchain/SDK
  2008-11-15 11:45   ` Michael 'Mickey' Lauer
@ 2008-11-15 14:53     ` Philip Balister
  2008-11-15 15:30       ` Michael 'Mickey' Lauer
  0 siblings, 1 reply; 10+ messages in thread
From: Philip Balister @ 2008-11-15 14:53 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

Michael 'Mickey' Lauer wrote:
> Am Friday 14 November 2008 23:24:28 schrieb Koen Kooi:
>> On 04-11-08 01:55, Denys Dmytriyenko wrote:
>>> Hi,
>> Can't we give Denys commit access? I've been fairly impressed with his
>> work to get angstrom building using an external SDK.
> 
> +1
> 

+1

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3303 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hal-0.5.11 fails with external toolchain/SDK
  2008-11-15 14:53     ` Philip Balister
@ 2008-11-15 15:30       ` Michael 'Mickey' Lauer
  0 siblings, 0 replies; 10+ messages in thread
From: Michael 'Mickey' Lauer @ 2008-11-15 15:30 UTC (permalink / raw)
  To: openembedded-devel

Denys,

send me your ssh key.

-- 
:M:



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-11-15 15:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-04  0:55 hal-0.5.11 fails with external toolchain/SDK Denys Dmytriyenko
2008-11-04 11:13 ` Holger Freyther
2008-11-04 19:48   ` Denys Dmytriyenko
2008-11-06 23:12     ` Denys Dmytriyenko
2008-11-07  9:11       ` Koen Kooi
2008-11-11  1:37         ` Denys Dmytriyenko
2008-11-14 22:24 ` Koen Kooi
2008-11-15 11:45   ` Michael 'Mickey' Lauer
2008-11-15 14:53     ` Philip Balister
2008-11-15 15:30       ` Michael 'Mickey' Lauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.