[U-Boot] cross compile suceeds but not usable

kqt4at5v at gmail.com kqt4at5v at gmail.com
Thu Jul 19 17:17:56 CEST 2012


I downloaded the latest u-boot snapshot on 20120717, installed Sourcery 
CodeBench, set the CROSS_COMPILE variable, and compiled. There 
were no errors. When I try to load with kwboot it fails. If I build the 
same u-boot source on the target, Guruplug, with Debian Wheezy installed I 
get a usable u-boot.kwb.


[rray at grumpy2 u-boot_new_for_guruplug]$ arm-none-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/backup_2/work/arm/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../libexec/gcc/arm-none-linux-gnueabi/4.6.3/lto-wrapper
Target: arm-none-linux-gnueabi
Configured with: /scratch/nsidwell/arm/linux/src/gcc-4.6-2012.03/configure 
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu 
--target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap 
--disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs 
--with-arch=armv5te --with-gnu-as --with-gnu-ld 
--with-specs='%{save-temps: -fverbose-asm} 
%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} 
-D__CS_SOURCERYGXX_MAJ__=2012 -D__CS_SOURCERYGXX_MIN__=3 
-D__CS_SOURCERYGXX_REV__=57 %{O2:%{!fno-remove-local-statics: 
-fremove-local-statics}} 
%{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: 
-fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared 
--enable-lto --enable-symvers=gnu --enable-__cxa_atexit 
--with-pkgversion='Sourcery CodeBench Lite 2012.03-57' 
--with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls 
--prefix=/opt/codesourcery 
--with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc 
--with-build-sysroot=/scratch/nsidwell/arm/linux/install/arm-none-linux-gnueabi/libc 
--with-gmp=/scratch/nsidwell/arm/linux/obj/host-libs-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr 
--with-mpfr=/scratch/nsidwell/arm/linux/obj/host-libs-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr 
--with-mpc=/scratch/nsidwell/arm/linux/obj/host-libs-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr 
--with-ppl=/scratch/nsidwell/arm/linux/obj/host-libs-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr 
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' 
--with-cloog=/scratch/nsidwell/arm/linux/obj/host-libs-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr 
--with-libelf=/scratch/nsidwell/arm/linux/obj/host-libs-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr 
--disable-libgomp --enable-poison-system-directories 
--with-build-time-tools=/scratch/nsidwell/arm/linux/install/arm-none-linux-gnueabi/bin 
--with-build-time-tools=/scratch/nsidwell/arm/linux/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-57)


[rray at grumpy2 u-boot_new_for_guruplug]$ CROSS_COMPILE=arm-none-linux-gnueabi-
[rray at grumpy2 u-boot_new_for_guruplug]$ export CROSS_COMPILE
[rray at grumpy2 u-boot_new_for_guruplug]$ make mrproper
[rray at grumpy2 u-boot_new_for_guruplug]$ make guruplug_config
Configuring for guruplug board...
[rray at grumpy2 u-boot_new_for_guruplug]$ make u-boot.kwb
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
arm-none-linux-gnueabi-gcc -DDO_DEPS_ONLY \
     -g  -Os   -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ 
-DCONFIG_SYS_TEXT_BASE=0x00600000 
-I/backup_2/u-boot_new_for_guruplug/include -fno-builtin -ffreestanding 
-nostdinc -isystem 
/backup_2/work/arm/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/include 
-pipe  -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux 
-march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector 
-Wno-format-nonliteral -Wno-format-security -fstack-usage   \
     -o lib/asm-offsets.s lib/asm-offsets.c -c -S
Generating include/generated/generic-asm-offsets.h
tools/scripts/make-asm-offsets lib/asm-offsets.s 
include/generated/generic-asm-offsets.h
if [ -f arch/arm/cpu/arm926ejs/kirkwood/asm-offsets.c ];then \
     arm-none-linux-gnueabi-gcc -DDO_DEPS_ONLY \
     -g  -Os   -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ 
-DCONFIG_SYS_TEXT_BASE=0x00600000 
-I/backup_2/u-boot_new_for_guruplug/include -fno-builtin -ffreestanding 
-nostdinc -isystem 
/backup_2/work/arm/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/include 
-pipe  -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux 
-march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector 
-Wno-format-nonliteral -Wno-format-security -fstack-usage   \
       -o arch/arm/cpu/arm926ejs/kirkwood/asm-offsets.s 
arch/arm/cpu/arm926ejs/kirkwood/asm-offsets.c -c -S; \
   else \
     touch arch/arm/cpu/arm926ejs/kirkwood/asm-offsets.s; \
   fi
Generating include/generated/asm-offsets.h
tools/scripts/make-asm-offsets 
arch/arm/cpu/arm926ejs/kirkwood/asm-offsets.s 
include/generated/asm-offsets.h
for dir in tools examples/standalone examples/api arch/arm/cpu/arm926ejs 
; do \
       make -C $dir _depend ; done
make[1]: Entering directory `/backup_2/u-boot_new_for_guruplug/tools'
cat /dev/null  >.depend
make[1]: Leaving directory `/backup_2/u-boot_new_for_guruplug/tools'
make[1]: Entering directory `/backup_2/u-boot_new_for_guruplug/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/backup_2/u-boot_new_for_guruplug/tools'
make[1]: Entering directory 
`/backup_2/u-boot_new_for_guruplug/examples/standalone'
arm-none-linux-gnueabi-gcc -M -g  -Os   -fno-common -ffixed-r8 
-msoft-float  -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x00600000 
-I/backup_2/u-boot_new_for_guruplug/include -fno-builtin -ffreestanding 
-nostdinc -isystem 
/backup_2/work/arm/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/include 
-pipe  -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux 
-march=armv5te -I..   -MQ hello_world.o hello_world.c >.depend.hello_world
arm-none-linux-gnueabi-gcc -M -g  -Os   -fno-common -ffixed-r8 
-msoft-float  -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x00600000 
-I/backup_2/u-boot_new_for_guruplug/include -fno-builtin -ffreestanding 
-nostdinc -isystem 
/backup_2/work/arm/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/include 
-pipe  -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux 
-march=armv5te -I..   -MQ stubs.o stubs.c >.depend.stubs
cat /dev/null .depend.hello_world .depend.stubs >.depend

...

make[1]: Leaving directory 
`/backup_2/u-boot_new_for_guruplug/board/Marvell/guruplug'
make -C /backup_2/u-boot_new_for_guruplug/arch/arm/cpu/ u-boot.lds
make[1]: Entering directory 
`/backup_2/u-boot_new_for_guruplug/arch/arm/cpu'
make[1]: Nothing to be done for `u-boot.lds'.
make[1]: Leaving directory 
`/backup_2/u-boot_new_for_guruplug/arch/arm/cpu'
arm-none-linux-gnueabi-gcc -E -g  -Os   -fno-common -ffixed-r8 
-msoft-float  -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x00600000 
-I/backup_2/u-boot_new_for_guruplug/include -fno-builtin -ffreestanding 
-nostdinc -isystem 
/backup_2/work/arm/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/include 
-pipe  -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux 
-march=armv5te -include 
/backup_2/u-boot_new_for_guruplug/include/u-boot/u-boot.lds.h 
-DCPUDIR=arch/arm/cpu/arm926ejs  -ansi -D__ASSEMBLY__ -P - 
</backup_2/u-boot_new_for_guruplug/arch/arm/cpu/u-boot.lds >u-boot.lds
UNDEF_SYM=`arm-none-linux-gnueabi-objdump -x 
board/Marvell/guruplug/libguruplug.o api/libapi.o 
arch/arm/cpu/arm926ejs/kirkwood/libkirkwood.o 
arch/arm/cpu/arm926ejs/libarm926ejs.o arch/arm/lib/libarm.o 
common/libcommon.o disk/libdisk.o drivers/bios_emulator/libatibiosemu.o 
drivers/block/libblock.o drivers/dma/libdma.o drivers/fpga/libfpga.o 
drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o 
drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o 
drivers/mtd/libmtd.o drivers/mtd/nand/libnand.o 
drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o 
drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o 
drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o 
drivers/rtc/librtc.o drivers/serial/libserial.o drivers/spi/libspi.o 
drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.o 
drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o 
drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o 
drivers/usb/ulpi/libusb_ulpi.o drivers/video/libvideo.o 
drivers/watchdog/libwatchdog.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o 
fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o 
fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o 
lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o 
lib/zlib/libz.o net/libnet.o post/libpost.o | sed  -n -e 
's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`; cd 
/backup_2/u-boot_new_for_guruplug && arm-none-linux-gnueabi-ld  -pie -T 
u-boot.lds -Bstatic -Ttext 0x00600000 $UNDEF_SYM 
arch/arm/cpu/arm926ejs/start.o --start-group api/libapi.o 
arch/arm/cpu/arm926ejs/kirkwood/libkirkwood.o 
arch/arm/cpu/arm926ejs/libarm926ejs.o arch/arm/lib/libarm.o 
common/libcommon.o disk/libdisk.o drivers/bios_emulator/libatibiosemu.o 
drivers/block/libblock.o drivers/dma/libdma.o drivers/fpga/libfpga.o 
drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o 
drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o 
drivers/mtd/libmtd.o drivers/mtd/nand/libnand.o 
drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o 
drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o 
drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o 
drivers/rtc/librtc.o drivers/serial/libserial.o drivers/spi/libspi.o 
drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.o 
drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o 
drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o 
drivers/usb/ulpi/libusb_ulpi.o drivers/video/libvideo.o 
drivers/watchdog/libwatchdog.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o 
fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o 
fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o 
lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o 
lib/zlib/libz.o net/libnet.o post/libpost.o 
board/Marvell/guruplug/libguruplug.o --end-group 
/backup_2/u-boot_new_for_guruplug/arch/arm/lib/eabi_compat.o  -L 
/backup_2/work/arm/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3 
-lgcc -Map u-boot.map -o u-boot
arm-none-linux-gnueabi-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin
tools/mkimage -n 
"/backup_2/u-boot_new_for_guruplug/"board/Marvell/guruplug"/kwbimage.cfg" 
-T kwbimage \
     -a 0x00600000 -e 0x00600000 -d u-boot.bin u-boot.kwb
Preparing kirkwood boot image to boot from nand
Nand ECC mode = default
Nand page size = 0x800
Image Type:   Kirkwood Boot from NAND Flash Image
Data Size:    233356 Bytes = 227.89 kB = 0.22 MB
Load Address: 00600000
Entry Point:  00600000

[rray at grumpy2 u-boot_new_for_guruplug]$ tools/kwboot -t -B 115200 -b u-boot.kwb /dev/ttyUSB1
Sending boot message. Please reboot the target.../
Sending boot image...
xmodem: Bad message


Thanks
Richard


More information about the U-Boot mailing list