Reputation: 1971
When I try to compile u-boot I get the following error:
The error is explained in this link:
http://www.denx.de/wiki/DULG/SourceObjectHasEABIVersion4ButTargetHasEABIVersion0
However, I don't know where to change in the source code.
Upvotes: 2
Views: 4900
Reputation: 1971
I changed the line
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
in cpu/arm926ejs/config.mk to
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=aapcs-linux)
This time, I get the following errors:
/home/ubuntu/Desktop/lpc3250/toolchain-final-armv5l-timesys-linux-uclibcgnueabi/bin/../lib/gcc/armv5l-timesys-linux-uclibcgnueabi/4.5.3/libgcc.a(_dvmd_lnx.o): In function `__aeabi_ldiv0':
/home/timesys/work/ea313x_factory/factory-HEAD/build_armv5l-timesys-linux-uclibcgnueabi/gcc-4.5.3/gcc-4.5.3/libgcc/../gcc/config/arm/lib1funcs.asm:1265: undefined reference to `raise'
/home/ubuntu/Desktop/lpc3250/toolchain-final-armv5l-timesys-linux-uclibcgnueabi/bin/../lib/gcc/armv5l-timesys-linux-uclibcgnueabi/4.5.3/libgcc.a(bpabi.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
/home/ubuntu/Desktop/lpc3250/toolchain-final-armv5l-timesys-linux-uclibcgnueabi/bin/../lib/gcc/armv5l-timesys-linux-uclibcgnueabi/4.5.3/libgcc.a(_divdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
/home/ubuntu/Desktop/lpc3250/toolchain-final-armv5l-timesys-linux-uclibcgnueabi/bin/../lib/gcc/armv5l-timesys-linux-uclibcgnueabi/4.5.3/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
It seems that the problem relates to libgcc.a.
What I learnt is u-boot compiles with very few compilers.
The link
http://communities.mentor.com/community/cs/archives/arm-gnu/msg02478.html
explains my problem as
This is a simple problem to fix. First you need to understand that the ARM EABI and ARM GNU/Linux toolchains are different. The Linux kernel and applications are compiled with ARM GNU/Linux toolchain, while bootloaders are compiled with ARM EABI toolchain.
U-boot is a bare-metal application, therefore use the ARM EABI toolchain. That is the best way to compile U-boot and other non-Linux applications. It is possible to compile U-boot with Linux toolchain but not recommended.
Upvotes: 1