[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kernel module -> non-module
Please don't send me personal mails.
>
> I was thinking about to compile the module not as a module rather
> statically into the kernel.
> (I don't want to load it with insmod rather is shall be part of vmlinuz.)
For both modules and statically linked ones, code will remain same.
you will have to put your module_init and module_exit functions like
#ifdef MODULE
module_init(my_mod_init)
module_exit(my_mod_exit)
#endif
You will have to call the module init function in one of the
initialization functions. I forgot which one is it. Somebody will be
able to do this.
>>go to the directory in which you want to put your module in linux kernel
>>source. open Config.in, and add you module's script.
>>Modify the makefile in the directory to reflect your module addition.
>>
To get a choce of module statically linked/dynamically linked, please
follow this procedure
Hth,
Om.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/