Skip to contentSkip to conversation

PXA build failure

U-Boot New Sergey Lapin 3 participants 5 messages Feb 23, 2009 – Feb 24, 2009

lore
Share & tools
lore
#0 lore raw

Hi, all!

I am used to build at91 board using Angstrom EABI toolchain (gcc-4.2.4) without any problems. Now I try to build PXA board and have the following error on final link stage: (I build master branch)

cd /home/slapin/u-boot && ~/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld -Bstatic -T /home/slapin/u-boot/board/pxa255_idp/u-boot.lds  -Ttext 0xa3080000 $UNDEF_SYM cpu/pxa/start.o \
			--start-group lib_generic/libgeneric.a lib_generic/lzma/liblzma.a cpu/pxa/libpxa.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/dma/libdma.a drivers/fpga/libfpga.a drivers/gpio/libgpio.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mmc/libmmc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/mtd/ubi/libubi.a drivers/mtd/spi/libspi_flash.a drivers/net/libnet.a drivers/net/phy/libphy.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a board/pxa255_idp/libpxa255_idp.a --end-group -L /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4 -lgcc \
			-Map u-boot.map -o u-boot

/home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivsi3.o): In function `__aeabi_uidiv':
/home/slapin/openedhand/tmp/work/armv5te-angstrom-linux-gnueabi/gcc-cross-4.2.4-r3/gcc-4.2.4/gcc/config/arm/lib1funcs.asm:730: multiple definition of `__udivsi3' lib_arm/libarm.a(_udivsi3.o):/home/slapin/u-boot/lib_arm/_udivsi3.S:17: first defined here
/home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: ERROR: Source object /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o) has EABI version 4, but target u-boot has EABI version 0 /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o) /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: ERROR: Source object /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_umoddi3.o) has EABI version 4, but target u-boot has EABI version 0 /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_umoddi3.o) /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: ERROR: Source object /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivsi3.o) has EABI version 4, but target u-boot has EABI version 0 /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivsi3.o) /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: ERROR: Source object /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_clz.o) has EABI version 4, but target u-boot has EABI version 0 /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_clz.o) /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to __aeabi_unwind_cpp_pr0' /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_umoddi3.o):(.ARM.exidx+0x0): undefined reference to __aeabi_unwind_cpp_pr0'

Board name is pxa255_idp. It seems that only PXA does have these problems, I have tried some other boards and had no problems, again.

Any ideas?
S.

#1 lore raw
Quoted 5 lines · Sergey Lapin

Hi, all!

I am used to build at91 board using Angstrom EABI toolchain (gcc-4.2.4) without any problems. Now I try to build PXA board and have the following error on final link stage: (I build master branch)

[skip]

I've also found that thos error is due to:
cpu/pxa/libpxa.a(interrupts.o): In function `get_ticks':
/home/slapin/u-boot/cpu/pxa/interrupts.c:113: undefined reference to `__umoddi3'
/home/slapin/u-boot/cpu/pxa/interrupts.c:113: undefined reference to `__udivdi3'
/home/slapin/u-boot/cpu/pxa/interrupts.c:113: undefined reference to `__udivdi3'
make: *** [u-boot] ?????? 1

and were introduced by commit 94a3312920b6f9b5da27309549fb73650718c10a

All the best,
S.

#2 lore raw
In reply to Sergey Lapin

Dear Sergey Lapin,

Quoted 5 lines · In message <[email protected]> you wrote:

Hi, all!

I am used to build at91 board using Angstrom EABI toolchain (gcc-4.2.4) without any problems. Now I try to build PXA board and have the following error on final link stage: (I build master branch)

This ius a known issue - all PXA boards don;t build currently with an EABI conformant tool chain.

Quoted 4 lines

Board name is pxa255_idp. It seems that only PXA does have these problems, I have tried some other boards and had no problems, again.

Any ideas?

Jean-Cristophe said he had some patches queued or planned, which we are waiting for.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The years of peak mental activity are undoubtedly between the ages of
four and eighteen. At four we know all the questions, at eighteen all
the answers.
#3 lore raw
In reply to Sergey Lapin
Quoted 23 lines · Sergey Lapin

Hi, all!

I am used to build at91 board using Angstrom EABI toolchain (gcc-4.2.4) without any problems. Now I try to build PXA board and have the following error on final link stage: (I build master branch)

cd /home/slapin/u-boot && ~/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld -Bstatic -T /home/slapin/u-boot/board/pxa255_idp/u-boot.lds  -Ttext 0xa3080000 $UNDEF_SYM cpu/pxa/start.o \
			--start-group lib_generic/libgeneric.a lib_generic/lzma/liblzma.a cpu/pxa/libpxa.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/dma/libdma.a drivers/fpga/libfpga.a drivers/gpio/libgpio.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mmc/libmmc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/mtd/ubi/libubi.a drivers/mtd/spi/libspi_flash.a drivers/net/libnet.a drivers/net/phy/libphy.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a board/pxa255_idp/libpxa255_idp.a --end-group -L /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4 -lgcc \
			-Map u-boot.map -o u-boot

/home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivsi3.o): In function `__aeabi_uidiv':
/home/slapin/openedhand/tmp/work/armv5te-angstrom-linux-gnueabi/gcc-cross-4.2.4-r3/gcc-4.2.4/gcc/config/arm/lib1funcs.asm:730: multiple definition of `__udivsi3' lib_arm/libarm.a(_udivsi3.o):/home/slapin/u-boot/lib_arm/_udivsi3.S:17: first defined here
/home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: ERROR: Source object /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o) has EABI version 4, but target u-boot has EABI version 0 /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o) /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: ERROR: Source object /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_umoddi3.o) has EABI version 4, but target u-boot has EABI version 0 /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_umoddi3.o) /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: ERROR: Source object /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivsi3.o) has EABI version 4, but target u-boot has EABI version 0 /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivsi3.o) /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: ERROR: Source object /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_clz.o) has EABI version 4, but target u-boot has EABI version 0 /home/slapin/openedhand/tmp/cross/bin/arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_clz.o) /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to __aeabi_unwind_cpp_pr0' /home/slapin/openedhand/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/libgcc.a(_umoddi3.o):(.ARM.exidx+0x0): undefined reference to __aeabi_unwind_cpp_pr0'

Quoted 2 lines

Board name is pxa255_idp. It seems that only PXA does have these problems, I have tried some other boards and had no problems, again.

I know as tell you Wolfgang PXA have some issue with the EABI toolchain

You can try the mm branch of the u-boot-arm tree

and the patch reply to this e-mail

Best Regards,
J.

#4 lore raw

PATCH 1/1 PXA: timer use do_div and simplify it

---
 cpu/pxa/interrupts.c |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 deletions(-)
cpu/pxa/interrupts.c +24 -22
index 40d8bf2..2bc5c50 100644
@@ -28,6 +28,7 @@
 
 #include <common.h>
 #include <asm/arch/pxa-regs.h>
+#include <div64.h>
 
 #ifdef CONFIG_USE_IRQ
 #error: interrupts not implemented yet
@@ -41,6 +42,20 @@
 #error "Timer frequency unknown - please config PXA CPU type"
 #endif
 
+static inline unsigned long long tick_to_time(unsigned long long tick)
+{
+	tick *= CONFIG_SYS_HZ;
+	do_div(tick, TIMER_FREQ_HZ);
+	return tick;
+}
+
+static inline unsigned long long us_to_tick(unsigned long long us)
+{
+	us = us * TIMER_FREQ_HZ + 999999;
+	do_div(us, 1000000);
+	return us;
+}
+
 int interrupt_init (void)
 {
 	/* nothing happens here - we don't setup any IRQs */
@@ -75,33 +90,20 @@ void reset_timer_masked (void)
 
 ulong get_timer_masked (void)
 {
-	unsigned long long ticks = get_ticks();
-
-	return (((ticks / TIMER_FREQ_HZ) * 1000) +
-	        ((ticks % TIMER_FREQ_HZ) * 1000) / TIMER_FREQ_HZ);
+	return tick_to_time(get_ticks());
 }
 
 void udelay_masked (unsigned long usec)
 {
+	unsigned long long tmp;
 	ulong tmo;
-	ulong endtime;
-	signed long diff;
-
-	if (usec >= 1000) {
-		tmo = usec / 1000;
-		tmo *= TIMER_FREQ_HZ;
-		tmo /= 1000;
-	} else {
-		tmo = usec * TIMER_FREQ_HZ;
-		tmo /= (1000*1000);
-	}
-
-	endtime = get_ticks() + tmo;
-
-	do {
-		ulong now = get_ticks();
-		diff = endtime - now;
-	} while (diff >= 0);
+
+	tmo = us_to_tick(usec);
+	tmp = get_ticks() + tmo;	/* get current timestamp */
+
+	while (get_ticks() < tmp)	/* loop till event */
+		 /*NOP*/;
+
 }
 
 /*
Signature · 1 line
1.5.6.5