A Mutable Log

Rebuild specific kernel modules on PandaBoard

This procedure rebuilds the kernel modules for usb networking, to fix a regression in the usbnet driver reported here, but the same procedure can be applied to other modules as well.


I am running Ubuntu 11.04 preinstalled netbook image for OMAP4.

Obtain Kernel Source

Download debian package from launchpad. I could not apt-get it for some reason. So I installed the deb package using

sudo dpkg -i linux-source-2.6.38_2.6.38-11.48_all.deb

Extract kernel source

After installation, the compressed kernel source is available at /usr/src/linux-source-2.6.38. You can extract the kernel source to your home folder like this

tar xjf /usr/src/linux-source-2.6.38/linux-source-2.6.38.tar.bz2

Obtain Kernel Headers

You may already have the kernel headers installed, otherwise

sudo apt-get linux-headers-omap4

Rebuild module

Head over to the folder of the module

cd ~/linux-source-2.6.38/drivers/net/usb

Rebuild using make

make -C /usr/src/linux-headers-2.6.38-1208-omap4 M=`pwd`

Replace modules

Backup existing module objects in case something goes wrong. Replace them

sudo cp *.ko /lib/modules/2.6.38-1208-omap4/kernel/drivers/net/usb/

Check if a module is already loaded


and remove it

rmmod cdc_ether

Do something like plugging in the hardware so that the new module gets loaded.

That’s all.

With some inspiration from here.