Solved

automatic loading of mymodule

Posted on 2003-11-07
5
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

724 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