Adding forgotten kernel module without complete recompile

Bruce Marshall bmarsh
Mon May 17 11:49:17 PDT 2004


On Sunday 13 July 2003 12:04 pm, Klaus-Peter Schrage wrote:
> Bruce Marshall wrote:
> >On Friday 11 July 2003 17:39 pm, Klaus-Peter Schrage wrote:
> >>Net Llama! wrote:
> >>>On 07/11/03 14:11, Klaus-Peter Schrage wrote:
> >>>>... the subject tells it all.
> >>>>Now the module in question wasn't really forgotten, I didn't need
> >>>>it on my last recompile, but now I do: I have a very nice new
> >>>>device, a Mambo USB Music Drive which is a mp3 player and a 128 MB
> >>>>USB storage in one, as small as a lighter. It should hotplug in
> >>>>Linux as well as it does in Windows, so I need usb-storage.o which
> >>>>I had disabled on my last full kernel compile.
> >>>>How could I get usb-storage working (on a stock 2.4.21 kernel)
> >>>>without the whole recompile story which I really don't want to go
> >>>>through?
> >>>>This should be possible, and I faintly remember to have done
> >>>>something like that before ...
> >>>>All the other necessary usb stuff is already there.
> >>>
> >>>Assuming that usb-storage doesn't make changes to the kernel
> >>> itself, i think you just need to do another kernel build, but skip
> >>> the 'make bzImage' step.
> >>
> >>I'd like to avoid that, because after the kernel compile I had added
> >>some third party modules (ALSA, NVIDIA kernel driver) which I
> >> wouldn't like to do again just to get another single standard
> >> kernel module. I think there was a trick to post compile a specific
> >> module, perhaps some tweaking of /drivers/usb/Makefile - I don't
> >> remember it. Klaus
> >
> >It would be my guess that if you have compiled a kernel with the
> > option of 'no usb-storage' then there would be no 'hook' in the
> > kernel for any USB-storage module to be called from.
> >
> >Don't think it is possible just to compile the module and have it
> > used.
>
> I gave up and took the long road, did a complete kernel recompile,
> made ALSA and Nvidia too, and I am very happy with my USB
> stick/player. It hotplugs nicely, and to load a mp3 file I just drop
> it with konqueror. But I still can't believe that it's not possible to
> compile a single specific kernel module. You can do it with foreign
> modules (cf. the ALSA driver), why shouldn't it be possible with the
> kernel's own ones? Klaus

The kernel needs to know that something exists before it can use it.  If  
a) the kernel has been told to NOT use a particular feature, or b) the 
kernel doesn't know such a module exits, then it can't possibly use the 
module.

Supposing there is a device I just invented called a Belchfire 90 
mob-ulator... and I write a module for it.  How could the kernel 
possibly use my module?  It wouldn't know when to call it...  Same thing 
goes for a new USB device that hasn't been defined to the USB modules.

If the ALSA modules can be compiled and supplied out of the blue...  then 
either they don't rely on the kernel or the kernel has been told about 
them. 



-- 
+----------------------------------------------------------------------------+
+ Bruce S. Marshall  bmarsh at bmarsh.com  Bellaire, MI         07/13/03 
12:39  +
+----------------------------------------------------------------------------+
"Marriage is a great institution, but I'm not ready for an institution 
yet."
  - Mae West.



More information about the Linux-users mailing list