Adding parameters to module loading

It is sometimes required that you have to load a module with explicit commandline parameters. One example that comes to mind are the ALSA modules -- sometimes sound does not work on certain hardware even though the correct kernel module has loaded. So, you do some research on the Internet and find that it has to be loaded with certain parameters.

/etc/MODULESCONFIG is a user-editable file that is managed by the BootManager, the latter being a GUI application. You can either edit MODULESCONFIG directly or use the GUI.
MODULESCONFIG has two variables, SKIPLIST and ADDLIST, that are relevant here.

It is possible to edit /etc/modprobe.conf to tell the 'modprobe' executable to load a module with certain parameters, however the syntactical requirements may be too challenging for many. I aim to provide simple GUI tools for all user requirements, so I have extended the BootManager to cater for this need also.

Well, even editing the /etc/MODULESCONFIG file directly is very easy. Let's say that we want the 'mmc_block.ko' module to be loaded with parameter 'major=179'. Just edit MODULESCONFIG like this:

SKIPLIST=' someothermodule someothermodule mmc_block '
ADDLIST=' someothermodule someothermodule mmc_block:major=179 '


The SKIPLIST will prevent the kernel from automatically loading the module at bootup (without any params) and the ADDLIST (which is read in /etc/rc.d/rc.modules2 at bootup) will load the module with the params. Note the ':' which represents a space, as the ADDLIST uses space characters as module delimiters.

I have added the extra feature of adding module parameters to the BootManager GUI application (/usr/sbin/bootmanager), found in the System menu. So that makes it even easier.

Personal note
I have a backlog of work, that has been building up recently. There's a heap of emails and pm's not yet answered, lots of things on my to-do list, and quite a collection of newly-acquired hardware that is awaiting testing. I am introspective enough to recognise the symptoms in myself, when I start to get a bit too impatient when replying to dumb posts. So I'm going to be a bit more offline for awhile, working on Puppy still of course, but not so involved on the forum etc -- that forum has up to 150 posts per day, and I attempt to read a majority of them. Don't be offended if you recently sent me an email or pm and I haven't responded -- I might quickly scan through them soon and only respond to a few -- as I say, don't be offended, there's nothing personal, and if you think that you had something important to say, try again later. Note, I do get lots of emails and pm's asking the kind of questions that should really be directed to the forum. One guy asked if he could come and help me put up my wind generator -- no mate, I'm a quasi-hermit, like being on my own mostly.

Posted on 17 Jun 2008, 11:46


Comments:

Posted on 17 Jun 2008, 12:06 by Ted Dog
LZMA
I learned to be nice and keep repeating myself, repeating myself, until I am heard. And dropping hints LZMA to remind LZMA the key thing LZMA I am striving to LZMA get added LZMA to puppy distro. I put it in the header so you can safely skip it.
For a quasi-hermit, we sure know a lot about you. Your travels, pets, family hopes and dreams. That's not very hermit-like.
Oh I just ordered my own wind generator/solar system, does the mate travel?

Oh the multi-posts are a bug on your end. I'm glad others have been repeating their messages.



Posted on 17 Jun 2008, 12:32 by BarryK
Re: LZMA
Ted Dog,
Make it easy for me, what are the most relevant links? There is a forum thread isn't there, with recent discussion on this? And I think you found a site with a patch for compressing the initrd and/or kernel.

How come I never get double-posts?

Heh heh, I did add the "quasi" qualifier
Besides, the personal stuff I post to the blog is only the tip of the iceberg.


Posted on 17 Jun 2008, 18:33 by tempestuous
LZMA
LZMA on Developer News Blog -
http://www.puppylinux.com/blog/?viewDetailed=00105

LZMA on forum -
http://www.murga-linux.com/puppy/viewtopic.php?t=29343

LZMA kernel patch -
http://www.linuxfromscratch.org/patches/downloads/linux/linux-2.6-lzma-1.patch


Posted on 17 Jun 2008, 18:34 by tempestuous
firmware fix
Another fix - there is a typographical error in the firmware installation script - /lib/modules/firmware.dep.2.6.25.4 -
"rt61pc.ko" should be "rt61pci.ko"
This is preventing firmware for the rt61pci module from loading.

And what's the situation with D-Bus? The bluetooth utilities require it, and I think XFCE requires it.


Posted on 17 Jun 2008, 20:48 by zygo
kernel boot parameters
How about kernel boot parameters (eg hda=none) do they need a specially compiled Puppy?


Posted on 17 Jun 2008, 24:06 by playdayz
Be Kind to Yourself
Be kind to yourself BarryK. I plan to watch Puppy for years, so please work at a sustainable pace ;-) thanks, larry


Posted on 18 Jun 2008, 6:14 by JustGreg
Minor Typo
In your blog post on adding parameters to module loading, there is a minor typo. The file MODULESCONFIG is located in the directory /etc/rc.d/ and not just in /etc/. I need to re-do my post on the 2goPC web camera to use the process that you recommend for adding modules at startup. In trying the new way, I noticed the difference in the location. As playdayz said, be kind to yourself. There is always more stuff to be done then time!

Enjoy life, JustGreg
Live Well, Laugh Often, Love Much


Posted on 18 Jun 2008, 13:24 by BarryK
Re: typos
tempestous,
thanks I fixed it.

JustGreg,
yes, but note that adding module parameters is not supported until 4.1alpha3 is released.