Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing the Kernel module/driver load order @ booting

1,426 views
Skip to first unread message

acumind

unread,
Feb 20, 2009, 5:29:29 AM2/20/09
to acu...@mail.com
Hi
i am writing a driver for my mouse, "naughty_mouse.ko" as loadable
kernel module and registering interrupt handler for IRQ 12. This
driver is working fine if i unload the psmouse.ko first and then load
naughty_mouse.ko. I wants to load naughty_mouse.ko at boot time before
psmouse.ko is loaded so that all the interrupts from mouse come to my
driver first and then to psmouse.ko.

Could anyone please tell how to automatically load my naughty_mouse.ko
before psmouse.ko.
i am using kernel 2.6.28.

thanks,
- acumind

Mark Hobley

unread,
Feb 20, 2009, 7:08:02 AM2/20/09
to
acumind <acu...@gmail.com> wrote:
> Could anyone please tell how to automatically load my naughty_mouse.ko
> before psmouse.ko.

Don't you just insmod naughty_mouse.ko before psmouse.ko in the startup
scripts?

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

Chris Vine

unread,
Feb 22, 2009, 10:25:42 AM2/22/09
to

You can use the install command in modprobe.conf (or one of the other
configuration files in /etc/modprobe.d). For example, including a
file mymouse.conf in /etc/modprobe.d with the following contents will
cause a load of psmouse.ko to also install naughty_mouse.ko first:

install psmouse /sbin/modprobe naughty_mouse ; /sbin/modprobe -i psmouse

For further details, see 'man modprobe.d' which gives a similar worked
example.

Chris

0 new messages