for a research project I needed to compile an upstream linux kernel for the Raspberry Pi. (I want to use the RasPi with the AT86RF2xx series IEEE 802.15.4 wireless transceivers. The bluetooth-next linux branch contains source code for them.) I would like to summarize my findings here.
I took http://elinux.org/RPi_Upstream_Kernel_Compilation as a guide. That guide however seems to be written for the B instead of the B+ (so I ended up extending it).
======Make .config Files=======
From all the different possibilities of obtaining a .config file, only the bcm2835_defconfig one worked (under arch/arm/configs/). All config files created from bcmrpi_[ cutdown | emergency | quick ]_defconfig files gave me a non-booting kernel. Config files pulled from /proc/config.gz from a booting precompiled rasbian kernel showed the same behaviour.
======Device Tree Files=======
I am somewhat confused about the different Device Tree (.dts / .dtb) files:
a) My U-Boot Bootloader expects "bcm2835-rpi-b-plus.dtb" as the name of the Device Tree File even though I specified bcm2835-rpi-b.dtb in boot.scr. However https://github.com/raspberrypi/firmware ... aster/boot only shows bcm2708-rpi-b[-plus].dtb This may be because U-Boot seems to not properly pass hardware info to the kernel
b) My kernel compilation gives me three different dtb files under arch/arm/boot/dts:
Additionally one could use the dtb files from the repository linked above.
Only the self-compiled bcm2835-rpi-b.dtb works! All other Device Tree Files get stuck during boot at "Calibrating delay loop" or you end up without the SMSC LAN9514, so without USB and Ethernet.
So, long story short, to compile upstream kernels for the Raspberry Pi B+, you need to
- * use bcm2835_defconfig to prime your .config file
* do the additional configuring via menuconfig that suits you most
* add the self-built bcm2835-rpi-b-plus.dtb from arch/arm/boot/dts to the boot folder, either modify boot.scr accordingly or rename the dtb file to suit the expected name