With several nice commits landing into the mainline of Linux Kernel for version 4.5, is it already possible to compile and boot a mainline kernel (e.g. 4.5-rc6) on a Raspberry Pi 2? If yes, then what is the simplest way to do so? What kernel configuration options do I need to set for basic Pi 2 hardware support (SD card, ethernet, usb, text mode video output)? Do I need some extra binary blobs?

  • I do not think it is impossible, but I have not tried and I do not think it would be very easy unless you already understood the structure of the kernel sourse first. Note that the rpi kernel source is already available in a 4.5.x version, so if you can cross-compile or do it directly on the pi (note this will probably take hours), you are set in that sense. However, it's not a direct answer to your central question.
    – goldilocks
    Mar 5, 2016 at 16:14
  • I'm already cross compiling the working kernels from the rpi kernel sources (rpi-4.5.y branch). Once you turn off all the useless stuff, it takes perhaps 5 minutes on my 8-core i7-4700MQ.
    – jotik
    Mar 5, 2016 at 16:48
  • Yes, compiling on a modern normal box is very fast. For the Pi 2 this is easy because most distros come with an ARMv7 cross-compiler; for the other versions you need to build or acquire an ARMv6 tool chain.
    – goldilocks
    Mar 5, 2016 at 16:52

1 Answer 1


While the Raspberry Pi 2 support is present in 4.5, you're also looking for a .config that will work. The changes for multi_v7_defconfig weren't ready for 4.5, so they're currently in linux-next. That defconfig is still missing a couple of things:

CONFIG_BCM2835_WDT=y (enables reboot/shutdown)
CONFIG_SND_BCM2835_SOC_I2S=y (support for external audio DACs, not the 3.5mm jack)
CONFIG_DMA_BCM2835=y (only used for i2s currently)

Even with all of this, graphics doesn't work without this series.

Note that if you're doing your own kernels, you want serial console so you can debug. Otherwise you'll be staring at a dead computer and wondering why things don't work.

  • So, in principle, when mainline Linux Kernel 4.5 is released, it should be possible to boot it on an Raspberry Pi 2 (without DRM support) given a correct .config file?
    – jotik
    Mar 9, 2016 at 8:36
  • Yes, it definitely should be. I'm running upstream 4.5 rcs for my daily development work. Mar 9, 2016 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.