3

A good man on NetworkManager mailinglist provided a patch that hopefully would solve an issue I'm experiencing related to slow mobile broadband detection on Ubuntu 11.04 64-bit. I'd really like to check the patch but I can't figure out how to do this.

As a starting point I have uncompressed /usr/src/linux-source-2.6.38/linux-source-2.6.38.tar.bz2 and applied the patch to /usr/src/linux-source-2.6.38/drivers/usb/serial/options.c, but now I'm stuck.

How do I recompile the module? Possibly just the module, not the whole kernel and the other unmodified modules. Links to good docs are appreciated as well.

I already reconfigured and recompiled a kernel in the past (though the procedure looked a bit obscure to me...) so all the involved software should be in place.

Thanks for any clarification.

1

2 Answers 2

2

The Linux Kernel Module Programming Guide is very informative about kernel modules.

If you are a 100% newbie on this topic like I am/was and want to understand something more, it's the case to query Google for further delvings. Otherwise LKMPG (!) is enough to get the result. Specifically, the section 2.2 Compiling Kernel Modules is the direct and detailed answer to my question.

HTH

0
  • To build the final module images in a directory, you can use the M= argument for your make command:

    make M=drivers/usb/serial

This will build all the needed files in that directory and link the final module images.

  • To build only a specific file in the kernel tree, just pass it as the argument to make:

    make drivers/usb/serial/visor.ko

The build system will build all needed files for the visor.ko kernel module, and do the final link to create the module.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .