I have written one driver for one device in Linux. How can I create (using gcc) a .ko file so that I can insert it into the kernel?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
||||
|
|
|
Create a
Assuming your module's source is in |
|||||||||||
|
|
Short answer: you can't. A .ko file is more than just a compiled version of your driver source. The kernel build system includes some extra information for instance (compiler version, module dependencies, ...). You can probably dig through the kernel build system to find all required operations, but you shouldn't. It will almost certainly break with the next kernel release, or the one after that. You should use the makefile ephemient supplied. |
|||
|
|