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.

Not able to compile u-boot and MLO for AM3703 Eval Board

Other Parts Discussed in Thread: AM3703

Hi,

I got AM3703 eval board and I have installed codesourcery came with it.

Now i am trying to compile source code for u-boot came with and I am not able to do so.

Development Platform: Ubuntu 10.04

For Compiling u-boot reference page: http://processors.wiki.ti.com/index.php/AMSDK_u-boot_User%27s_Guide

Error Encountered: dirname:

make: arm-none-linux-gnueabi-gcc: Command not found
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
Configuring for omap3_evm board...
make
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03'
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
missing operand
Try `dirname --help' for more information.
Generating /home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03/test/include/autoconf.mk
/bin/sh: line 3: arm-none-linux-gnueabi-gcc: command not found
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
Generating /home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03/test/include/autoconf.mk.dep
/bin/sh: line 3: arm-none-linux-gnueabi-gcc: command not found
make[1]: Leaving directory `/home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03'
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03'
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
/bin/sh: arm-none-linux-gnueabi-ld: command not found
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
arm-none-linux-gnueabi-gcc -DDO_DEPS_ONLY \
        -g  -Os   -fno-common -ffixed-r8 -msoft-float   -D__KERNEL__ -I/home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03/test/include2 -I/home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03/test/include -I/home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03/include -fno-builtin -ffreestanding -nostdinc -isystem  -pipe  -DCONFIG_ARM -D__ARM__         -march=armv5 -Wall -Wstrict-prototypes      \
        -o /home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03/test/lib/asm-offsets.s /home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03/lib/asm-offsets.c -c -S
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: *** [/home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03/test/lib/asm-offsets.s] Error 127
make[1]: Leaving directory `/home/bhuser/dmmalavi/tiOMAPEval/SourceCode/uboot/u-boot-2011.09-psp04.06.00.03'
make: *** [omap3_evm] Error 2

CAN any one help me figure out why I am not able to run the make file... Its urgent and I really look forward solution from the community...

Thank You

Dhaval

  • please check if the toolchain is in your path. You can check by typing 'echo $PATH'. 

    Regards,

    Yan

  • I set the PATH variable to $HOME/CodeSourcery/Sourcery_G++_Lite/bin:

    But still I am getting same error running the make file for uBoot.

     

     

     

  • I have couple of other string set as PATH variable, so do I need to remove those????

  • No, you don't need remove them.

    When you just type "arm-none-linux-gnueabi-gcc", what do you see? Are you seeing the same "command not found" error?

    If yes, please enter 'echo $PATH' in the same window as you type "arm-none-linux-gnueabi-gcc" and to see if the toolchain path is in. Please post the output here if possible.

    You could also type the full path command like $HOME/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc to see the toolchain installation is ok.

    Regards,

    Yan

  • I tried: arm-none-linux-gnueabi-gcc on command prompt and it gives me

    no input files.

    Seems path is properly set.

    Now, when I try to run:

    make O=test CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_evm

    it gives me

    /bin/sh: arm-none-linux-gnueabi-gcc: command not found and many other messages eventually exiting with error code of 2

  • Did you run the above two commands in the same window? I assume you did not use 'sudo' to make.



  • I did run the two commands on the same window. And I tired with sudo for make but same error code

  • any suggestions for solving this ....

     

    need help need help....

     

    DM

  • What SDK version are you using?

    The instructions that you are referencing are for the latest SDK. I don't know if this is the problem but try removing the O= from your command line. This is a guess since the toolchain you're using indicates an older SDK.

    You might consider downloading the latest version of the SDK for the board you have. The newer SDKs no longer use the code sourcery toolchain. They use the toolchain that comes with the SDK.

  • Thanks for your reply..

    You are correct Schuyler Patton, I was using old SDK. I downloaded new SDK from TI's website and I installed it.

    I set the PATH variable to correct arm-arago-linux-gnueabi-gcc path and was able to run "make" for u-Boot.

    However, my script fails with below ERROR 2:

    -O u-boot -a 0x80100000 -e 0 \
            -n  "U-Boot 2011.09 for evm board" \
            -d /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/u-boot.bin /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/u-boot.img
    /scratchbox/tools/bin/misc_runner: /targets/links/scratchbox.config: No such file or directory
    make[1]: *** [/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/u-boot.img] Error 126
    make[1]: Leaving directory `/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03'
    make: *** [omap3_evm] Error 2

    Can you please help me out with this....

    Thank You,

    DM

  • This command completed a build for me, I'm not sure it helps you though:

    make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm distclean

    make O=am37x CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm omap3_evm

    Looking at your log and the first part of the log I have we are getting different results. Did you run the setup.sh script that comes with the SDK? Another guess here is if you are missing some packages necessary to build u-boot and kernel.

    Make sure that you have run this command or perhaps verify that you have these packages installed.

    "sudo apt-get install xinetd tftpd nfs-kernel-server minicom build-essential libncurses5-dev uboot-mkimage autoconf automake"

     

    Here is the first few lines of my build:

    ~/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03$ make O=am37x CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm omap3_evm
    awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }' boards.cfg > /home/schuyler/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/am37x/.boards.depend
    Configuring for omap3_evm board...
    make
    make[1]: Entering directory `/home/schuyler/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03'
    Generating /home/schuyler/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/am37x/include/autoconf.mk
    Generating /home/schuyler/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/am37x/include/autoconf.mk.dep
    make[1]: Leaving directory `/home/schuyler/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03'
    make[1]: Entering directory `/home/schuyler/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03'
    arm-arago-linux-gnueabi-gcc -DDO_DEPS_ONLY \

  • Hi,

    Thank you for suggesting to check package. And I guess that was the problem for failing make command.

    Having said so, still I am not able to install couple of packages like nfs-kernel-server, build-essential, libncurses5-dev, autoconf

    But still I ran make I see uBoot and MLO getting generated in my said directory but I am not sure if they are good. Below is end message while running my make command:

    arm-arago-linux-gnueabi-gcc  -g  -Os   -fno-common -ffixed-r8 -msoft-float   -D__KERNEL__ -ffunction-sections -fdata-sections -DCONFIG_SYS_TEXT_BASE=0x80100000 -DCONFIG_SPL_TEXT_BASE=0x40200800 -DCONFIG_SPL_BUILD -I/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/include2 -I/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/include -I/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/include -fno-builtin -ffreestanding -nostdinc -isystem /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/include -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security   -o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/lib/vsprintf.o vsprintf.c -c
    arm-arago-linux-gnueabi-ld  -r -o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/lib/libgeneric.o  /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/lib/ctype.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/lib/div64.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/lib/string.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/lib/time.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/lib/vsprintf.o
    make[3]: Leaving directory `/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/lib'
    arm-arago-linux-gnueabi-gcc -E -g  -Os   -fno-common -ffixed-r8 -msoft-float   -D__KERNEL__ -ffunction-sections -fdata-sections -DCONFIG_SYS_TEXT_BASE=0x80100000 -DCONFIG_SPL_TEXT_BASE=0x40200800 -DCONFIG_SPL_BUILD -I/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/include2 -I/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/include -I/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/include -fno-builtin -ffreestanding -nostdinc -isystem /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/include -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -include /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/include/u-boot/u-boot.lds.h -include /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/include/config.h  -ansi -D__ASSEMBLY__ -P - < /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds > /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/u-boot-spl.lds
    UNDEF_SYM=`arm-arago-linux-gnueabi-objdump -x /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/arch/arm/cpu/armv7/libarmv7.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/arch/arm/cpu/armv7/omap-common/libomap-common.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/arch/arm/cpu/armv7/omap3/libomap3.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/arch/arm/lib/libarm.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/board/ti/evm/libevm.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/common/libcommon.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/disk/libdisk.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/drivers/i2c/libi2c.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/drivers/mmc/libmmc.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/drivers/mtd/nand/libnand.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/drivers/power/libpower.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/drivers/serial/libserial.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/fs/fat/libfat.o /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/lib/libgeneric.o | sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`; cd /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/ && arm-arago-linux-gnueabi-ld  -T /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/u-boot-spl.lds --gc-sections -Bstatic -Ttext 0x40200800 $UNDEF_SYM arch/arm/cpu/armv7/start.o --start-group arch/arm/cpu/armv7/libarmv7.o arch/arm/cpu/armv7/omap-common/libomap-common.o arch/arm/cpu/armv7/omap3/libomap3.o arch/arm/lib/libarm.o board/ti/evm/libevm.o common/libcommon.o disk/libdisk.o drivers/i2c/libi2c.o drivers/mmc/libmmc.o drivers/mtd/nand/libnand.o drivers/power/libpower.o drivers/serial/libserial.o fs/fat/libfat.o lib/libgeneric.o --end-group /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/arch/arm/lib/eabi_compat.o -L /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3 -lgcc -L /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3 -lgcc -Map u-boot-spl.map -o u-boot-spl
    arm-arago-linux-gnueabi-objcopy --gap-fill=0xff -O binary /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/u-boot-spl /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/u-boot-spl.bin
    /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/tools/mkimage -T omapimage \
            -a 0x40200800 -d /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/spl/u-boot-spl.bin /home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/test/MLO
    Section CHSETTINGS offset 40 length c
    CHSETTINGS (c0c0c0c1) valid:0 version:1 reserved:0 flags:0
    GP Header: Size 9388 LoadAddr 40200800
    make[2]: Leaving directory `/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03/spl'
    make[1]: Leaving directory `/home/bhuser/ti-sdk-am37x-evm-05.03.02.00/board-support/u-boot-2011.09-psp04.06.00.03'

    Though I dont see any ERROR message, I hope it is good. Can you please confirm if binary generated are good...

    Thanks a lot once again....

  • By good I mean to say does log message looks good????

    i will putting newly generated MLO and uBoot on SD card and will be putting on my eval board.

    Thank You,

  • Hello Schuyler Patton,

    This post is the closest to my problem.  I know that the 2 commands...

    make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH-arm distclean AND

    make O=am37x CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm omap3_evm do not work for me.

    At first it was because the PATH environment variable was not getting set right.  Adding the path for /home/user/ti-sdk-beagleboard/board-support/bin go me to start the make command but it immediately fails because it says the object-directory does not exists (even though I am using a full path name).  Once I get past this problem of running this make command I can continue with the MLO and uboot.bin.

    Are you available to help me on this?  Maybe my directory structure for the ti-sdk- beagleboard is incorrect.  The only pathname I added to the PATH variable ius the one mentioned above.  Are there other SDK paths that I need to add to the PATH variable?

    Thanks,

    David