Find the answer to your Linux question:
Results 1 to 3 of 3
Hello There I'm writing simple driver (in order to learn writing device drivers). Everything worked well until I added another source file to the driver. When I build it, I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Posts
    9

    Question Creating driver from few source files


    Hello There

    I'm writing simple driver (in order to learn writing device drivers). Everything worked well until I added another source file to the driver.
    When I build it, I get no compilation or linking errors and insmod works fine as well, but the driver doesn't work (I can't see its printings in dmesg and its file in /proc doesn't exist as well). I can rmmod the driver as well.
    Does anyone familiar with this kind of problem?

    Thanks,
    Tal

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,397
    Basic debugging process:

    1. Stuff worked.
    2. Something changed.
    3. Stuff doesn't work.

    Questions:

    1. What did #2 change?
    2. What is it doing?
    3. Have you instrumented the code with printk statements to monitor program flow?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Sep 2010
    Posts
    9
    Quote Originally Posted by Rubberman View Post
    Basic debugging process:

    1. Stuff worked.
    2. Something changed.
    3. Stuff doesn't work.

    Questions:

    1. What did #2 change?
    2. What is it doing?
    3. Have you instrumented the code with printk statements to monitor program flow?
    Hi Rubberman

    The only thing that I changed, was adding a new C file to the list of driver modules. Currently the new C file is empty except from license decleration.
    Instrumenting the code with printk doesn't help. I added a printk at the begining of the module init function, but nothing is printed to kernel logs...

    Tal

Posting Permissions

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