I am considering upgrading the kernel of my Raspberry Pi router to 3.19. But how can I do this?

I have found an out-of-tree nl80211-compatible driver for rtl8188cus that supports hostapd and acs, but it calls for a 3.19 kernel. How do I build this 3.19 kernel, maybe libc, and upgrade my Pi to it?

I have a 20-core server running Ubuntu 14.04 and I have to cross compile using that, or the compiling time will not be tolerable. Please give me instructions on how that is to be done.

EDIT: I have not tried to cary this out yet, as I don't have the expertise in debugging such situations (and previous experiences of failed LFS builds left me pretty scarred.) I need some clear instructions on how this should be done, Cross Linux From Scratch style.

  • 1
    Have you tried? Have you gotten stuck on a particular step? Currently this question is overly broad and may be closed.
    – Jacobm001
    Apr 7, 2015 at 17:21
  • @Jacobm001 No but I am a bit afraid to try it out outright - I am scarred from failed LFS builds. Apr 7, 2015 at 17:24
  • Compiling on the pi would probably be quicker than setting up a cross compilation chain if you don't know how to do it.
    – Bex
    Apr 8, 2015 at 10:41

1 Answer 1


It is not quite so traumatic as LFS. The hardest part IMO is getting the cross-compiler set up. There's already plenty of information about that around, here included; I recommend crosstool-ng (here's how I made mine). Distros including Ubuntu usually have cross-compiler packages, but I believe they only target ARMv7, which is fine for the Pi 2 but not previous models.

  • Here's an introduction I wrote to compiling the linux kernel in general. You don't get the benefit of a bootloader menu on the pi, you have to hardcode which kernel image you want to use with the kernel= parameter in config.txt on the first partition.

  • Here's some pi specific notes about the kernel, although you should not have to worry much about that if you either:

    • Use the make ARCH=arm bcmrpi_defconfig default.
    • Use /proc/config.gz as described in the previous link.

    Which you should, because as also mentioned in the previous link, going through all the options takes hours.

The actual kernel source for the pi is here; it is not the vanilla kernel.

  • I did cross-build a working Cirrus Logic kernel for ARMv6 (as I still have the Wolfson Audio Card I was planning to be used as an oscilloscope) but that was a 3.18.9 - same kernel version as mainline Raspbian. Here I am talking building a 3.19 kernel which is one major version higher than 3.18. Apr 7, 2015 at 17:56
  • If you already have a cross-compiler, then that is at of the way. Using a slightly different version kernel is not a big deal as long as you remember to install all the modules, because those must have exactly matching version numbers.
    – goldilocks
    Apr 7, 2015 at 17:58
  • There are some notes at the end of that crosstool-ng thing about environment variables for cross-compiling the kernel in particular (such as INSTALL_MOD_PATH). You would then copy that whole directory into /lib/modules on the pi.
    – goldilocks
    Apr 7, 2015 at 18:01
  • So the way to build a 3.19.x kernel with the new out-of-tree rtl8188cus driver is exactly the same way I built the Cirrus Logic 3.18.9 kernel? (The CL kernel built WM8804 and WM5102 drivers as modules as well. I am actually AirPlay'ing music off my Mac to the Pi now, and the Wolfson sounds really audiophilic.) Apr 7, 2015 at 18:02
  • Also, do I need to rebuild libc? Apr 7, 2015 at 18:05

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.