[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [why is kernel recompilation necessary?]

On 28-Jul-2000 Krzys Majewski wrote:
> Yes but what I'm wondering is not why linux users recompile their kernels,
> or why windows users can't, but how is it that windows users get away with
> not having to? The closest answer I got is that windows kernels have 
> a bunch of drivers already compiled in, and any additional drivers
> compiled as modules. What I'm still not clear on is whether either 
> windows or linux kernels (or both) need to have some sort of hooks 
> enabling them to expect whatever modules at runtime, or not. 
> For example, if I build a new device and write a driver for it,
> can I add support for this device to both windows and linux without
> having to modify either kernel? -chris

First, I don't think you can compare the windows and linux kernels. Linux was
designed as a monolithic unix kernel, while the windows kernel...uhm...I really
don't know if it was designed at all... Second, what do you mean by modifying
the windows kernel ? Disassembling and binary patching ?
More seriously, the linux kernel has a module interface defined in module.h.
Shortly, in your code you have to use init_module, cleanup_module,
module_register_chrdev etc. As long as this interface doesn't change, you can
compile your module separately and use it with any kernel version (unless you
use something in your code that's specific to a certain version).
If you want to know more, I suggest to read the docs dealing with the linux
kernel at linuxdoc.org.

Reply to: