[riot-devel] Configure Raspberry Pi as 802.15.4/6LoWPAN Border Gateway

Lennart Dührsen lennart.duehrsen at fu-berlin.de
Thu Aug 20 18:46:24 CEST 2015


Hi everyone,

to build the kernel for a RPi 2 Model B, you have to do only a few
things differently:

First, before invoking any make command, set the environment variable
KERNEL to kernel7, i.e.

> KERNEL=kernel7

When cloning the git repo with the kernel sources, use

> git clone --depth=1 https://github.com/raspberrypi/linux linux-rpi

This creates a shallow clone, leaving out most of the history, which you
don't need anyway. It takes considerably less time.

When making the initial config, replace bcm2835_defconfig with
bcm2709_defconfig, i.e.

> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig

Instead of arch/arm/boot/dts/bcm2835-rpi-b.dts, edit
arch/arm/boot/dts/bcm2709-rpi-2-b.dts, but append the same text.

Finally, when copying the new kernel to the SD card, I recommend to keep
the old kernel, and give the new one a distinct name, e.g.

> sudo scripts/mkknlimg arch/arm/boot/zImage
/media/<myusername>/boot/super-fresh-kernel.img

and then open /boot/config.txt and add kernel=super-fresh-kernel.img.
That way you still have a backup kernel you can use in case something
goes wrong, and you don't have to install raspbian from scratch again.

All the steps I did not mention explicitly stay the same.

Happy hacking,
Lennart



More information about the devel mailing list