LKM - module parameters

Posted in How To's by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on December 27th, 2009

Welcome to the tutorial guide. The guide will provide a user with guidance and instructions on module parameters.

It is useful to compare parameters that get passed to LKMs and parameters that get passed to modules that are bound into the base kernel, especially since modules often can be run either way.

Parameters can be passed to an LKM by specifying following io=0×300 on the insmod command. If a module is bound into the base kernel, a user can pass parameters to it via the kernel boot parameters. There are ways to specify kernel boot parameters.
-A common way to specify kernel boot parameters is at a lilo boot prompt.
-another way is with an append statement in the lilo configuration file.

The kernel initialises an LKM at the time a user loads it. It initialises a bound-in module at boot time. As there is only one string of kernel boot parameters, a user will need some way within that string to identify which parameters go to which modules. The rule for this is that if there is a module named abc, then a kernel boot parameter named abc is for that module. The value of a kernel boot parameter is an arbitrary string that makes sense only to the module.

Sometimes a user will note that LKMs’ parameter is its own name. for example, if a user loads the Mitsumi CDROM driver with a command like

insmod mcd mcd=0×340

It will have the parameter named mcd instead of, io, but this is done for consistency with the case where a user binds mcd into the base kernel, in which case the user would select the I/O port address with the characters mcd=0×340 in the kernel boot parameters.

If you followed advise and guidance as provided in this tutorial guide then you would have learnt about module parameters.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Leave a Comment