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
Solved

automatic loading of mymodule

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Downgrade centos 6.5 to 6.4? 7 1,052
Linux 10 111
Cloning a part of HDD MIPS Linux 16 117
bash file 10 49
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 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