Find the answer to your Linux question:
Results 1 to 3 of 3
Hi. I'm starting out in writing device drivers. Let's say I have a simple source code named test.c and the latest linux kernel source code, where do I put test.c ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    12

    Hello World device driver kernel compile


    Hi. I'm starting out in writing device drivers. Let's say I have a simple source code named test.c and the latest linux kernel source code, where do I put test.c and where do I put the Makefile with the obj-m: test.o thing? Should I make a new folder named "tests" from the root directory?

    Thanks in advance.

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Is "test" a kernel module or is it going to be statically included in the kernel?
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Jul 2008
    Posts
    12
    Quote Originally Posted by GNU-Fan View Post
    Is "test" a kernel module or is it going to be statically included in the kernel?
    .ko file.

    Nevermind. I got it already. I just need to compile it against a kernel tree regardless of its position. I ran it using make -C [kernel source] -M=`pwd` modules

  4. $spacer_open
    $spacer_close

Posting Permissions

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