Solved

automatic loading of mymodule

Posted on 2003-11-07
5
178 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 200 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now