This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UBOOT for Davinci TMS320 DM6441ZWT

Other Parts Discussed in Thread: OMAP-L138

Hi all, 

I'm trying to compile the u-boot for my davinci board TMS320 DM6441ZWT. The flash is S29GL256S11FHIV20 by Spansion. It's a NOR flash. I have two issues here: 

1. The uboot doesn't compile

The u-boot compiles fine for a really old version 1.1.4.

However, when I tried to upgrade to the latest version, it doesn't compile. I need to cross-compile with arm_v5t_le-gcc. As follows are the commands I used:

make CROSS_COMPILE=arm_v5t_le- distclean
make CROSS_COMPILE=arm_v5t_le- clean
make CROSS_COMPILE=arm_v5t_le- davinci_dvevm_config
make CROSS_COMPILE=arm_v5t_le-

The first three ran fine, but the last one stopped with errors. The error message is: 

crt0.S:111: Error: register expected, not '#(124)' -- `sub sp,#(124)'

I checked it, that's a variable GD_SIZE. I have no idea what that is, seems like something set to be the sizeof(struct global_data). Please tell me what's wrong with it!!

2. The rebuild of NOR flash confuses me. 

My flash is NOR, but per this page: 

http://processors.wiki.ti.com/index.php/Booting_Linux_kernel_using_U-Boot#NAND_Flash_.28ramdisk_as_rootfs.29

the NOR flash only supports OMAP-L138 (or DA850, AM18xx). Also, it says  My borad is unfortunately dvevm. So does it mean that's not supported? 

THANK YOU SO MUCH for any answers to any of the questions!

  • That code is relatively new. It looks to have been added in the last few months. My guess is that your version of arm_v5t_le-gcc does not support the two operand format. Oddly, the as few lines lower, the author uses the three operand format. Try replacing
           sub     sp, #GD_SIZE    /* allocate one GD above SP */
    with
           sub     sp, sp, #GD_SIZE    /* allocate one GD above SP */
    Or updating arm_v5t_le-gcc. Or using a U-Boot version before those changes, like 2012.10. I assume you want the latest U-boot version for possible support of your NOR device.

  • Hi dear Norman, 

    Thank you so much it works! However, it has a different error now. 

    It had a bunch of warnings at the first place, I don't know whether that's affecting:

    arm_v5t_le-ld: /opt/MVL4/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3/libgcc.a(_udivsi3.oS): warning: duplicate section `.note.gnu.arm.ident' has different contents

    arm_v5t_le-ld: /opt/MVL4/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3/libgcc.a(_divsi3.oS): warning: duplicate section `.note.gnu.arm.ident' has different contents

    arm_v5t_le-ld: /opt/MVL4/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3/libgcc.a(_umodsi3.oS): warning: duplicate section `.note.gnu.arm.ident' has different contents

    arm_v5t_le-ld: /opt/MVL4/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3/libgcc.a(_modsi3.oS): warning: duplicate section `.note.gnu.arm.ident' has different contents

    arm_v5t_le-ld: /opt/MVL4/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3/libgcc.a(_dvmd_tls.oS): warning: duplicate section `.note.gnu.arm.ident' has different contents

    arm_v5t_le-ld: /opt/MVL4/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3/libgcc.a(_lshrdi3.oS): warning: duplicate section `.note.gnu.arm.ident' has different contents

    arm_v5t_le-ld: /opt/MVL4/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3/libgcc.a(_ashrdi3.oS): warning: duplicate section `.note.gnu.arm.ident' has different contents

    arm_v5t_le-ld: /opt/MVL4/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3/libgcc.a(_ashldi3.oS): warning: duplicate section `.note.gnu.arm.ident' has different contents

    Then it had this error:

    arm_v5t_le-ld: /bin/sh: line 1: 16996 Segmentation fault arm_v5t_le-ld -pie -T u-boot.lds -Bstatic -Ttext 0x81080000 $UNDEF_LST arch/arm/cpu/arm926ejs/start.o --start-group api/libapi.o arch/arm/cpu/arm926ejs/davinci/libdavinci.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/dfu/libdfu.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/battery/libbattery.o drivers/power/fuel_gauge/libfuel_gauge.o drivers/power/libpower.o drivers/power/pmic/libpmic.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/sound/libsound.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-new/libusb_musb-new.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/cbfs/libcbfs.o fs/cramfs/libcramfs.o fs/ext4/libext4fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/libfs.o fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o fs/zfs/libzfs.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 test/libtest.o board/davinci/dvevm/libdvevm.o --end-group -L /opt/MVL4/montavista/pro/devkit/arm/v5t_le/bin/../lib/gcc/armv5tl-montavista-linuxeabi/3.4.3 -lgcc -Map u-boot.map -o u-boot
    make: *** [u-boot] Error 139

    I tested this with a version from Nov 2012, it gave the same error. Could you please help me with this again, thank you so much!

  • I've never dealt with those kind of errors before. Some guesses. I think those errors are due to an incompatibility between the compiler builtin libraries and the ones in the u-boot code. I would guess that the two have to have hte same signature to allow "soft" linking, ie the u-boot version overrides the compilers. You could try adding a link parameter to remove the compilers libraries:

    arch/arm/config.mk
    PLATFORM_LDFLAGS += -nostdlib

    No guarantees. Quite probably will create new errors. A lot of guessing on my part.

    I assume the MontaVista compiler is the same vintage as the MontaVista Linux 2.6.18 kernel. Both the compiler and kernel are very old. Updating to a newer CodeSourcery or Arago toolchain might help in compiling newer U-Boot versions. You'll probably still need to older compiler for Linux 2.6.18.

  • Thanks Norman, I tried adding that one line, but that didn't help. However, fortunately our system has MVL5 with arm_v5t_le-gcc 4.2.0 and arm_v5t_le-ld 2.17.50. That compiles fine with no errors. So I guess as you said, it's some compiler's linking issue. Thanks for pointing me to that direction! This problem is solved!