Skip to contentSkip to conversation

EABI problem

U-Boot-Users Patrice Vilchez 3 participants 7 messages Jul 5, 2007 – Jul 6, 2007

lore
Share & tools
lore
#0 lore raw

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 <[email protected]>

Remove 64 bits division into nand driver to compile with an EABI toolchain

---

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

#1 lore raw

I bottom post

Quoted 8 lines

-----Original Message-----
From: u-boot-users-bounces at lists.sourceforge.net [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf Of Patrice Vilchez
Sent: 05 July 2007 18:12
To: U-Boot-Users at lists.sourceforge.net
Subject: [U-Boot-Users] EABI problem

Quoted 6 lines

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

#2 lore raw

Peter Pearse a ?crit :

Quoted 13 lines

I bottom post

Quoted 10 lines

-----Original Message-----
From: u-boot-users-bounces at lists.sourceforge.net [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf Of Patrice Vilchez
Sent: 05 July 2007 18:12
To: U-Boot-Users at lists.sourceforge.net
Subject: [U-Boot-Users] EABI problem

Hello,

Quoted 9 lines
Quoted 5 lines

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.

#3 lore raw
Quoted 10 lines · Patrice Vilchez
Quoted 3 lines

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3303 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070706/7f059977/attachment.bin

#4 lore raw

Philip Balister a ?crit :

Quoted 25 lines
Quoted 10 lines · Patrice Vilchez
Quoted 3 lines

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

Quoted 1 line

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.

#5 lore raw
Quoted 4 lines · Patrice Vilchez
Quoted 1 line

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3303 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070706/66bcbc86/attachment.bin

#6 lore raw

Philip Balister a ?crit :

Quoted 10 lines
Quoted 4 lines · Patrice Vilchez
Quoted 1 line

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.