[U-Boot] Build problem - ppmc7xx configuration
Vasili Galka
vvv444 at gmail.com
Sun May 25 14:11:40 CEST 2014
On Thu, May 22, 2014 at 10:39 PM, Vasili Galka <vvv444 at gmail.com> wrote:
> On Thu, May 22, 2014 at 10:05 PM, Tom Rini <trini at ti.com> wrote:
>>
>> On Thu, May 22, 2014 at 12:45:11PM +0300, Vasili Galka wrote:
>> > Hi,
>> >
>> > I'm trying to compile the "v2014.04" tag using "ppmc7xx" configuration
>> > on
>> > Ubuntu using powerpc-none-eabi toolchain. I'm running the following:
>> >
>> > make CROSS_COMPILE=powerpc-none-eabi- O=out/ ppmc7xx_config
>> > make CROSS_COMPILE=powerpc-none-eabi- O=out/
>> >
>> > And receiving the following error:
>> > [...]
>> > LDS u-boot.lds
>> > LD u-boot
>> > powerpc-none-eabi-ld.bfd:
>> >
>> > /usr/powerpc-none-eabi/lib/gcc/powerpc-none-eabi/4.8.1/libgcc.a(_lshrdi3.o):
>> > compiled normally and linked with modules compiled with -mrelocatable
>> > powerpc-none-eabi-ld.bfd: failed to merge target specific data of file
>> >
>> > /usr/powerpc-none-eabi/lib/gcc/powerpc-none-eabi/4.8.1/libgcc.a(_lshrdi3.o)
>> > powerpc-none-eabi-ld.bfd:
>> >
>> > /usr/powerpc-none-eabi/lib/gcc/powerpc-none-eabi/4.8.1/libgcc.a(_ashldi3.o):
>> > compiled normally and linked with modules compiled with -mrelocatable
>> > powerpc-none-eabi-ld.bfd: failed to merge target specific data of file
>> >
>> > /usr/powerpc-none-eabi/lib/gcc/powerpc-none-eabi/4.8.1/libgcc.a(_ashldi3.o)
>> > powerpc-none-eabi-ld.bfd:
>> >
>> > /usr/powerpc-none-eabi/lib/gcc/powerpc-none-eabi/4.8.1/libgcc.a(crtresxgpr.o):
>> > compiled normally and linked with modules compiled with -mrelocatable
>> > powerpc-none-eabi-ld.bfd: failed to merge target specific data of file
>> >
>> > /usr/powerpc-none-eabi/lib/gcc/powerpc-none-eabi/4.8.1/libgcc.a(crtresxgpr.o)
>> > make[1]: *** [u-boot] Error 1
>> > make: *** [sub-make] Error 2
>> >
>> > Can anyone please assist me in understanding the problem? Is something
>> > wrong with my toolchain? (I've built it myself)
>>
>> It's unhappy about toolchain provided libraries, so I lean yes, possible
>> toolchain issue. How did you generate your toolchain? By hand?
>> crosstool-ng? other?
>>
>> --
>> Tom
>
>
> By hand. I wonder what exactly is wrong with it...
> arm-none-eabi toolchain generated by exactly same method works fine.
Hi Tom,
Looking into it showed that building U-Boot for powerpc configuration uses
"-mrelocatable" flag. So I have solved the problem by recompiling gcc with
CFLAGS_FOR_TARGET="-mrelocatable-lib".
However, this rises the following question. What is different between powerpc
build of U-Boot and all other architectures? Why only powerpc adds -mrelocatable
flag while all other architectures don't add it?
Original commit adding the flag:
SHA-1: 858290178f222d998b6425d85cf06822467918f3
* ppc: Enable full relocation to RAM
The following changes allow U-Boot to fully relocate from flash to
RAM:
- Remove linker scripts' .fixup sections from the .text section
- Add -mrelocatable to PLATFORM_RELFLAGS for all boards
- Define CONFIG_RELOC_FIXUP_WORKS for all boards
Previously, U-Boot would partially relocate, but statically initialized
pointers needed to be manually relocated.
Signed-off-by: Peter Tyser <ptyser at xes-inc.com>
Best,
Vasili
More information about the U-Boot
mailing list