[maemo-developers] how to load custom kernel module at bootup?

From: Graham Cobb g+770 at cobb.uk.net
Date: Tue Jun 30 16:49:26 EEST 2009
On Tuesday 30 June 2009 14:06:04 Mandeep Sandhu wrote:
> Ok guys. Here's what I plan to do.

I assume you are talking about doing this within an installable package.  I am 
sure Jeremiah can help with much more guidance about handling init scripts in 
packages but a few thoughts come to mind from when I was doing something 
similar for Xsisusb...

> * Create a script usbetherup in /etc/init.d, which does the require
> unloading of file_storage module and loading the g_ether one.

I suggest adapting the skeleton init.d.ex and supporting a "stop" command to 
restore the original module as well as "start" to load your new module.

> * Create a link S99usbetherup in /etc/rc2.d

Do this with update-rc.d.  Better still, use dh_installinit when building your 
package and it will handle this automatically for you.

> Is this enough? Do I need a K99.... counterpart as well?

update-rc.d will handle this.

Graham
More information about the maemo-developers mailing list