diode lirc-logo
 


How to link LIRC statically into your Linux Kernel



 

Someone on the Mailinglist had the wish to link the LIRC serial driver statically into his kernel. This is a good idea to save memory on small [embedded] systems.

Get the modified serial driver and the patched kernel files here:

Here some general Tips:

  1. You have to fix the driver to work as non-module driver. This relative simple:
    • find the places with MOD_IN_USE, MOD_DEC_USE_COUNT, MOD_INC_USE_COUNT and encapsulate them with a #ifdef MODULE ... #endif
    • rename the init_module to lirc_init, this is the function, which will be called from inside the kernel. cleanup_module is 'useless' now.
    • REMEMBER! some functions use the MOD_IN_USE macro to check if the device is opened, in this case you have to add an extra variable, which will be used instead
    • look at the modified serial driver in lirc_static package for more information
  2. Now you have to edit 2 Kernelfiles the Makefile and mem.c in the drivers/char Directory inside your Kernelsource. Have a look at the INSTALL File for more Details.

[karsten, 09-Jul-1999]

 

 
[LIRC Homepage]