RE: Help - how to let a module load another module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks so much for the information and sorry for not making myself clear.
 
The details are like this:
 
- modA.o needs to be loaded first and it will do some
  work after been loaded.  After the work is done,
- modB.o needs to be loaded.
 
Is there a system call, something like "load_another_lkm"?  If there is one, then we can call it from modA after modA completes its works.
 
Thanks,
 
 
T.

"Curran, Dominic" <dcurran@ti.com> wrote:
 
I've never done this but I believe it works like this.
 
Copy your LKM's to somewhere under the tree:
   /lib/modules/<version>
 
where <version> is the current kernel version ('uname -r').
 
Then run depmod.
 
depmod should create the module dependency file. This determines interdependencies between LKM's.
The module dependency file will live here:
   /lib/modules/<version>/modules.dep
 
Then load your modules using modprobe.
 
Thus if modA.o  depends on modB.o
Then the command:
 
# modprobe modA.o
 
...should load modB.o and then modA.o
 
I'm sure someone will correct me if I'm wrong.
dom
-----Original Message-----
From: kernelnewbies-bounce@nl.linux.org [mailto:kernelnewbies-bounce@nl.linux.org] On Behalf Of l x
Sent: Friday, May 14, 2004 5:43 PM
To: kernelnewbies@nl.linux.org
Subject: Help - how to let a module load another module

Hi,
 
People usually use insmod to load a module from the command-line.  How can we let a module load another module?  Suppose we have module_a.o and module_b.o, how to code module_a, so running "insmod module_a.o" will cause module_b.o loaded.
 
Thanks,
 
 
T.
 
 


Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.


Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux