[U-Boot-Users] EABI problem

Hello,
I am quite new on this mailing list.
I have tried to build u-boot with the last EABI toolchain from codesourcery (arm-2007q1-10 version). It seems that in the file "driver/nand/nand_util.c" there is some 64 bits division which causes a crash during the link process.
bye, Patrice.
-----8<
From: Patrice Vilchez patrice.vilchez@rfo.atmel.com
Remove 64 bits division into nand driver to compile with an EABI toolchain
Signed-off-by: Patrice Vilchez patrice.vilchez@rfo.atmel.com ---
driver/nand/nand_util.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff -Nru u-boot-1.2.0.orig/drivers/nand/nand_util.c u-boot-1.2.0.new/drivers/nand/nand_util.c --- u-boot-1.2.0.orig/drivers/nand/nand_util.c 2007-01-07 00:13:11.000000000 +0100 +++ u-boot-1.2.0.new/drivers/nand/nand_util.c 2007-07-05 19:03:03.000000000 +0200 @@ -209,9 +209,9 @@
if (!opts->quiet) { int percent = (int) - ((unsigned long long) + ((unsigned long) (erase.addr+meminfo->erasesize-opts->offset) - * 100 / erase_length); + / erase_length) * 100;
/* output progress message only at whole percent * steps to reduce the number of messages printed @@ -476,9 +476,9 @@
if (!opts->quiet) { int percent = (int) - ((unsigned long long) - (opts->length-imglen) * 100 - / opts->length); + ((unsigned long) + (opts->length-imglen) + / opts->length) * 100; /* output progress message only at whole percent * steps to reduce the number of messages printed * on (slow) serial consoles @@ -652,9 +652,9 @@
if (!opts->quiet) { int percent = (int) - ((unsigned long long) - (opts->length-imglen) * 100 - / opts->length); + ((unsigned long) + (opts->length-imglen) + / opts->length) * 100; /* output progress message only at whole percent * steps to reduce the number of messages printed * on (slow) serial consoles

I bottom post
-----Original Message----- From: u-boot-users-bounces@lists.sourceforge.net [mailto:u-boot-users-bounces@lists.sourceforge.net] On Behalf Of Patrice Vilchez Sent: 05 July 2007 18:12 To: U-Boot-Users@lists.sourceforge.net Subject: [U-Boot-Users] EABI problem
Hello,
I am quite new on this mailing list. I have tried to build u-boot with the last EABI toolchain
from codesourcery (arm-2007q1-10 version).
Which board?
Regards
Peter

Peter Pearse a écrit :
I bottom post
-----Original Message----- From: u-boot-users-bounces@lists.sourceforge.net [mailto:u-boot-users-bounces@lists.sourceforge.net] On Behalf Of Patrice Vilchez Sent: 05 July 2007 18:12 To: U-Boot-Users@lists.sourceforge.net Subject: [U-Boot-Users] EABI problem
Hello,
I am quite new on this mailing list. I have tried to build u-boot with the last EABI toolchain
from codesourcery (arm-2007q1-10 version).
Which board?
For an AT91SAM9263EK board. I am adding AT91 evaluation kits support to u-boot 1.2.0 and I did some tests which several EABI compiler : codesourcery , open embedded and buildroot. It seems when there is a 64 bits division the compiler refers to "_udivdi3" which is not implemented into "u-boot/lib_arm/" library and then try to link with libgcc from compiler :
/usr/local/opt/codesourcery/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/libgcc.a(_udivsi3.o): In function `__aeabi_uidiv': /scratch/paul/arm/src/gcc-4.2/gcc/config/arm/lib1funcs.asm:(.text+0x0): multiple definition of `__udivsi3' lib_arm/libarm.a(_udivsi3.o):_udivsi3.S:17: first defined here /opt/codesourcery/arm-2007q1/bin/arm-none-linux-gnueabi-ld: ERROR: Source object /usr/local/opt/codesourcery/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/libgcc.a(_udivdi3.o) has EABI version 4, but target u-boot has EABI version 0 /opt/codesourcery/arm-2007q1/bin/arm-none-linux-gnueabi-ld: failed to merge target specific data of file /usr/local/opt/codesourcery/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/libgcc.a(_udivdi3.o) /opt/codesourcery/arm-2007q1/bin/arm-none-linux-gnueabi-ld: ERROR: Source object /usr/local/opt/codesourcery/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/libgcc.a(_udivsi3.o) has EABI version 4, but target u-boot has EABI version 0 /opt/codesourcery/arm-2007q1/bin/arm-none-linux-gnueabi-ld: failed to merge target specific data of file /usr/local/opt/codesourcery/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/libgcc.a(_udivsi3.o) /opt/codesourcery/arm-2007q1/bin/arm-none-linux-gnueabi-ld: ERROR: Source object /usr/local/opt/codesourcery/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/libgcc.a(_clz.o) has EABI version 4, but target u-boot has EABI version 0 /opt/codesourcery/arm-2007q1/bin/arm-none-linux-gnueabi-ld: failed to merge target specific data of file /usr/local/opt/codesourcery/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/libgcc.a(_clz.o) /usr/local/opt/codesourcery/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
Patrice.

Patrice Vilchez wrote:
Which board?
For an AT91SAM9263EK board. I am adding AT91 evaluation kits support to u-boot 1.2.0 and I did
some tests which several EABI compiler : codesourcery , open embedded and buildroot. It seems when there is a 64 bits division the compiler refers to "_udivdi3" which is not implemented into "u-boot/lib_arm/" library and then try to link with libgcc from compiler :
I am also using an EABI compiler (from openembedded) and see these messages (among some other problems):
/home/balister/oe/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/libgcc.a(_dvmd_lnx.o): In function `__div0': /home/balister/oe/tmp/work/armv5te-angstrom-linux-gnueabi/gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/lib1funcs.asm:1001: undefined reference to `raise' /home/balister/oe/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/libgcc.a(_divdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0' /home/balister/oe/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0' make: *** [u-boot] Error 1
Philip

Philip Balister a écrit :
Patrice Vilchez wrote:
Which board?
For an AT91SAM9263EK board. I am adding AT91 evaluation kits support to u-boot 1.2.0 and I
did some tests which several EABI compiler : codesourcery , open embedded and buildroot. It seems when there is a 64 bits division the compiler refers to "_udivdi3" which is not implemented into "u-boot/lib_arm/" library and then try to link with libgcc from compiler :
I am also using an EABI compiler (from openembedded) and see these messages (among some other problems):
/home/balister/oe/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/libgcc.a(_dvmd_lnx.o): In function `__div0': /home/balister/oe/tmp/work/armv5te-angstrom-linux-gnueabi/gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/lib1funcs.asm:1001: undefined reference to `raise' /home/balister/oe/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/libgcc.a(_divdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0' /home/balister/oe/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0' make: *** [u-boot] Error 1
Philip
Are you compiling a file with a 64 bits division ? I my case it was driver/nand/nand_utils.c enabled by adding "CFG_CMD_NAND" to CONFIG_COMMANDS.
Patrice.

Patrice Vilchez wrote:
Philip
Are you compiling a file with a 64 bits division ? I my case it was driver/nand/nand_utils.c enabled by adding
"CFG_CMD_NAND" to CONFIG_COMMANDS.
Yes, I have CFM_CMD_NAND set. I can build u-boot for the omap5912osk with the same compiler fine.
Philip

Philip Balister a écrit :
Patrice Vilchez wrote:
Philip
Are you compiling a file with a 64 bits division ? I my case it was driver/nand/nand_utils.c enabled by adding
"CFG_CMD_NAND" to CONFIG_COMMANDS.
Yes, I have CFM_CMD_NAND set. I can build u-boot for the omap5912osk with the same compiler fine.
Philip
But have you set CFG_NAND_LEGACY flag ? It disables the nand_utils.c compilation and then avoid 64 bits division.
from driver/nand/nand_utils.c #if (CONFIG_COMMANDS & CFG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
I do not see any CFG_CMD_NAND into include/configs/omap5912osk.h file.
Patrice.
participants (3)
-
Patrice Vilchez
-
Peter Pearse
-
Philip Balister