RE: Load kernel module automatically

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

 





-----Original Message-----
From: kernelnewbies-bounce@nl.linux.org
[mailto:kernelnewbies-bounce@nl.linux.org]On Behalf Of Joseph A Knapka
Sent: Wednesday, June 05, 2002 3:22 PM
To: Stijn Vander Maelen
Cc: kernelnewbies@nl.linux.org
Subject: Re: Load kernel module automatically


Stijn Vander Maelen wrote:
>
> On Wed, 5 Jun 2002, Joseph A Knapka wrote:
>
> > Eric Kristopher Sandall wrote:
> > >
> > > On Tue, 4 Jun 2002, Michael Zhu wrote:
> > >
> > > > Hi, I built a kernel module. I can load it into the
> > > > kernle using insmod command. But each time when I
> > > > reboot my computer I couldn't find it any more. I mean
> > > > I need to use the insmod to load the module each time
> > > > I reboot the computer. How can I modify the
> > > > configuration so that the Linux OS can load my module
> > > > automatically during reboot? I need to copy my module
> > > > to the following directory?
> > > >   /lib/modules/2.4.7-10/
> > >
> > > You don't need to do this, actually, you should _not_ do this.
> >
> > Forgive me, but how else, without copying the module.o to
> > /lib/modules/<version>/... and doing "depmod module.o",
> > is the kernel able to find the module in order to load it?
> > Is not /lib/modules/<version> the standard place to install
> > module binaries?
>
> indeed, /lib/modules/<version> is the standard place for all your modules.
> you don't have to put them there yourselve because there are scripts in
> the top makefile of your kernel that do it.  my standard command is:
> $ make dep && make modules && make modules_install && make bzImage
>
> afterwards you can do:
> $ depmod -va
> to make the modules.dep file and warn for any unresolved symbols in your
> modules.
>
> when everything is finished you can modprobe your modules

Right. I'm just saying that if you've written your own
module, it makes more sense to do the "cp mymodule.o
/lib/modules/$VERSION ; depmod -a" dance, than to
try to keep track of the locations of modules scattered
all about the filesystem. My post was addressed
to the "you should _not_ do this" assertion by Mr
Sandall.

Cheers,

-- Joe
   "Thanks to Microsoft, I am now blind in both eyes. They have
    rolled back in my head so many times this week that they
    are apparently stuck there now."
      - Jonathan Rickman, regarding M$ anti-open-source PR.
--

Still the question is:
> > > > How can I modify the
> > > > configuration so that the Linux OS can load my module
> > > > automatically during reboot?

I may be wrong with this but try adding your module to the
/etc/modules.conf file and see if it works...

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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