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.

Why does the make have error?

Other Parts Discussed in Thread: AM3358

Hi,

There is an on-line video tutorial of Sitara SDK 6, which talked about uboot build with CCS 5. Now I install Sitara SDK 8 on a Ubuntu PC. I try to build uboot after selecting the appropriate the new toolchain in the path in Make Target, CCS 6. It has error:

22:02:15 **** Build of configuration Default for project u-boot-2014.07-g7e537bf ****
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- am335x_evm_config
/bin/sh: 1: uname: not found
/bin/sh: 1: sed: not found
/bin/sh: 1: sed: not found
/bin/sh: 1: uname: not found
/home/ruwan2/ti-sdk-am335x-evm-08.00.00.00/board-support/u-boot-2014.07-g7e537bf/mkconfig: 1: /home/ruwan2/ti-sdk-am335x-evm-08.00.00.00/board-support/u-boot-2014.07-g7e537bf/mkconfig: sed: not found
make: *** [am335x_evm_config] Error 127

In the Makefile, I suspect the following lines generates the error:

HOSTARCH := $(shell uname -m | \
    sed -e s/i.86/x86/ \
        -e s/sun4u/sparc64/ \
        -e s/arm.*/arm/ \
        -e s/sa110/arm/ \
        -e s/ppc64/powerpc/ \
        -e s/ppc/powerpc/ \
        -e s/macppc/powerpc/\
        -e s/sh.*/sh/)

HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
        sed -e 's/\(cygwin\).*/cygwin/')

Especailly the last two lines, have all the command names in the error.

I do not remember there are some environment variables needed for these commands. What should I do to remove the error?

Thanks,

  • Excuse me. I should add the following error message, which is in the problem window:

    Description Resource Path Location Type
    make: *** [am335x_evm_config] Error 127 u-boot-2014.07-g7e537bf C/C++ Problem

    I don't know what the Error 127 means here.

    Thanks,
  • Hello Robert,

    Exit code 127 in bash means "command not found". It might be caused by PATH mismatch or by not installed software/tool. According your log "uname" and "sed" commands are not found in your system. In standart Ubuntu they must be located in the /bin directory. You can first check where these tools are located then verify if their paths are included in your $PATH variable.

    Best regards,
    Kemal
  • Thanks for your reply. I am still new to Linux. I have check /bin folder. Both sed and uname are there. But the following error message has the extra /sh after /bin.

    /bin/sh: 1: uname: not found
    /bin/sh: 1: sed: not found
    /bin/sh: 1: sed: not found
    /bin/sh: 1: uname: not found

    'sh' means shell here? How to make the original command, which is in the Makefile, to know these commands are in /bin? It looks like something './' in the command line can do, but I don't know how to deal with it for the Makefile. 

  • Could you post the output of command:

    $ ls -al /bin/sh

  • Thanks.

    It has the following:

    Aspire-M5100:~$ ls -al /bin/sh
    lrwxrwxrwx 1 root root 4 Mar 4 21:03 /bin/sh -> dash
  • After I search on the forum, I feel that my installation is not correct because it never generates uEnv.txt yet. After I manually create a uEnv.txt, AM3358 Starter kit can load kernel from PC host and mount NFS, it mounts to the host but there is a blank window pops up. One post said that SD-card mounting path is changed from media/.... to media/[user name]..... I do not find which script has such lines to be modified.

    Thanks,
  • Hello Robert,

    There are different types of shells with different features sh, bash, dash, csh etc. The first line of "mkconfigure" file defines which one to be used during the execution of the configure script. In your case it's '/bin/sh', by itself 'sh' points to 'dash' which seems is not configured properly in your system so you can gently point it to bash which is sh-compatible. Then check if this change solves your problem.

    sudo ln -sf /bin/bash /bin/sh


    Best regards,

    Kemal

  • Excuse me, I may not say it clearly in previous posts. The problem exists when I ran Make Target in CCS 6 IDE.

    After I run the script:

    sudo ln -sf /bin/bash /bin/sh
    The Make Target:
    am335x_evm_config
    still has the errors:
    project u-boot-2014.07-g7e537bf ****
    make all
    /bin/sh: uname: command not found
    /bin/sh: sed: command not found
    /bin/sh: uname: command not found
    /bin/sh: sed: command not found
    Makefile:487: *** "System not configured - see README".  Stop.

  • Sorry, It's my mistake. I've missed this detail in the description. So if you use CCS IDE then the issue must be caused of the PATH variable within the CCS . Go to CCS and check the PATH variable for syntax errors, right click on your project > Properties > C/C++ Build > Environment > PATH you may accidentally throw a semicolon ; instead of colon : or something.