All of lore.kernel.org
 help / color / mirror / Atom feed
* building u-boot - git failed
@ 2010-01-31  3:20 Guo Hongruan
  2010-01-31  3:22 ` Guo Hongruan
  2010-01-31  3:35 ` Holger Hans Peter Freyther
  0 siblings, 2 replies; 8+ messages in thread
From: Guo Hongruan @ 2010-01-31  3:20 UTC (permalink / raw)
  To: openembeded-devel; +Cc: slapin

Hi guys,
   I tried to building openembedded with the following configuration:
MACHINE=afeb9260 DISTRO=micro LIBC=glibc
MACHINE=dm355-evm DISTRO=micro LIBC=glibc
MACHINE=dm365-evm DISTRO=micro LIBC=glibc
MACHINE=dm6446-evm DISTRO=micro LIBC=glibc
MACHINE=dm6467-evm DISTRO=micro LIBC=glibc

And it failed with the following information:

rm-oe-linux-gnueabi-gcc -g  -Os   -fno-strict-aliasing  -fno-common  
-ffixed-r8 -msoft-float  -D__KERNEL__ -DTEXT_BASE=0x21f00000  
-I/media/work-disk/workdir/arm-926ejs-test/work/afeb9260-oe-linux-gnueabi/u-boot-git-r37/git/include  
-fno-builtin -ffreestanding -nostdinc -isystem  
/media/work-disk/workdir/arm-926ejs-test/cross/armv5te/lib/gcc/arm-oe-linux-gnueabi/4.4.2/include  
-pipe  -DCONFIG_ARM -D__ARM__ -march=armv5te -mabi=apcs-gnu  
-mno-thumb-interwork  -Wall -Wstrict-prototypes -fno-stack-protector -c -o  
board.o board.c
board.c:126: error: inline function 'coloured_LED_init' cannot be declared  
weak
board.c:128: error: inline function 'red_LED_on' cannot be declared weak
board.c:130: error: inline function 'red_LED_off' cannot be declared weak
board.c:132: error: inline function 'green_LED_on' cannot be declared weak
board.c:134: error: inline function 'green_LED_off' cannot be declared weak
board.c:136: error: inline function 'yellow_LED_on' cannot be declared weak
board.c:138: error: inline function 'yellow_LED_off' cannot be declared  
weak

for more detailed information, please see the following urls:
http://tinderbox.openembedded.net/packages/451342/
http://tinderbox.openembedded.net/packages/451366/
http://tinderbox.openembedded.net/packages/451383/
http://tinderbox.openembedded.net/packages/451406/
http://tinderbox.openembedded.net/packages/451420/

anyone can give me some hints?

Thanks a lot!

-- 
Guo Hongruan, Embedded Linux Consultant
Skype: camelguo
Twitter: camelguo
http://www.gulessoft.com



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

* Re: building u-boot - git failed
  2010-01-31  3:20 building u-boot - git failed Guo Hongruan
@ 2010-01-31  3:22 ` Guo Hongruan
  2010-01-31  3:35 ` Holger Hans Peter Freyther
  1 sibling, 0 replies; 8+ messages in thread
From: Guo Hongruan @ 2010-01-31  3:22 UTC (permalink / raw)
  To: Guo Hongruan, openembeded-devel; +Cc: slapin

The same error when
MACHINE=at91sam9g20ek DISTRO=micro LIBC=glibc
see the following url for more information:
http://tinderbox.openembedded.net/packages/450941/


在 Sun, 31 Jan 2010 11:20:18 +0800,Guo Hongruan <camelguo@gmail.com> 写道:

> Hi guys,
>    I tried to building openembedded with the following configuration:
> MACHINE=afeb9260 DISTRO=micro LIBC=glibc
> MACHINE=dm355-evm DISTRO=micro LIBC=glibc
> MACHINE=dm365-evm DISTRO=micro LIBC=glibc
> MACHINE=dm6446-evm DISTRO=micro LIBC=glibc
> MACHINE=dm6467-evm DISTRO=micro LIBC=glibc
>
> And it failed with the following information:
>
> rm-oe-linux-gnueabi-gcc -g  -Os   -fno-strict-aliasing  -fno-common  
> -ffixed-r8 -msoft-float  -D__KERNEL__ -DTEXT_BASE=0x21f00000  
> -I/media/work-disk/workdir/arm-926ejs-test/work/afeb9260-oe-linux-gnueabi/u-boot-git-r37/git/include  
> -fno-builtin -ffreestanding -nostdinc -isystem  
> /media/work-disk/workdir/arm-926ejs-test/cross/armv5te/lib/gcc/arm-oe-linux-gnueabi/4.4.2/include  
> -pipe  -DCONFIG_ARM -D__ARM__ -march=armv5te -mabi=apcs-gnu  
> -mno-thumb-interwork  -Wall -Wstrict-prototypes -fno-stack-protector -c  
> -o board.o board.c
> board.c:126: error: inline function 'coloured_LED_init' cannot be  
> declared weak
> board.c:128: error: inline function 'red_LED_on' cannot be declared weak
> board.c:130: error: inline function 'red_LED_off' cannot be declared weak
> board.c:132: error: inline function 'green_LED_on' cannot be declared  
> weak
> board.c:134: error: inline function 'green_LED_off' cannot be declared  
> weak
> board.c:136: error: inline function 'yellow_LED_on' cannot be declared  
> weak
> board.c:138: error: inline function 'yellow_LED_off' cannot be declared  
> weak
>
> for more detailed information, please see the following urls:
> http://tinderbox.openembedded.net/packages/451342/
> http://tinderbox.openembedded.net/packages/451366/
> http://tinderbox.openembedded.net/packages/451383/
> http://tinderbox.openembedded.net/packages/451406/
> http://tinderbox.openembedded.net/packages/451420/
>
> anyone can give me some hints?
>
> Thanks a lot!
>


-- 
Guo Hongruan, Embedded Linux Consultant
Skype: camelguo
Twitter: camelguo
http://www.gulessoft.com



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

* Re: building u-boot - git failed
  2010-01-31  3:20 building u-boot - git failed Guo Hongruan
  2010-01-31  3:22 ` Guo Hongruan
@ 2010-01-31  3:35 ` Holger Hans Peter Freyther
  2010-01-31  3:52   ` Guo Hongruan
  1 sibling, 1 reply; 8+ messages in thread
From: Holger Hans Peter Freyther @ 2010-01-31  3:35 UTC (permalink / raw)
  To: openembedded-devel

On Sunday 31 January 2010 04:20:18 Guo Hongruan wrote:

> -mno-thumb-interwork  -Wall -Wstrict-prototypes -fno-stack-protector -c -o
> board.o board.c
> board.c:126: error: inline function 'coloured_LED_init' cannot be declared
> weak
> board.c:128: error: inline function 'red_LED_on' cannot be declared weak
> board.c:130: error: inline function 'red_LED_off' cannot be declared weak
> board.c:132: error: inline function 'green_LED_on' cannot be declared weak
> board.c:134: error: inline function 'green_LED_off' cannot be declared weak
> board.c:136: error: inline function 'yellow_LED_on' cannot be declared weak
> board.c:138: error: inline function 'yellow_LED_off' cannot be declared
> weak

> anyone can give me some hints?

Yeah,

please make sure some of your outstanding stuff is getting cleaned up and 
included in the upstream OpenEmbedded.


Now if you look at the code in board.c:96[1]

void inline __yellow_LED_off(void) {}
void yellow_LED_off(void) __attribute__((weak, alias("__yellow_LED_off")));

There are two GCC attributes that you could check the manual for. The first one 
is weak and the second one is an alias.

The idea of weak here seems to be that you have a default ARM implementation 
(__yellow_LED_off) but that a specific board could just write "void 
yellow_LED_off(void) { real_gpio_foo }" and U-Boot is properly linking and will 
use the board specific routine..

The alias is more or less to be able to have two names for the same text 
segment.


Now to the hint:
1.) The issue seems to be caused by using newer GCC?
2.) Take it up with upstream uboot to see how they want it to be changed.
2.1.) E.g. removing the "inline" could work and it should not increase the
       size of the text section
2.2) E.g. instead of using the alias it could call the inline function...



[1] http://git.denx.de/cgi-bin/gitweb.cgi?p=u-
boot.git;a=blob;f=lib_arm/board.c;h=e148739152c0826130ab70f249c74aa010165d67;hb=HEAD#l96



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

* Re: building u-boot - git failed
  2010-01-31  3:35 ` Holger Hans Peter Freyther
@ 2010-01-31  3:52   ` Guo Hongruan
  2010-01-31  4:02     ` Guo Hongruan
  0 siblings, 1 reply; 8+ messages in thread
From: Guo Hongruan @ 2010-01-31  3:52 UTC (permalink / raw)
  To: openembedded-devel

在 Sun, 31 Jan 2010 11:35:35 +0800,Holger Hans Peter Freyther  
<holger+oe@freyther.de> 写道:

> Now to the hint:
> 1.) The issue seems to be caused by using newer GCC?

I searched the error through google. It said that the error occurred using  
gcc-4.4.2, while using gcc-4.2, it works OK.

> 2.) Take it up with upstream uboot to see how they want it to be changed.
> 2.1.) E.g. removing the "inline" could work and it should not increase  
> the
>        size of the text section
> 2.2) E.g. instead of using the alias it could call the inline function...

Someone said it can be solved by removing 'inline' keywords.


-- 
Guo Hongruan, Embedded Linux Consultant
Skype: camelguo
Twitter: camelguo
http://www.gulessoft.com



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

* Re: building u-boot - git failed
  2010-01-31  3:52   ` Guo Hongruan
@ 2010-01-31  4:02     ` Guo Hongruan
  2010-01-31  4:16       ` Holger Hans Peter Freyther
  0 siblings, 1 reply; 8+ messages in thread
From: Guo Hongruan @ 2010-01-31  4:02 UTC (permalink / raw)
  To: Guo Hongruan, openembedded-devel

I think I got the answer, see  
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f865fcbbb35851e75fee9c3a3fa8e0f71d9e6463

adding the following patch to u-boot recipe can solve this problem.

diff --git a/lib_arm/board.c b/lib_arm/board.c
index 5e3d7f6..e148739 100644 (file)
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -93,23 +93,23 @@ extern void rtl8019_get_enetaddr (uchar * addr);
   * May be supplied by boards if desired
   */
  void inline __coloured_LED_init (void) {}
-void inline coloured_LED_init (void) __attribute__((weak,  
alias("__coloured_LED_init")));
+void coloured_LED_init (void) __attribute__((weak,  
alias("__coloured_LED_init")));
  void inline __red_LED_on (void) {}
-void inline red_LED_on (void) __attribute__((weak,  
alias("__red_LED_on")));
+void red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
  void inline __red_LED_off(void) {}
-void inline red_LED_off(void)       __attribute__((weak,  
alias("__red_LED_off")));
+void red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
  void inline __green_LED_on(void) {}
-void inline green_LED_on(void) __attribute__((weak,  
alias("__green_LED_on")));
+void green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
  void inline __green_LED_off(void) {}
-void inline green_LED_off(void)__attribute__((weak,  
alias("__green_LED_off")));
+void green_LED_off(void) __attribute__((weak, alias("__green_LED_off")));
  void inline __yellow_LED_on(void) {}
-void inline yellow_LED_on(void)__attribute__((weak,  
alias("__yellow_LED_on")));
+void yellow_LED_on(void) __attribute__((weak, alias("__yellow_LED_on")));
  void inline __yellow_LED_off(void) {}
-void inline yellow_LED_off(void)__attribute__((weak,  
alias("__yellow_LED_off")));
+void yellow_LED_off(void) __attribute__((weak,  
alias("__yellow_LED_off")));
  void inline __blue_LED_on(void) {}
-void inline blue_LED_on(void)__attribute__((weak,  
alias("__blue_LED_on")));
+void blue_LED_on(void) __attribute__((weak, alias("__blue_LED_on")));
  void inline __blue_LED_off(void) {}
-void inline blue_LED_off(void)__attribute__((weak,  
alias("__blue_LED_off")));
+void blue_LED_off(void) __attribute__((weak, alias("__blue_LED_off")));

  /************************************************************************
   * Init Utilities                                                      *

在 Sun, 31 Jan 2010 11:52:50 +0800,Guo Hongruan <camelguo@gmail.com> 写道:

> 在 Sun, 31 Jan 2010 11:35:35 +0800,Holger Hans Peter Freyther  
> <holger+oe@freyther.de> 写道:
>
>> Now to the hint:
>> 1.) The issue seems to be caused by using newer GCC?
>
> I searched the error through google. It said that the error occurred  
> using gcc-4.4.2, while using gcc-4.2, it works OK.
>
>> 2.) Take it up with upstream uboot to see how they want it to be  
>> changed.
>> 2.1.) E.g. removing the "inline" could work and it should not increase  
>> the
>>        size of the text section
>> 2.2) E.g. instead of using the alias it could call the inline  
>> function...
>
> Someone said it can be solved by removing 'inline' keywords.
>
>


-- 
Guo Hongruan, Embedded Linux Consultant
Skype: camelguo
Twitter: camelguo
http://www.gulessoft.com



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

* Re: building u-boot - git failed
  2010-01-31  4:02     ` Guo Hongruan
@ 2010-01-31  4:16       ` Holger Hans Peter Freyther
  2010-01-31  5:23         ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Holger Hans Peter Freyther @ 2010-01-31  4:16 UTC (permalink / raw)
  To: openembedded-devel

On Sunday 31 January 2010 05:02:28 Guo Hongruan wrote:
> I think I got the answer, see
> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f865fcbbb35851e75fee9c3a3fa
> 8e0f71d9e6463
> 
> adding the following patch to u-boot recipe can solve this problem.

Please create a patch that can be applied to the OE tree.

thanks



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

* Re: building u-boot - git failed
  2010-01-31  4:16       ` Holger Hans Peter Freyther
@ 2010-01-31  5:23         ` Khem Raj
  2010-01-31  5:33           ` Guo Hongruan
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2010-01-31  5:23 UTC (permalink / raw)
  To: openembedded-devel

On Sat, Jan 30, 2010 at 8:16 PM, Holger Hans Peter Freyther
<holger+oe@freyther.de> wrote:
> On Sunday 31 January 2010 05:02:28 Guo Hongruan wrote:
>> I think I got the answer, see
>> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f865fcbbb35851e75fee9c3a3fa
>> 8e0f71d9e6463
>>
>> adding the following patch to u-boot recipe can solve this problem.
>
> Please create a patch that can be applied to the OE tree.

couple of months back I was hitting this error for beaglebord and had
the same patch in my local repo but never pushed it


>
> thanks
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: building u-boot - git failed
  2010-01-31  5:23         ` Khem Raj
@ 2010-01-31  5:33           ` Guo Hongruan
  0 siblings, 0 replies; 8+ messages in thread
From: Guo Hongruan @ 2010-01-31  5:33 UTC (permalink / raw)
  To: openembedded-devel

在 Sun, 31 Jan 2010 13:23:58 +0800,Khem Raj <raj.khem@gmail.com> 写道:

>> Please create a patch that can be applied to the OE tree.
> couple of months back I was hitting this error for beaglebord and had
> the same patch in my local repo but never pushed it

Please push it.


-- 
Guo Hongruan, Embedded Linux Consultant
Skype: camelguo
Twitter: camelguo
http://www.gulessoft.com



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

end of thread, other threads:[~2010-01-31  5:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-31  3:20 building u-boot - git failed Guo Hongruan
2010-01-31  3:22 ` Guo Hongruan
2010-01-31  3:35 ` Holger Hans Peter Freyther
2010-01-31  3:52   ` Guo Hongruan
2010-01-31  4:02     ` Guo Hongruan
2010-01-31  4:16       ` Holger Hans Peter Freyther
2010-01-31  5:23         ` Khem Raj
2010-01-31  5:33           ` Guo Hongruan

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.