How to compile kernel

Compiling kernel on Raspberry Pi takes long time – cross compiling is much better solution on separated, faster computer with Linux installed. Both Raspberry Pi and Linux box must be connected to the same network and internet. I’m using my home webserver on Ubuntu OS. Lan IP = , Raspberry Pi Lan – replace with your own Lan Ips. Make sure you have SSH on Ubuntu box if not sudo apt-get install openssh-server.

Setup Raspberry Pi
Download Raspian “wheezy” from
I’m using 2013-07-26-wheezy-raspbian
Setup SD card minimum 4GB using

Configure Raspberry Pi

Use Hexxeh’s script to update firmware on Raspberry Pi,

Make dir writable

Make sure you have GIT

Update Raspberry Pi

Compile Kernel on Ubuntu box
Install packages for cross compiling

From /proc/ directory grab .config on Raspberry Pi

Copy .config from Raspberry Pi to the Ubuntu computer using your local LAN – my local Raspberry Pi IP = (replace ip with your own LAN ip)

Configure .config

Compile Kernel on Ubuntu box (add j3 for dual core pc, j6 for quad core pc)

Create modules dir

Install modules to modules dir

Copy compiled kernel to the Raspberry Pi

Replace old kernel img with new compiled kernel

Copy new modules to the Raspberry Pi & remove directories we do not need
Remove first

Next copy modules to Raspberry Pi

Reboot Raspberry Pi


Speak Your Mind