Results 1 to 2 of 2
Completely new to open source development, so please excuse the ignorance. I wrote a kernel-space API that is used by other kernel-space software, and I'm just trying to figure out ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-05-2012 #1
- Join Date
- Aug 2012
Kernel module process
Completely new to open source development, so please excuse the ignorance.
I wrote a kernel-space API that is used by other kernel-space software, and I'm just trying to figure out the deployment logistics.
I intend to submit it to the appropriate maintainer in hopes of getting it into the kernel. Do I submit it as a module, or not? (It does nothing on its own and must be called explicitly by other software.) If it is eventually accepted into the kernel, are the header files then added placed in the <kernel>/linux/include directory, where they can be #include'd by other software? What happens to the .c files? Where do those live?
EDIT: I've done some research and talked to some people and have a more specific question:
From what I've read and heard, submitting my code as a module is the way to go. But now I'm having a problem calling my code. There's an existing device driver that calls functions from my API, so in the driver there's a #include <linux/mycode.h>. I then built and loaded my module and placed the mycode.h file in the <kernel>/include/linux directory. But when I try to build the driver module, I get an error that says <linux/mycode.h> is an invalid path.
My impression was that when a module is loaded, everything from the mycode.c file is loaded into the kernel and that a driver could call that code as long as I #include the mycode.h file in that driver. But clearly I'm missing something.
Last edited by SuperSpry; 09-06-2012 at 05:45 AM. Reason: Added additional information and revised my question
- 09-06-2012 #2
- Join Date
- Aug 2012
Actually, when I include <linux/mycode.h> in the driver and try to build it, I get warnings saying that the functions in my API are undefined. So the driver knows about them but can't see the implementation of them (the code in mycode.c) I guess. Why is that?