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.

Cross Compile Linux for OMAPL138

Other Parts Discussed in Thread: OMAPL138

I am trying to cross compile Linux kernel for OMAP L138 as per the document provided by SDK for OMAP L138. My host PC is 64bit Ubuntu 12

I am facing problem fixdep: error fstat'ing depfile: scripts/basic/.fixdep.d: Invalid argument. I have attached the output when I am trying to make defconfig

[linux-devkit]:/home/jagadish/arm-linux-3.1.10/linux-3.1.10> ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- make omapl138_lcdk_defconfig
  HOSTCC  scripts/basic/fixdep
In file included from /opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/stdlib.h:955:0,
                 from scripts/basic/fixdep.c:112:
/opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/bits/stdlib.h:65:1: warning: no previous prototype for ‘ptsname_r’ [-Wmissing-prototypes]
In file included from /opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/netinet/in.h:24:0,
                 from /opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/arpa/inet.h:23,
                 from scripts/basic/fixdep.c:116:
/opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/stdint.h:153:0: warning: "__INT64_C" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
/opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/stdint.h:154:0: warning: "__UINT64_C" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
In file included from /opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/sys/socket.h:40:0,
                 from /opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/netinet/in.h:25,
                 from /opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/arpa/inet.h:23,
                 from scripts/basic/fixdep.c:116:
/opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/bits/socket.h:427:23: warning: ‘struct mmsghdr’ declared inside parameter list [enabled by default]
/opt/ti-sdk-omapl138-lcdk-01.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/bits/socket.h:427:23: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
fixdep: error fstat'ing depfile: scripts/basic/.fixdep.d: Invalid argument
make[1]: *** [scripts/basic/fixdep] Error 2
make: *** [scripts_basic] Error 2

Kindly help me.

Thanks & regards,

Jagadish Haldar

  • What are the steps followed to build the kernel ?
    Just export the toolchain and go to the Linux kernel path and do the following command to build the kernel.

    make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    make omapl138_lcdk_defconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
    make uImage ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
  • Thank you very much for your reply. I forgot to set path variable to linux tool chain. It is now working.....
  • Sounds good.
    Thanks for the update.
  • I have few confusions, kindly help me to understand that

    1. SysLink is a driver (Kernel Object) that is required to communicate processes within ARM and DSP or between ARM and DSP. IPC application on Linux side will communicate with DSP using this driver. I have downloaded Linux SDK 01.00.00 which includes syslink_2_10_03_20. I have compiled it and thus created syslink.ko. But when I am trying to load it using "insmod" command, it is not getting loaded. Some TI documents says that my sd card has already has syslink driver installed. That means if I run "lsmod" command it should show "syslink". But it is not. Now how do I know if syslink has already been installed in my SD card.

    2. I was trying to compile basic ipc_1_24_02_27 based application using arm-arago-linux-gnueabi-gcc compiler with proper target defined using preprocessor. Compilation is successful but getting linking error. My source file is syslink.c

    syslink.c:(.text+0x14): undefined reference to `Ipc_start'
    syslink.c:(.text+0x2c): undefined reference to `System_abort'
    syslink.c:(.text+0x44): undefined reference to `BIOS_start'

    Found in some documents that IPC examples could be build using "xdc" command. It is working for me too. But not sure which file needs to run from Linux. And if I my application needs native Linux APIs like read(), write() then will "xdc" command also compile them. In that case I don't need arm-arago-linux-gnueabi-gcc at all.

    Kindly rectify me if my understandings are wrong.

    Waiting for your reply.......
  • Please refer to this following TI wiki link to install the syslink modules and running examples.
    processors.wiki.ti.com/.../MCSDK_OMAPL138_User_Guide_Chapter_Exploring