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.

Kernel Modules building

Hi, all,

i have OMAPL 137 EVM . I want to build the GPIO example(kernel module) , provided in Linux Support Package_02_20_00_07(gpio_test), and i have errors at building process  .

I use commands, which notified in readme.txt file, here is a dump:

$host # cd /ti/projects/gpio

$host:/ti/projects/gpio# make -C /ti/LinuxVersions/lsp/ti-davinci/linux-2.6.18_pro500  M='pwd' ARCH=arm CROSS_COMPILE=arm_v5t_le-

make: Entering directory `/ti/LinuxVersions/lsp/ti-davinci/linux-2.6.18_pro500'
scripts/Makefile.build:17: /ti/LinuxVersions/lsp/ti-davinci/linux-2.6.18_pro500/pwd/Makefile: No such file or directory

make[1]: *** No rule to make target `/ti/LinuxVersions/lsp/ti-davinci/linux-2.6.18_pro500/pwd/Makefile'.  Stop.

make: *** [_module_pwd] Error 2

make: Leaving directory `/ti/LinuxVersions/lsp/ti-davinci/linux-2.6.18_pro500'

$host:/ti/projects/gpio #


The  "pwd" subdirectory is empty. I not found solution in this forum,please, any suggestions...

Thanks&Regards. 

  • I'm not a Linux expert, but it seems like the value in the "M" option is looking for the Makefile in the GPIO example.

    Would it be possible to replace the 'pwd' in your command "make -C /ti/LinuxVersions/lsp/ti-davinci/linux-2.6.18_pro500  M='pwd' ARCH=arm CROSS_COMPILE=arm_v5t_le-" with the GPIO example working directory? 

    Since this is a question about Linux drivers, you can probably get better results by posting to the Embedded Software forum: http://e2e.ti.com/support/embedded/default.aspx

    --Christina

  • Christina,

    thank you very much for your suggestion.

    I have trying to change the ` symbol to ' symbol in  'pwd' command string and it works!

    Probably, this strings  has different interpretation by "Kbuild". Thank you very much.

    Thanks&Regards.

     

     

  • Hi..

    I am trying to compile kernel module for my da850 based evm.

    I have written a simple 'hello world kernel module' and cross-compiled it with arm-none-linux-gnueabi-
    Following is what i get on the terminal: 

    [linux-devkit]:/usr/local/practice> make
    make -C /usr/local/linux_evm_1.0 ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- M=/usr/local/practice modules
    make[1]: Entering directory `/usr/local/linux_evm_1.0'
    CC [M] /usr/local/practice/test.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC /usr/local/practice/test.mod.o
    LD [M] /usr/local/practice/test.ko
    make[1]: Leaving directory `/usr/local/linux_evm_1.0'

    [linux-devkit]:/usr/local/practice> ls
    hello.c Makefile modules.order Module.symvers test.c test.ko test.mod.c test.mod.o test.o
    Now after this when i do insmod test.ko, I get the following error:
     insmod: error inserting 'test.ko': -1 Invalid module format

    Please guide me a way to get rid of this....
  • Hi,

    please check the "arm-none-linux-gnueabi-". Is this variable points to compiler, appropriated to the needed platform(da850)?

  • Thanks Alexey, for the reply . The arm-none-linux-gnueabi- is working fine for da850.

    I sorted out the issue, actually the insmod command should be typed in the "root@evm-shell:" , but i was doing this on my normal command terminal.

    This works now, I am able to cross-compile a hello world kernel module. 

    Best Regards
    Aditya