Compiling a single module into a default Redhat kernel?


Results 1 to 4 of 4

Thread: Compiling a single module into a default Redhat kernel?

  1. #1
    Join Date
    Feb 2002
    Location
    NY
    Posts
    221

    Compiling a single module into a default Redhat kernel?

    Well I have a friend that needs to add usb support to his kernel.. I would just recompile the kernel personally. But to simplify the process is their a way to simply compile the usb modules for the existing kernel and then use insmod or modprobe to insert them?? The kernel is a "as-is" redhat kernel never recompiled...


    the kernel howto has a section similar, i think what i want to do it says do this (with ntfs instead of usb support added),

    cd /usr/src/linux
    mv Makefile Makefile.original
    cp Makefile.original Makefile.my
    ln -s Makefile.my Makefile # Because some files underneath still need "Makefile"
    vi Makefile.my
    # And comment out the line having 'SUBDIRS' and add the
    # directory you are interested, for example like fs/autofs as below :
    #SUBDIRS =kernel drivers mm fs net ipc lib abi crypto
    SUBDIRS =fs/autofs
    # Save the file Makefile.my and give -
    make -f Makefile.my modules
    # This will create module autofs.o
    # Now, copy the module object file to destination /lib/modules
    # DANGER: Do NOT DO THIS - "make -f Makefile.my modules_install" This may
    # clean up other good ones in /lib/modules !! But just copy as below:
    cp autofs.o /lib/modules/2.4.18-19.8.0/kernel/fs/autofs
    Last edited by chrisP; 07-29-2003 at 02:46 PM.

  2. #2
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,307
    Doesn't the Redhat default kernels already enable just about every option there is including usb support?

    Have you or your friend checked to see if that required usb module exists in /lib/modules/<kernel version>/... ?

    Which usb module is this?
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

  3. #3
    Join Date
    Feb 2002
    Location
    NY
    Posts
    221
    yes but this is an old version, 6.2..

    no the object files don't exist.. I'm trying to find the source for the 2.2.14 kernel so it's easier for me to help him but I cant find it... added I found the source on kernel.org


    Since, usb was not included i guess the usbcore, usb-uhci, and hid modules..
    Last edited by chrisP; 07-29-2003 at 03:07 PM.

  4. #4
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,307

    Re: Compiling a single module into a default Redhat kernel?

    Originally posted by chrisP

    cd /usr/src/linux
    mv Makefile Makefile.original
    cp Makefile.original Makefile.my
    ln -s Makefile.my Makefile # Because some files underneath still need "Makefile"
    vi Makefile.my
    # And comment out the line having 'SUBDIRS' and add the
    # directory you are interested, for example like fs/autofs as below :
    #SUBDIRS =kernel drivers mm fs net ipc lib abi crypto
    SUBDIRS =fs/autofs
    # Save the file Makefile.my and give -
    make -f Makefile.my modules
    # This will create module autofs.o
    # Now, copy the module object file to destination /lib/modules
    # DANGER: Do NOT DO THIS - "make -f Makefile.my modules_install" This may
    # clean up other good ones in /lib/modules !! But just copy as below:
    cp autofs.o /lib/modules/2.4.18-19.8.0/kernel/fs/autofs
    I didn't realize this was for Redhat 6.2. Sorry!!

    I would think those instructions should work for usb as long as you select ALL the required usb module support you need.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •