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.

Problems buliding new lunix kernel

Hi

I am having problems when i try to build a new linux kernel it comes up with the folliowing error: -

[root@localhost ti-davinci]# more make_kernel.shmake ARCH=arm CROSS_COMPILE=arm_v5te_le- davinci_dm355_evm_defconfig
make ARCH=arm CROSS_COMPILE=arm_v5te_le- checksetconfig
make ARCH=arm CROSS_COMPILE=arm_v5te_le- uImage
make ARCH=arm CROSS_COMPILE=arm_v5te_le- modules
make ARCH=arm CROSS_COMPILE=arm_v5te_le- INSTALL_MOD_PATH=/home/clare/dvsdk_1_30
_01_41/workdir/filesys modules_install
cp /home/clare/lsp/ti-davinci/arch/arm/boot/uImage /var/lib/tftpboot
chmod a+r /var/lib/tftpboot/uImage
[root@localhost ti-davinci]# make ARCH=arm CROSS_COMPILE=arm_v5te_le- uImage
  CHK     include/linux/version.h
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
  SPLIT   include/linux/autoconf.h -> include/config/*
  CC      scripts/mod/empty.o
/bin/sh: arm_v5te_le-gcc: command not found
make[2]: *** [scripts/mod/empty.o] Error 127
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2

Any one got any ideas?

thanks

  • Are you sure of your path settings? Please check the PATH variable has the complete path to the tool chain to be used.

    Can you do an echo $PATH and confirm? For eg on my machine i have installed the tool chain under /opt.

    So my PATH variable setting contains the complete path to the tool chain. Do a ls on the path and see the tool chain binary is present there or not to confirm.

    # echo $PATH
    /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/opt/montavista/pro/bin:/opt/montavista/pro/devkit/arm/v5t_le/bin/

    Thanks,

    Prathap.

  • This is my PATH :

    bash: /opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le/bin/:/opt/mv_pro_4.0.1/montavista/pro/bin:/opt/mv_pro_4.0.1/montavista/common/bin:/opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le/bin/:/opt/mv_pro_4.0.1/montavista/pro/bin:/opt/mv_pro_4.0.1/montavista/common/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/clare/bin: No such file or directory
    [clare@localhost dvsdk_1_30_01_41]$

    Thanks

  • Were you able to build the hello.c program as intructed in the Getting Started Guide (GSG)?  This step normally ensures your paths are ok for rebuilding the Linux kernel.  Looking at your path posted, it appears to be ok (except for 'bash:' at the beginning and 'No such file or directory' at the end) despite the fact that some of the path is repeated twice.  However, without being able to see if these directories actually exists in your host, it is hard to say for sure.  Being able to cimpile and run hello.c program per GSG would confirm this. 

  • Clare Ambrose said:

    Hi

    I am having problems when i try to build a new linux kernel it comes up with the folliowing error: -

    [root@localhost ti-davinci]# more make_kernel.shmake ARCH=arm CROSS_COMPILE=arm_v5te_le- davinci_dm355_evm_defconfig
    make ARCH=arm CROSS_COMPILE=arm_v5te_le- checksetconfig
    make ARCH=arm CROSS_COMPILE=arm_v5te_le- uImage
    make ARCH=arm CROSS_COMPILE=arm_v5te_le- modules
    make ARCH=arm CROSS_COMPILE=arm_v5te_le- INSTALL_MOD_PATH=/home/clare/dvsdk_1_30
    _01_41/workdir/filesys modules_install
    cp /home/clare/lsp/ti-davinci/arch/arm/boot/uImage /var/lib/tftpboot
    chmod a+r /var/lib/tftpboot/uImage

    Any one got any ideas?

    I was discussing this further with a colleage of mines and noticed that your compiler (arm_vt5e_le-) has an extra 'e' from what is normally recommended in the Getting Started Guide (arm_v5t_le-).  Is there a good reason for this, or was this simply just a typo?

  • Hi I didnt manage to sucessfully load the hello worl program it came up with an error.

    Is the extra e something that could be causing problems or does it not matter. It was just a typo

    Thanks

  • the extra e should definitely matter, the name associates the right tool-chain with your build so it is very important it is spelled correctly.

    However, even if you spelled the compiler name correctly, if you cannot get past the hello.c program, than you need to correct your path first.  The path you define in your .bashrc (per GSG) should match the path where you installed the tool-chain.

  • im new to linux can you explain how i check and change this

    thanks

  • You can check your PATH variable with 'echo $PATH' and you can change your PATH variable with 'export PATH=<what you want to set it to>'. In general you want to include $PATH; in your new PATH so you retain your old PATH values, so something like 'export PATH=$PATH;/my/new/path1;/my/new/path2'.

     

  • Normally, when you order our EVM, you can register it at www.ti.com/davinciregistration .  This will give  you access to our software update site (www.ti.com/davincisoftwareupdates ) where you can grab the latest software along with Getting Started Guide (GSG).  Using the latest software is recommended over the CDs included with EVM, although you can find similar software and GSG in the CDs as well.

    Chapter 4 of the GSG takes you thru the software installation process, including how to setup your paths and run hello.c program.  Have you gone thru the steps in GSG?  What version of the DVSDK are you using (GSG may have slight changes across DVSDK releases)?  If you can get me this info, I can point you to the proper steps in the GSG you need to double check.

  • I have the latest software from the website and have gone through the getting started guide. The version i am using is dvsdk_1_30_01_41

    Thanks

  • so all the steps in GSG are important, but the following are specifically important for building the kernel

    section 4.3.1, steps 4 and 5:  These define where you install your tool chain on the host.

    section 4.4:   this is where you set your path to match the steps above.

    if you do the above right, you should be able to build the linux kernel (and the hello program in section 4.4.1 which is used to check path is set up correctly).

  • When i try to do 4.3.4 in the gsg i come across this error

    [root@localhost filesys]# cd /home/clare/workdir/filesys*(rw,no_root_squash,no_all_squash,sync)
    bash: syntax error near unexpected token `('

    any ideas?

  • Please note that you are not supposed to 'cd' to this; you are supposed to use your favorite text editor (gedit, vi, emacs....) to add that line to your /etc/exports file

  •  Thanks this is defintaly why it didnt work :)

    Am still having problems when trying to build the linux kernal thoit comes up with this error - this again is probably something very simple which i have oerlooked

    [root@localhost ti-davinci]# cp /home/clare/workdir/lsp/ti-davinci/linux_2.6.10_mvl401/arch/arm/
    cp: missing destination file operand after `/home/clare/workdir/lsp/ti-davinci/linux_2.6.10_mvl401/arch/arm/'

     

    Thanks

  • the Linux copy command takes in 2 arguments. 

          cp [source directory]  [destination directory]

    I do not see a space to distinguish your source and destination directoies.

  •  

    Where would the space go ?

    [root@localhost ti-davinci]# cp /home/clare/workdir/lsp/ti-davinci/linux_2.6.10_mvl401/arch/arm/
    cp: missing destination file operand after `/home/clare/workdir/lsp/ti-davinci/linux_2.6.10_mvl401/arch/arm/'
    Try `cp --help' for more information.

  • You mentioned you were building the kernel, but you are using the cp command which means to copy something, so it looks like you are trying to copy that directory to nothing, so it gives you an error saying you did not specify a destination.

    Essentially you are telling it "I want you to copy /home/clare/workdir/lsp/ti-davinci/linux_2.6.10_mvl401/arch/arm/ to ???".

  • I am not sure where i am copyin it to i am just following the instructions in the gsg on page 4-14

  • I assume you are going thru section 4.5 of Getting Started Guide and are at this step

        host $ cp /home/<useracct>/workdir/lsp/ti-davinci/linux_2.6.10_mvl401/arch/arm/boot/uImage  /tftpboot

    If so, please note there is a space right before /tftpboot (the destination directory).  Also, if you got this far, does this mean you were able to run the


        host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage

    that preceeded the cp command successfully? 

     

     

  • yep managed to get this bit working

       host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage :)

    But no luck with the

        host $ cp /home/<useracct>/workdir/lsp/ti-davinci/linux_2.6.10_mvl401/arch/arm/boot/uImage  /tftpboot

    thanks

  • CROSS_COMPILE=arm_v5te_le-

    should be

    CROSS_COMPILE=arm_v5t_le-

    and you have to rebuild your LSP before making Kernel and uImage

  • clare,

    what kind of error are you seeing when you try the step

       host $ cp /home/<useracct>/workdir/lsp/ti-davinci/linux_2.6.10_mvl401/arch/arm/boot/uImage  /tftpboot

    Do both directories listed in the command above exist?

     

     

  • I suspect Juan is onto the issue with your copy to /tftpboot, I am curious what host Linux distribution you are using? Some Linux distributions do not put the directory for holding files to be served by TFTP in the same place, for example if you installed a TFTP server in Ubuntu the location is /var/lib/tftpboot and there is no /tftpboot folder.