Building Linux Kernel
Checkout cross compiler toolchain:-
git clone https://github.com/raspberrypi/tools
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 https://github.com/raspberrypi/linux
Configure for Rapsberry Pi 2/3 boards:-
cd linux
KERNEL=kernel7
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
References:-
https://www.raspberrypi.org/documentation/linux/kernel/building.md
Checkout cross compiler toolchain:-
git clone https://github.com/raspberrypi/tools
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 https://github.com/raspberrypi/linux
Configure for Rapsberry Pi 2/3 boards:-
cd linux
KERNEL=kernel7
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
References:-
https://www.raspberrypi.org/documentation/linux/kernel/building.md
Very precise and helpful tutorial !!!
ReplyDeletePlease add steps to add rootfs, add other partitions etc and create a final image to flash in sd card. Thanks !!!!
ReplyDeleteWell done navi
ReplyDeleteOk, will add tips for rootfs soon.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteInteresting and useful tutorial..
ReplyDelete
ReplyDeleteAwesome !!!