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
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 linux-source- 2.6.32. tar.bz2
tar xjf /usr/src/
3) patching and compilation (only drivers/usb/serial subdirectory)
mkdir temp
cd ./linux- source- 2.6.32 wwan-2. 6.32.diff
patch -p1 < ../usb-
cp /lib/modules/`uname -r`/build/.config ../temp Module. symvers ../temp
cp /lib/modules/`uname -r`/build/
cp /lib/modules/`uname -r`/build/Makefile .
make O=../temp outputmakefile drivers/ usb/serial/
make O=../temp archprepare
make O=../temp prepare
make O=../temp modules SUBDIRS=scripts
make O=../temp modules SUBDIRS=
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/ drivers/ usb/serial/ qcserial. ko /lib/modules/`uname -r`/kernel/ drivers/ usb/serial/ drivers/ usb/serial/ option. ko /lib/modules/`uname -r`/kernel/ drivers/ usb/serial/
sudo cp ../temp/
sudo cp ../temp/
sudo /sbin/depmod -a