Build Linux For Raspberry Pi 2/3

Building Linux Kernel

Checkout cross compiler toolchain:-
git clone

and export path for tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/

better put it in your .bashrc

You can also build 64 bit, however, at the moment, default/recommended is 32 bit.

Check out the latest source of kernel from:-
git clone — depth=1

Configure for Rapsberry Pi 2/3 boards:-
cd linux
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig

Build the kernel source:-
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs