Comment 14 for bug 554099

Revision history for this message
Viktors Petrovs (viks77) wrote : Re: HP un2400 mobile broadband module not working after upgrade to lucid

Sometimes i need to compile just one kernel module for current kernel without compiling full kernel tree.
This is how i get it done:

1) get attached patch
2) install and extract kernel source

sudo apt-get install linux-source
tar xjf /usr/src/linux-source-2.6.32.tar.bz2

3) patching and compilation (only drivers/usb/serial subdirectory)

mkdir temp

cd ./linux-source-2.6.32
patch -p1 < ../usb-wwan-2.6.32.diff

cp /lib/modules/`uname -r`/build/.config ../temp
cp /lib/modules/`uname -r`/build/Module.symvers ../temp
cp /lib/modules/`uname -r`/build/Makefile .

make O=../temp outputmakefile
make O=../temp archprepare
make O=../temp prepare
make O=../temp modules SUBDIRS=scripts
make O=../temp modules SUBDIRS=drivers/usb/serial/

4) copy resulting modules to kernel modules directory

sudo cp ../temp/drivers/usb/serial/usb_wwan.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/
sudo cp ../temp/drivers/usb/serial/qcserial.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/
sudo cp ../temp/drivers/usb/serial/option.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/
sudo /sbin/depmod -a