[ELDK] Unable to compile latest U-boot with ELDK 5.4

Peter Germer germerp at gmail.com
Tue Jan 7 13:34:50 CET 2014


Dear List,

Recently I tried to compile latest U-boot from git repository, with no success.
After installing ELDK 5.4 from ISO provided on Denx FTP server, I
installer the ARMv4t target, with the command of:

./install.sh -s gmae -r "minimal" armv4t

After the successful installation I set the variables as suggested by
the ELDK documentation:

source /opt/eldk-5.4/armv4t/environment-setup-armv4t-linux-gnueabi
export CROSS_COMPILE=${TARGET_PREFIX}
export ARCH=${TARGET_PREFIX%%-*}

When I try to compile U-boot, I got the following error:

[...]
make[1]: Entering directory
`/home/test/mini2440/uboot-git/u-boot/arch/arm/cpu/arm920t'
arm-linux-gnueabi-gcc  -g  -Os   -ffunction-sections -fdata-sections
-fno-common -ffixed-r9 -msoft-float  -D__KERNEL__
-DCONFIG_SYS_TEXT_BASE=0x0
-I/home/test/mini2440/uboot-git/u-boot/include
-I/home/test/mini2440/uboot-git/u-boot/arch/arm/include -fno-builtin
-ffreestanding -nostdinc -isystem
/opt/eldk-5.4/armv4t/sysroots/i686-eldk-linux/usr/lib/armv4t-linux-gnueabi/gcc/arm-linux-gnueabi/4.7.2/include
-pipe  -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork
-mabi=aapcs-linux -mword-relocations -march=armv4 -Wall
-Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral
-Wno-format-security -fstack-usage     -o cpu.o cpu.c -c
arm-linux-gnueabi-ld.bfd -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
 -r -o built-in.o  cpu.o
arm-linux-gnueabi-ld.bfd: unrecognized option '-Wl,-O1'
arm-linux-gnueabi-ld.bfd: use the --help option for usage information
make[1]: *** [built-in.o] Error 1
make[1]: Leaving directory
`/home/test/mini2440/uboot-git/u-boot/arch/arm/cpu/arm920t'
make: *** [arch/arm/cpu/arm920t/built-in.o] Error 2


I found that -WI,-O1 is set on LDFLAGS variable in the environment setup script:
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"

I tried to change it by removing -WI, to use the following parameters:
export LDFLAGS=" -O1 --hash-style=gnu --as-needed"

With this parameters I got much further, but got different error message:

cd /home/test/mini2440/uboot-git/u-boot && arm-linux-gnueabi-ld.bfd
-O1 --hash-style=gnu --as-needed  -pie -T u-boot.lds --gc-sections
-Bstatic -Ttext 0x0 arch/arm/cpu/arm920t/start.o --start-group
arch/arm/cpu/arm920t/built-in.o
arch/arm/cpu/arm920t/s3c24x0/built-in.o arch/arm/cpu/built-in.o
arch/arm/lib/built-in.o board/friendlyarm/mini2440/built-in.o
common/built-in.o disk/built-in.o drivers/built-in.o
drivers/dma/built-in.o drivers/gpio/built-in.o drivers/i2c/built-in.o
drivers/input/built-in.o drivers/mmc/built-in.o drivers/mtd/built-in.o
drivers/mtd/onenand/built-in.o drivers/mtd/spi/built-in.o
drivers/net/built-in.o drivers/net/phy/built-in.o
drivers/pci/built-in.o drivers/power/battery/built-in.o
drivers/power/built-in.o drivers/power/fuel_gauge/built-in.o
drivers/power/mfd/built-in.o drivers/power/pmic/built-in.o
drivers/serial/built-in.o drivers/spi/built-in.o
drivers/usb/eth/built-in.o drivers/usb/gadget/built-in.o
drivers/usb/host/built-in.o drivers/usb/musb-new/built-in.o
drivers/usb/musb/built-in.o drivers/usb/phy/built-in.o
drivers/usb/ulpi/built-in.o fs/built-in.o lib/built-in.o
lib/libfdt/built-in.o net/built-in.o test/built-in.o --end-group
/home/test/mini2440/uboot-git/u-boot/arch/arm/lib/eabi_compat.o  -L
/opt/eldk-5.4/armv4t/sysroots/armv4t-linux-gnueabi/usr/lib/arm-linux-gnueabi/4.7.2
-lgcc -Map u-boot.map -o u-boot
arm-linux-gnueabi-ld.bfd: u-boot: could not find output section .gnu.hash
arm-linux-gnueabi-ld.bfd: final link failed: Nonrepresentable section on output
make: *** [u-boot] Error 1


Do you have any idea what could cause these errors, and if there is a
way to compile U-boot with the provided ELDK?

Thanks in advance for any help!

Regards,
Peter


More information about the eldk mailing list