Solved

automatic loading of mymodule

Posted on 2003-11-07
5
177 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
Comment Utility
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
Comment Utility
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
Comment Utility
will it work over any flavour of linux?
0
 
LVL 45

Expert Comment

by:sunnycoder
Comment Utility
I guess so... I am not sure though
0
 
LVL 5

Expert Comment

by:g0rath
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

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…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

9 Experts available now in Live!

Get 1:1 Help Now