Find the answer to your Linux question:
Results 1 to 3 of 3
i am trying to create a character driver. i have compiled it using make command and created .ko and .o file but whn i am trying to inssert module usinf ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    1

    error in inserting the module


    i am trying to create a character driver.
    i have compiled it using make command and created .ko and .o file
    but whn i am trying to inssert module usinf insmod command . i am getting error

    insmod cannt read "memory.ko":no such file or directory.


    please help in insering this module,

    thanks

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,757
    "memory.ko":no such file or directory
    are you sure .ko file is present at specified directory?

    Try using absoulte path name -
    insmod /path/to/your_module.ko
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Just Joined! probe's Avatar
    Join Date
    Oct 2009
    Location
    Belgrade, Serbia
    Posts
    29
    Try to put this Makefile in directory where your files are,
    and type make, just put your module name instead of
    module_name.o

    obj-m += module_name.o
    all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
    clean:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •