building u-boot - git failed
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!
Signature · 4 lines
Guo Hongruan, Embedded Linux Consultant Skype: camelguo Twitter: camelguo http://www.gulessoft.com
The same error when
MACHINE=at91sam9g20ek DISTRO=micro LIBC=glibc
see the following url for more information:
http://tinderbox.openembedded.net/packages/450941/
Quoted 37 lines · 在 Sun, 31 Jan 2010 11:20:18 +0800,Guo Hongruan <[email protected]> 写道:
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=glibcAnd it failed with the following information:
rm-oe-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common
(quoted diff) +0
-3-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
(quoted diff) +0
-3-pipe -DCONFIG_ARM -D__ARM__ -march=armv5te -mabi=apcs-gnu -mno-thumb-interwork -Wall -Wstrict-prototypes -fno-stack-protector -c -o board.o board.cboard.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 weakfor 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!
Signature · 4 lines
Guo Hongruan, Embedded Linux Consultant Skype: camelguo Twitter: camelguo http://www.gulessoft.com
Quoted 12 lines · 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
Quoted 1 line
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
Quoted 2 lines · 在 Sun, 31 Jan 2010 11:35:35 +0800,Holger Hans Peter Freyther…
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.
Quoted 4 lines
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.
Signature · 4 lines
Guo Hongruan, Embedded Linux Consultant Skype: camelguo Twitter: camelguo http://www.gulessoft.com
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.
lib_arm/board.c +9 -9
@@ -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 *
Quoted 15 lines · 在 Sun, 31 Jan 2010 11:52:50 +0800,Guo Hongruan <[email protected]> 写道:
Quoted 2 lines · 在 Sun, 31 Jan 2010 11:35:35 +0800,Holger Hans Peter Freyther…
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.
Quoted 4 lines
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.
Signature · 4 lines
Guo Hongruan, Embedded Linux Consultant Skype: camelguo Twitter: camelguo http://www.gulessoft.com
Quoted 5 lines · 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=f865fcbbb35851e75fee9c3a3fa8e0f71d9e6463adding the following patch to u-boot recipe can solve this problem.
Please create a patch that can be applied to the OE tree.
thanks
Quoted 8 lines · Holger Hans Peter Freyther
Quoted 5 lines · 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=f865fcbbb35851e75fee9c3a3fa8e0f71d9e6463adding 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
Quoted 8 lines
thanks
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 3 lines · 在 Sun, 31 Jan 2010 13:23:58 +0800,Khem Raj <[email protected]> 写道:
Quoted 1 line
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.
Signature · 4 lines
Guo Hongruan, Embedded Linux Consultant Skype: camelguo Twitter: camelguo http://www.gulessoft.com