Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

automatic loading of mymodule

Posted on 2003-11-07
5
Medium Priority
?
187 Views
Last Modified: 2010-04-21
Hi,

I have written a simple driver for a custom device, lets call it abc.o. I use "insmod abc.o" to load the driver module. However i would like to load the driver automatically on bootup.

Can anyone please help me with getting this done on linux.

cheers!
-Jinu
0
Comment
Question by:jinumjoy
  • 3
5 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 600 total points
ID: 9700838
If you are sure :::
add a entry in /etc/inittab

id:runlevel:once:insmod abc.o

man 5 inittab
man init
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9700861
alternatively, you make a one line script containing a single line

insmod abc.o

make it executable

add a symbolic link for it in rcn.d directory where n is the runlevel
0
 

Author Comment

by:jinumjoy
ID: 9700878
will it work over any flavour of linux?
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9700896
I guess so... I am not sure though
0
 
LVL 5

Expert Comment

by:g0rath
ID: 9701188
any flavor of linux will use insmod and inittab since these are very standard tools. What is relative is how they are laid out for the /etc/ paths.

Redhat uses a symlink method as does many others
Slackware is different, you just add a line to the rc.modules file

and there may be others that use a slightly different method for automatically installing bootable apps

The only worry you may have is what kernel version you used to compile your device driver. If you use GNU automake/autoconf it may aid you in building a package that will recompile for each kernel that you will support for your device driver.

Happy hunting.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question