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.

OMAP-L137 Linux Kernel Build Problem

Other Parts Discussed in Thread: OMAP-L137

I'm working through the instructions on the wiki for Building the OMAP-L137 Linux Kernel: http://processors.wiki.ti.com/index.php/Building_the_OMAP-L137_Linux_Kernel

I'm experiencing a problem at the line where I execute the following:

host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- distclean

The command seems to process for a couple of seconds and then displays the following:

/bin/sh: gcc: command not found

Any insight into this problem?

Thanks

  • What host Linux distribution are you using? I know in some you need to install some build tools for the host if they are not included with the distribution by default, with Ubuntu I believe it is build-essentials or something similar. You could verify what you have on your host by simply trying to run the command gcc, if you get the same error (command not found) than the likely solution will be to install a tools package for your host.

    Another place you may need to check is your PATH variable, if you run echo $PATH you can see what your PATH looks like, this needs to contain the directories which contain your tools, ultimately the ARM build tools if you intend to cross compile the kernel for OMAP-L137.

    If this does not help, please post a bit more of your build log for further analysis on the problem.

  • I think you'll have more luck following the instructions on the GSG: Building Software Components for OMAP-L1/AM1x wiki.  Specifically, the Preparing your Environment section, which describes how to set your path (also shown below).  Once you've set your path, I believe the make command should run properly for you.

    wiki said:
    1. If you have not already done so, install the CodeSourcery tools on your Linux host. For additional documentation on installing the CodeSourcery tools, please visit the CodeSourcery website.
    2. If U-Boot is not built yet, build U-Boot first, as building Linux Kernel requires mkimage utility, which gets built along with U-Boot. Refer to Rebuilding U-Boot for steps to build U-Boot. Once built, mkimage will be present under the tools folder of U-Boot source (/home/<user>/OMAP_L138_arm_x_xx_xx_xx/DaVinci-PSP-SDK-xx.xx.xx.xx/src/u-boot/uboot-xx.xx.xx.xx/tools). Ensure that this path is added to the $PATH variable by adding the following
      host$ export PATH=home/<user>/OMAP_L138_arm_x_xx_xx_xx/DaVinci-PSP-SDK-xx.xx.xx.xx/src/u-boot/uboot-xx.xx.xx.xx/tools:$PATH

      to the ~/.bashrc file. You can then source the ~/.bashrc file with the following command

      host$ source ~/.bashrc

  • Hi Bernie,

    Thanks for your reply.  I installed Fedora 11 under VMware player. 

    I've been following the Getting Started Guide for the L137 http://processors.wiki.ti.com/index.php/Getting_Started_Guide_for_OMAP-L137

    I figured since I successfully built and executed the Hello World program (earlier instructions) that I had a build environment that would carry me through the rest of the Getting Started Guide.  Are you indicating that building the kernel differs from building an application so that in addition to the MontaVista tools I will need to install the GNU tools for Fedora?

    Here is the output from the $PATH command:

    /opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin:/opt/mv_pro_5.0/montavista/pro/bin/;/opt/mv_pro_5.0/montavista/common/bin:/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin:/opt/mv_pro_5.0/montavista/pro/bin/;/opt/mv_pro_5.0/montavista/common/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/temiller/bin

    I don't see a reference to gcc in the path.  I do see where there is a MontaVista gcc (arm_v5t_le-gcc) in the path @ /opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin.  I will verify if the GNU gcc is installed and update the path accordingly.

    Regarding the build log, does this mean there is a file that gives more information  than what was displayed to the console during the build?

     

    Best Regards,

    Tim

     

     

     

  •  

    David Meixner said:

    I think you'll have more luck following the instructions on the GSG: Building Software Components for OMAP-L1/AM1x wiki.  Specifically, the Preparing your Environment section, which describes how to set your path (also shown below).  Once you've set your path, I believe the make command should run properly for you.

    1. If you have not already done so, install the CodeSourcery tools on your Linux host. For additional documentation on installing the CodeSourcery tools, please visit the CodeSourcery website.
    2. If U-Boot is not built yet, build U-Boot first, as building Linux Kernel requires mkimage utility, which gets built along with U-Boot. Refer to Rebuilding U-Boot for steps to build U-Boot. Once built, mkimage will be present under the tools folder of U-Boot source (/home/<user>/OMAP_L138_arm_x_xx_xx_xx/DaVinci-PSP-SDK-xx.xx.xx.xx/src/u-boot/uboot-xx.xx.xx.xx/tools). Ensure that this path is added to the $PATH variable by adding the following
      host$ export PATH=home/<user>/OMAP_L138_arm_x_xx_xx_xx/DaVinci-PSP-SDK-xx.xx.xx.xx/src/u-boot/uboot-xx.xx.xx.xx/tools:$PATH

      to the ~/.bashrc file. You can then source the ~/.bashrc file with the following command

      host$ source ~/.bashrc

    [/quote]

     

    Hi David,


    I've been following the Getting Started Guide for the L137: http://processors.wiki.ti.com/index.php/Getting_Started_Guide_for_OMAP-L137

    It is kind of confusing that there are different instructions on the wiki for this.   I don't have the CodeSourcery tools yet.  I was planning on using the MontaVista tools that were provided with the Pro 5.0 Demonstration Version until I worked through the getting started and then was going to evaluate whether I wanted to go with CodeSourcery or DevRocket.   I'll be sure to take a look at this and give it a try as soon as possible.

    Thanks,

    Tim

  • TimM said:
    Are you indicating that building the kernel differs from building an application so that in addition to the MontaVista tools I will need to install the GNU tools for Fedora?

    That is my impression, I have only tried this out on the older Red Hat Enterprise Linux v4 and Ubuntu, so I am not sure about Fedora (though I would have expected it to be like RHEL). The kernel build has requirements outside of just the target ARM compiler, host build tools are one (though they are normally in place by default), I believe you also need ncurses to use menuconfig, and there may be others. In general if you see an error saying it cannot find a particular command, you are probably missing something.

    TimM said:
    Regarding the build log, does this mean there is a file that gives more information  than what was displayed to the console during the build?

    There may be one I am not aware of, but by build log I meant the output of your console during the build, seeing more of the build output helps to put context into errors, and may lead to better suggestions, though in this case I suspect you simply need to install host build tools.

  • Bernie Thompson said:

    Are you indicating that building the kernel differs from building an application so that in addition to the MontaVista tools I will need to install the GNU tools for Fedora?

    That is my impression, I have only tried this out on the older Red Hat Enterprise Linux v4 and Ubuntu, so I am not sure about Fedora (though I would have expected it to be like RHEL). The kernel build has requirements outside of just the target ARM compiler, host build tools are one (though they are normally in place by default), I believe you also need ncurses to use menuconfig, and there may be others. In general if you see an error saying it cannot find a particular command, you are probably missing something.

    TimM said:
    Regarding the build log, does this mean there is a file that gives more information  than what was displayed to the console during the build?

    There may be one I am not aware of, but by build log I meant the output of your console during the build, seeing more of the build output helps to put context into errors, and may lead to better suggestions, though in this case I suspect you simply need to install host build tools.

    [/quote]

     

    Hi Bernie,

     

    I installed gcc and was able to get past the previous error.  I'm now at the point where I'm running the following command:

    make ARCH=arm CROSS_COMPILE=arm_v5t_le- menuconfig

    I'm getting the following error output:

    ************************************************************************
    In file included from scripts/kconfig/lxdialog/checklist.c:24:
    scripts/kconfig/lxdialog/dialog.h:31:20 error: curses.h: No such file or directory

    **********************************************************************

    I then get a long list of errors that I assume is due to not being able to find curses.h

    Is there some other configuration step I missed?  Any insight is greatly appreciated.

    Thanks

  • TimM said:

    I'm getting the following error output:

    ************************************************************************
    In file included from scripts/kconfig/lxdialog/checklist.c:24:
    scripts/kconfig/lxdialog/dialog.h:31:20 error: curses.h: No such file or directory

    **********************************************************************

     

    You just need to install the curses library.  If you're running Fedora, I believe the command is:

    code said:
    # yum install ncurses-devel ncurses

  • TimM said:

    Hi Bernie,

     

    I installed gcc and was able to get past the previous error.  I'm now at the point where I'm running the following command:

    make ARCH=arm CROSS_COMPILE=arm_v5t_le- menuconfig

    I'm getting the following error output:

    ************************************************************************
    In file included from scripts/kconfig/lxdialog/checklist.c:24:
    scripts/kconfig/lxdialog/dialog.h:31:20 error: curses.h: No such file or directory

    **********************************************************************

    I then get a long list of errors that I assume is due to not being able to find curses.h

    Is there some other configuration step I missed?  Any insight is greatly appreciated.

    Thanks

     

    I was eventually able to solve the issue described above.  This command relies upon an application named QT (by nokia)  that was not installed with my distribution of Fedora 11.  After installing QT and gcc described earlier I was able to configure, build, and boot the kernel.

     

    Tim