Raspberry Pi Kernel

IMPORTANT: You should no longer be using my kernels. The official kernels shipped with Raspbian now include versions of my I2C and SPI drivers and are much newer. I am also no longer involved in Raspberry Pi development. The rest of the page is being kept for historical reasons only.

As I have been posting so often about kernels for the Raspberry Pi I thought I had best create a central page on my blog that people can link to and always get the latest version.

1. Latest 3.2 Kernel (NO LONGER AVAILABLE)

You shouldn’t be using 3.2 any longer. Please use more up to date kernels. See the note at the top of the page.

Note that the source is still available on GitHub if you really want to use it, but you’ll have to build your own kernels.

Recent change history:

3.2.23 r1
Imported 3.2.22 and 3.2.23 kernel patches; enabled some more modules by request; imported some extra patches from the official kernel; compiled with Linaro GCC 2012.04 (thanks to crosstool-ng); fixed a minor sched_clock warning that looked nastier than it was.
3.2.21 r2
Applied GPIO interrupts patch and some other patches from the official Raspberry Pi kernel; enabled DVB (oops, sorry, this was meant to be there before) and some further V4L modules; added DRBD module.
3.2.21 r1
Imported 3.2.21 kernel patch; imported some extra patches from the official kernel including for the ALSA audio driver.
3.2.20 r1
Imported 3.2.20 kernel patch; imported latest SDHCI performance tweaks; enabled easycap driver.
3.2.19 r3
Added a bunch of wireless drivers from the kernel’s staging directory, including r8712u.
3.2.19 r2
Added a bunch of GSPCA webcam drivers. (not publicly released)
3.2.19 r1
Imported 3.2.19 kernel patch; reverted a bad SDHCI patch that has been causing issues; added a bunch of USB webcam drivers. (not publicly released)

2. How to install

First, make sure you have got recent firmware on your SD card. The firmware that comes with the official images is not recent enough. You can get the latest firmware from the Raspberry Pi Foundation GitHub, or see the post about Hexxeh’s easy updater tool. The firmware update is safe and painless and cannot brick your Pi.

Download the package to your Raspberry Pi and run the following commands as root:

dpkg -i linux-image-3.2.23-rpi1+_1_armel.deb
cp /boot/vmlinuz-3.2.23-rpi1+ /boot/kernel.img

Then reboot. You should be all set.

Note that you should change the version numbers in the above commands to reflect the version of the .deb file you downloaded. Also, if you’re using my own Debian Wheezy based image, you’ll want to put the kernel at /mnt/boot/kernel.img instead.

3. Using SPI or I2C

The kernel above includes my SPI and I2C drivers for Raspberry Pi.

The SPI driver exposes two device files (/dev/spidev-0.0 and /dev/spidev-0.1), one for each cable select line (CE0 and CE1 on RPi). Look in the /usr/include/linux/spi/spidev.h header for how to drive this properly. There are also Python bindings available and I’m sure there are others available for other languages too. If you want to bind a kernel SPI device driver to an SPI chipselect line, you’ll have to edit the source and build your own kernel. Sorry, but that’s how it works in 3.2.

The I2C driver creates a Linux I2C bus just as any other I2C bus driver would. To use it from userspace you’ll want to load the i2c-dev module and play with /dev/i2c-0. If you want to use kernel I2C device drivers you can bind them from userspace without a rebuild, e.g.:

echo tmp102 0x48 > /sys/class/i2c-adapter/i2c-0/new_device
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device

4. Why 3.2?

One of the reasons I’m really pushing at a 3.2 kernel for the base image of the Raspberry Pi (until we get the architecture code rewritten for a mainline merge, another effort I’m part of) is that 3.1 is no longer an actively supported branch of the kernel and has some nasty security issues, whereas 3.2 is actively supported as it is the basis of Ubuntu 12.04 LTS (Precise Pangolin) and will be the kernel used in Debian Wheezy as well.

Please see Issue #2 on the Raspberry Pi kernel tree on GitHub for a fright. Here’s a technical description of the issue, including an exploit (linked from the GitHub issue).

5. If a module isn’t included

If there is a kernel module you would like to use but isn’t included in the above download, let me know. If it’s in the mainline 3.2 kernel and builds cleanly, I’d be more than happy to included it in a future build of my kernel. Just let me know in the comments below or by email.

6. Building your own modules

If a module isn’t part of the standard kernel tree or you can’t wait for me to build a new image, you may be tempted to build your own modules and use them with the package above. Don’t. It won’t work. You won’t have the same compiler as me and the resulting files will most likely not even load into the kernel. You’ll need to rebuild the entire kernel with the same compiler for this to work.

7. Rebuilding the kernel from source

I won’t write a big “kernel building for Raspberry Pi” how-to as plenty of folks have done something similar. I will, however, point to my post on how to build a cross compiler that works for the Raspberry Pi.

If you’re curious about how I build the Debian package, look into a package called kernel-package within which you will find make-kpkg. Note that if you’re wanting to do this on Debian Wheezy you need a modified version of kernel-package available in my apt repository (with source).

271 thoughts on “Raspberry Pi Kernel

  1. Hi Chris,

    I’m running your current kernel along with Raspbian and it works great so far.

    One strange thing I came across is a message during boot:

    [ 0.000000] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
    [ 0.000000] sched_clock: wrong multiply/shift: 2097152000>>21 vs calculated 4194304000>>22
    [ 0.000000] sched_clock: fix multiply/shift to avoid scheduler hiccups

    Can I fix this by setting some kernel command line options or something?
    Or isn’t this a problem at all?

    Thanks for your help!
    Kind Regards.

    • Sorry, I’ve never seen those come up before. Have you overclocked your Raspberry Pi? If so, all bets are off.

      • I had it overclocked to 800Mhz for some time.
        Right now I tested your kernel with (arm_freq=800) and without overclocking.
        Independent of the frequency, the message from my first post arises.

  2. Thanks for all the work on this kernel.

    If I want to compile a module (eg for a wifi adapter) I suppose I also need a deb with kernel headers that match the binary.

    Is there a place to find this for your 3.2.21-rpi1+_2 kernel?

    • You would also need a compiler to match the binary. If the module is included in the kernel source and I haven’t included it, let me know what it is and I’ll make sure it’s built in the next version. If it’s not included then I’m afraid you’ll have to build an entire kernel of your own.

      • I was hoping to use the toolchain in the (updated) reference raspberry pi debian image to avoid having to cross compile…

        I can’t tell if the module is included already.

        The particular driver I’m after is for the realtek 8192cu. When I just plug it in with your kernel, lsmod shows rtl8192cu, rtl8192c_common, rtlwifi, mac80211, cfg80211 and rfkill are loaded, so the existing drivers would seem to have recognised it. Problem is that dmesg only shows some very generic usb messages and one from cfg80211:

        [12201.889106] usb 1-1.2: new high-speed USB device number 5 using dwc_otg
        [12201.991256] usb 1-1.2: New USB device found, idVendor=0bda, idProduct=8176
        [12201.991297] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
        [12201.991316] usb 1-1.2: Product: 802.11n WLAN Adapter
        [12201.991330] usb 1-1.2: Manufacturer: Realtek
        [12201.991343] usb 1-1.2: SerialNumber: 00e04c000001
        [12202.112205] cfg80211: Calling CRDA to update world regulatory domain

        I think when the drivers are really working there is more in dmesg, for example about loading firmware and so on. Of course iwconfig, iwlist etc show only eth0 and lo, so unless I’m missing something the included drivers are not doing their thing.

        I know its not a power issue: 3A supply and it was recognised under archlinux with a driver I compiled against the 3.1.9 kernel.

        • Try to run ip link and see if it’s listed there, if so run ip link set dev «device» up, which should activate it.

          Don’t dismiss the power issue; regardless of your power supply the Raspberry Pi has a 1.1A polyfuse on its input and 140mA polyfuses on each USB port, so you physically can’t get more than 140mA from each port. Try using a powered hub.

          • @Chris, can you compile the kernel with this new 8192cu driver and spi support? Thanks.

          • Sorry, I really want to stick to the bare minimum patches in my kernel, so I only want to carry what I have to make it usable on the bare board. This is something you’ll have to do yourself. Sorry.

  3. i just updated the firmware and installed you Kernel, but “uname -a” still shows “Linux raspbmc 3.1.9-test-12-06 #1 PREEMPT Mon Jun 18 20:07:45 UTC 2012 armv6l GNU/Linux” …

    so it seems that the new Kernel doesn’t load πŸ™ maybe you could help me?

  4. Pingback: Connecting a Color lcd (MI0283QT-2) to the raspberry pi. at Dominique Gallot's weblog

  5. Hello Chris,

    I would like to compile your kernel on my ArchLinux Raspi.
    I have downloaded the sources from Github. I can use the .config from my running ArchLinux system (zcat /proc/config.gz > .config), but I want to enable GPIO, I2C, SPI and all the other goddies you worked on. What options do I have to set, to enable the GPIO and especially I2C (have a DS1307 RTC) and possibly SPI.

    • Hi, you should look /boot/config-3.2.21-rpi+ in Pre-compiled binary.

      Thanks for your work Chris !

  6. I installed your kernel, and basically it works great. I rebuild it, and that one works too. But, omxplayer is unable to play any movie. Even worse, Except for a continuous stream of data dumping on the console, the RPI is completely dead; I have to powercycle. I play the movie over HDMI; sound is also going to HDMI. This all works well on 3.1.9+. Btw, this problem on your .deb packaged kernel too.

    • So far nobody who has this problem has managed to extract some of this stream of data from the console, so I don’t know what’s wrong, so I can’t fix it. Sorry.

      • Your answer implies that there are more people with this problem. But also that there are people that can succesfully play movies. Is that correct? I take it that you dont have the problem. I did some attempts, but did not manage to catch (the head of) the dump. Maybe I should make myself a serial cable to catch it.

        • I have no idea if people can use omxplayer, of course those people don’t tell me it works! I don’t use it myself and don’t really have a way of testing it.

          If you could build a serial cable and get some output that way, I might have a chance of spotting the problem.

  7. Hi Chris,
    Ususally on my Linux machines I recompile kernel and modules.
    However, as you kindly offered to add additional modules into your raspberry pi kernel image, I would like to ask you adding a couple of modules for hamradio digital communication mode AX.25. Modules our community would need are ax25, mkiss, rose and netrom.

  8. hi,

    i’m working with the SPI bus to communicate with some WS2801. it works so far, but i have some questions concerning the clock: How can i change it? Did you implented a any command? can i reset the clock?

  9. Pingback: Raspberry Pi i2c/spi setup | Random hacts

  10. Wow, Loving the latest release! DVB working perfectly for me now – Thanks so much!
    Omxplayer is working fine for me BTW, wheezy beta + your kernel is the best combination IMO!

    I seemed to have a problem with the SD being mounted trying to install it over the official squeeze, but I had played so much with that installation I figured I’d broken something and just formatted and installed wheezy beta and everything was peachy! [I know, Cool story bro…]

    • Thanks for the positive reports about DVB and omxplayer, that’s actually very helpful indeed.

      I do expect trouble with updating between revisions of the same kernel on the official Squeeze and Wheezy images due to /boot being a FAT filesystem, but my own Wheezy image does it differently to avoid the issue. To fix it you just have to move the old files in /boot out of the way, then install the .deb package again.

  11. And just to add to the request list πŸ™‚

    Would it be possible to re-enable the full initrd functionality, and possibly the ramfs support (although this is less critical)? This might allow an easier transition to non-SDHC based root filesystems.


  12. Hi Chris,

    I have installed your recent wheezy image on my SD card but I can’t get the I2C bus working.
    I am getting this error:
    [ 48.627205] i2c i2c-0: new_device: Instantiated device tmp102 at 0x48
    [ 48.674027] tmp102 0-0048: error reading config register
    [ 48.679573] tmp102: probe of 0-0048 failed with error -5

    Can you tell me what is going wrong?

    Kind regards,

  13. Can I get a tarball of the latest kernel sources? trying to pull them off github ends up giving me some boken 3.4-RCx kernel, or the original 3.1.9 kernel

    • I can include it, but it would be pointless as you need to make a change to the kernel code to wire the SPI subsystem up to the driver. This isn’t something that can be done from userspace with a pre-built kernel. You would need to do this change and compile your own kernel for it to work.

      • Whoopsie …
        I presumed that one can handle SPI devices the same way as I2C ones. Write something to /sys/something …
        Now, as i re-read carefully your above post, i am slapping myself over the head with the RTFM stick.
        What would happen if a kernel for RPi is compiled with SD card-support wired to ChipSelect 0 and ENC28J60 wired to CS1 and the user does not have those peripherals connected to his RPi ?
        I think a 2nd SD and a cheap SPI Ethernet card could be the most requested SPI peripherals and you could include them by default as long as nothing bad may happen if they aren’t present at boot time.
        Or is the switch to the 3.4 kernel near ?

        • Sadly not… πŸ™

          If you compile a kernel with those drivers built-in and a device isn’t present they just fail to probe and nothing too spectacular happens. That being said, the spidev stuff seems very popular for all manner of uses at the moment so I am unlikely to change it!

          The switch to the newer kernel (3.5 at the moment, but the target moves with every commit to Linus’s tree) is not going to be quick at all. It’s going to take a good long time before we get there, sorry.

  14. Hi

    i want to let run an XBMC on top of your Kernel. But i’m a little bit stucked. I tried to install your Kernel in other Images with XBMC in it, but then i cant start XBMC anymore. If i try to run Raspian, your Kernel won’t install because it’s not the same achitecture.

    Does anybody has XBMC running with this Kernel? if yes, is there any how-to or an compleate Image?


      • Nice to hear! Unfortunately they are restricting their distribution a lot πŸ™ i want to add more stuff like boblight and so one. Don’t know to compile it without the super powers of apt-get πŸ˜‰

  15. Hi,

    is it possible that you set CONFIG_BLK_DEV_INITRD=y and CONFIG_RD_GZIP=y at kernel config in the next release?

    I really love to try the initramfs support, which can be enabled in config.txt with

    and in cmdline.txt:


    Thanks for your great work so far!

  16. Hi,
    I have been trying to thet SPI to work with the example from http://armbedded.eu/node/318 but when i configure the spi speed too low (< 3700 Hz) for example, the RasPi just crashes. at 3800Hz, it manages to spew out a few lines:
    kernel:[ 38.999799] Internal error: Oops: 17 [#1]
    kernel:[ 39.030893] Process kworker/u:0 (pid: 5, stack limit = 0xcb830268)
    kernel:[ 39.033243] Stack: (0xcb831f30 to 0xcb832000)
    kernel:[ 39.035574] 1f20: c04cecf8 c04cecf8 c04cecf8 caaffecc

    i am working on it via SSH, so cant look at the console.
    Kernel is 3.2.21-rpi1+ #12 which fixed issues with some usb devices wonderfully.


  17. Would it be possible to enable the TDA18271 module (CONFIG_DVB_TDA18271) in the next pass?

    I now know enough to understand why things don’t work. Fixing them still seems quite a long way off….

        • Thanks for looking, from the following dmesg line I assumed it was a module issue.

          tda18271_attach: driver disabled by Kconfig

          I’ll run it down myself, thanks again.

          • Yes, that would indeed point to a .config issue. I’ve just double-checked and the option for that is CONFIG_MEDIA_TUNER_TDA18271, which is enabled in my .config. Do you have my latest kernel installed?

          • I have re-checked and I am running the latest version.

            (Apologies for not replying directly, there seems to be a maximum allowed depth of replies).

          • Hmm, OK, hang on for a new version with a few more things enabled. Not sure why it doesn’t work at the moment though!

  18. Where I can find headers for Your kernel 3.2.21-rpi1+ ? I need them for install v4l

  19. Hey there

    can i use your kernel with Arch Linux from the official Raspberry PI homepage?

    if not out-of-the-box … is there any way? maybe compile it for Arch Linux?


    • You would have to extract the kernel files from the .deb files I publish and put them in the right places, but apart from that you should be able to use my pre-built kernels without any issue.

  20. I installed the kernel and I now have /dev/spidev0.0 , /dev/spidev0.1 and /usr/include/linux/spi/spidev.h

    I looked at the latter, but I can’t make much sense of it. Eventually I want to use it from e.g. Java code. With GPIO I use the wiringPi library that gives me access using a command line utility. Could you give me some directions how I could do something similar or use the driver without diving too deep into C? You mentioned a Python wrapper, could you tell me where to find it? Or even better, a Java wrapper if there is one?

    • I’d like a python tutorial too (for I2C but I suppose it’s the same)

  21. hey

    i justes compiled the official Kernel for my Raspberry Pi using this tutorial: http://elinux.org/RPi_Kernel_Compilation#Arch_Linux_2

    now i want to do the same with you kernel, but i dont find any “arch/arm/configs/bcmrpi_cutdown_defconfig” … which config do you use? or can i use a config from my live system? if yes: where is it? or should i use the config from the original kernel?


    • Sorry, I haven’t been maintaining the defconfig in my tree. You can copy the .config from your other kernel and run ‘ARCH=arm make oldconfig’ to update it for the new version.

      • thanks for you reply. If i use the config file from the official kernel sources, i get an error while compiling the kernel:

        arch/arm/plat-versatile/built-in.o: In function `versatile_leds_init’:
        sched-clock.c:(.init.text+0x128): undefined reference to `led_classdev_register’
        make: *** [vmlinux] Error 1
        make: Target `_all’ not remade because of errors.

        and if i use the config file from my running Arch Linux, “make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- oldconfig” asks me a question i connot answer:

        Physical address of main memory (PHYS_OFFSET) [] (NEW)

        besides, all other quests i just press enter, i hope this is right…

        could you help me?

        • Ah. Just put in 0x0 to start with, then go into menuconfig and select “Patch physical to virtual translations at runtime”. It’s the first option in menuconfig.

          • ok, tried it … didn’t really work πŸ™ the option you mentioned is at “no” by default. so i changed it after the whole config process by hand. then i compiled sucessfully, but the kernel won’t boot …

            i’m near to give up compiling a 3.2 kernel πŸ™

  22. Any chance of armhf (as in raspbian, not debian’s ARMv7) binaries too? I suspect most people will be switching to raspbian πŸ™‚

    • It’s the same binaries, only the package is different. You can extract the binaries into an armhf system and it’ll work.

      • dpkg –force-architecture -i

        Worked for me to install, but it isn’t booting for me with the latest firmware (from rpi-update). I’m not sure what’s going on, but the same happened from my own build from this source. I noticed that they no longer support zImage (http://elinux.org/RPi_Kernel_Compilation#Image_Generation_For_Latest_Firmware) but I couldn’t get the regular uncompressed Image to work either, just stuck at the rainbow colored boot screen.

        • That’s odd; I booted my latest kernel with yesterday’s firmware just fine. Mind you I don’t use the HDMI port at all so maybe it’s booting but the graphics are corrupted?

  23. Pingback: Raspberry Pi 3.2.23 kernel | Chris's Digital Realm

  24. Hello, with the latest kernel (3.2) omxplayer crash your system

      • With the vlc player

        [0x108e588] inhibit interface error: Failed to connect to the D-Bus
        session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY
        for X11
        [0x108e588] main interface error: no suitable interface module
        [0x108ec38] main interface error: no suitable interface module
        [0x107c8f0] main libvlc error: interface “globalhotkeys,none”
        initialization failed
        [0x107c8f0] main libvlc: Running vlc with the default interface. Use
        ‘cvlc’ to use vlc without interface.
        [0x108ec38] qt4 interface error: Could not connect to X server
        [0x108ec38] skins2 interface error: cannot initialize OSFactory
        [0x108ec38] [cli] lua interface: Listening on host “*console”.
        VLC media player 2.0.2 Twoflower
        Command Line Interface initialized. Type `help’ for help.
        > [0x10b6b90] pulse audio output error: PulseAudio server connection failure: Connection refused
        [0x120c2e8] xcb_xv vout display error: parent window not available
        [0x120c2e8] xcb_glx vout display error: parent window not available
        [0x120c2e8] xcb_x11 vout display error: parent window not available
        commandline read: vlc
        commandline read: La.Verita.Nascosta.2011.iTALiAN.MD.DVDRip.XviD-TNZ

        ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.10 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2008 The world wide DirectFB Open Source Community
        (c) 2000-2004 Convergence (integrated media) GmbH

        (*) DirectFB/Core: Single Application Core. (2012-05-20 16:16)
        (!) DirectFB/core/vt: Error opening `/dev/tty0′!
        –> Permission denied
        (!) DirectFB/Core: Could not initialize ‘system_core’ core!
        –> Initialization error!
        [0x120c2e8] directfb vout display error: Cannot create primary surface
        [0x120c2e8] fb vout display error: cannot get terminal mode (Invalid argument)
        [0x11167b8] avcodec decoder error: more than 5 seconds of late video
        -> dropping frame (computer too slow ?)

        [0x120c2e8] caca vout[mpeg4 @ 0x10b30c0] header
        damagedin vout display caca
        [0x11167b8] avcodec decoder error:
        more than 5 seconds of late video -> dropping frame (computer too slow
        [mpeg4 @ 0x10b30c0] header damaged

        [0x11167b8] avcodec decoder error: more than 5 seconds of late video
        -> dropping frame (computer too slow ?)

        [0x11167b8] avcodec decoder error: more than 5 seconds of late video
        -> dropping frame (computer too slow ?)

        [0x11167b8] avcodec decoder error: more than 5 seconds of late video
        -> dropping frame (computer too slow ?)
        [mpeg4 @
        0x10b30c0] header damaged

      • solved by running: apt-get -u upgrade !
        omxplayer working properly!!!

      • hi there,
        tried this and that to get omxplayer working with your kernel. did not work out, so i made a cable. here is the crash log, hopefully it tells you something about whats happening…


        pi@raspberrypi:~$ omxplayer -o hdmi any.mkv
        file : any.mkv reult 0 format matroska,webm audio streams 1 video streams 1 chapters 0 subtitles 1
        Video codec omx-h264 width 1280 height 528 profile 100 fps 23.976025
        Audio codec dca channels 8 samplerate 48000 bitspersample 16
        [ 204.399054] Unable to handle kernel paging request at virtual address 40f3af40
        [ 204.414930] pgd = c64ec000
        [ 204.425784] [40f3af40] *pgd=0655a831, *pte=00000000, *ppte=00000000
        [ 204.440098] Internal error: Oops: 80000007 [#1]
        [ 204.452272] Modules linked in: nls_utf8 nls_cp437 vfat fat spi_bcm2708 i2c_bcm2708 spidev i2c_dev snd_bcm2835 snd_pcm snd_page_alloc snd_seq snd_seq_device snd_timer snd soundcore smsc95xx usbnet leds_gpio
        [ 204.479852] CPU: 0 Not tainted (3.2.23-rpi1+ #3)
        [ 204.493820] PC is at 0x40f3af40
        [ 204.505325] LR is at 0x286b8
        [ 204.516387] pc : [] lr : [] psr: 60000010
        [ 204.516400] sp : 45413d40 ip : 40f3af40 fp : 45413f9c
        [ 204.544444] r10: 00000000 r9 : 00031bdc r8 : 00031bd8
        [ 204.558178] r7 : 00000000 r6 : 3b9aca00 r5 : 00000000 r4 : 3d908a04
        [ 204.573170] r3 : 4037f9dc r2 : c0000000 r1 : 45413d40 r0 : 00000001
        [ 204.588038] Flags: nZCv IRQs on FIQs on Mode USER_32 ISA ARM Segment user
        [ 204.604461] Control: 00c5387d Table: 064ec008 DAC: 00000015
        [ 204.618544] Process omxplayer.bin (pid: 1612, stack limit = 0xc6686268)
        [ 204.633974] —[ end trace bfe31141eb651300 ]—
        [ 204.647138] Kernel panic – not syncing: Fatal exception in interrupt
        [ 204.662046] [] (unwind_backtrace+0x0/0xe0) from [] (panic+0x68/0x1a8)
        [ 204.678889] [] (panic+0x68/0x1a8) from [] (die+0x2e0/0x368)
        [ 204.696080] [] (die+0x2e0/0x368) from [] (__do_kernel_fault.part.3+0x54/0x74)
        [ 204.713691] [] (__do_kernel_fault.part.3+0x54/0x74) from [] (do_page_fault.part.4+0x284/0x2c8)
        [ 204.732681] [] (do_page_fault.part.4+0x284/0x2c8) from [] (do_page_fault+0x2c/0x90)
        [ 204.750612] [] (do_page_fault+0x2c/0x90) from [] (do_PrefetchAbort+0x34/0x98)
        [ 204.768296] [] (do_PrefetchAbort+0x34/0x98) from [] (ret_from_exception+0x0/0x10)
        [ 204.786093] Exception stack(0xc6687fb0 to 0xc6687ff8)
        [ 204.799659] 7fa0: 00000001 45413d40 c0000000 4037f9dc
        [ 204.816638] 7fc0: 3d908a04 00000000 3b9aca00 00000000 00031bd8 00031bdc 00000000 45413f9c
        [ 204.833502] 7fe0: 40f3af40 45413d40 000286b8 40f3af40 60000010 ffffffff

        • so i moved on to try other things, and noticed that after starting x the raspberry will occasionally crash, sometimes sooner, sometimes later. looked like the power supply thing from having too much load on the usb. so i connected a powered usb hub, but problem is the same. so i looked at the serial output again, and it’s obviously the same problem:

          [124.472815] Unable to handle kernel paging request at virtual address 4080d358

          [ 124.480066] pgd = c6b50000

          [ 124.489232] Internal error: Oops: 80000007 [#1]

          and so on. power supply seems to be solid, measuring 5.06 Volts between TP1 and TP2

          • replying to myself:
            all of this, including i2c and spi and omxplayer work fine with kernel 3.1.9+
            found a lot of threads elsewhere describing the same effects, so it seems to be a 3.2 up problem … maybe

  25. Hey, Chris

    Thanks for the kernel I’ve been playing around with it for a while.

    I am having trouble with applications which use the gpu though. For example the hello_video.bin test file in /opt/vc/src/hello_pi/hello_video is throwing an error stating:
    vchiq_lib: Very incompatible VCHIQ library – cannot retrieve driver version
    *failed to open vchiq instance

    I’ve been googling around but have come up empty. Any thoughts would be very much appreciated.

  26. Hi Chris,
    I see the Raspbian Ò€œwheezyÒ€ recommended install is armhf,
    do you plan to make image*armhf.deb from now on?
    (since dpkg won’t install armel on armhf)

    • Just noticed this above:
      dpkg Γ’β‚¬β€œforce-architecture -i

      • hmm but /sys/class/i2c-adapter remains empty…
        (I start with the recommended Raspbian armhf and –force-architecture with the 3.2.23 armel.deb, this seems to work uname -a says 3.2.23… but nothing in /sys/class/i2c-adapter)

        • Ah.. ok, chris, your modules are already in the new recommended armhf build. For reference, I add them them with
          sudo modprobe i2c-bcm2708
          sudo modprobe i2c-dev
          I can then read my tmp102 with
          sudo i2cget -y 0 0x48 0x00 w
          (from sudo apt-get install i2c-tools)
          however, sensors
          (from sudo apt-get install lm-sensors)
          doesn’t work with
          echo tmp102 0x48 > /sys/class/i2c-adapter/i2c-0/new_device

          Do I need to add a driver for tmp102 or something?

  27. Thanks a lot for the new kernel with all the DVB tuners enabled, that works great.

  28. I tryed to use a 1wire device (DS1820), connected a GPIO 4, but it is not working.
    Is GPIO 4 ok for 1wire?
    Thanks a lot, Frank

    • Sorry, but I won’t include Frank’s patch. It’s a good patch, and it does exactly what it should, but this isn’t hardware that’s built-in to the RPi as such, so not something I think fits in with what my kernel is for. I simply carry the same patches that the official kernel carries, but rebased against 3.2.

    • Ah or wait – i can do this this weekend and can send you a pull request, if its okay for you.

  29. Now that Raspbian is the official image for the Raspberry Pi, have you considered creating an armhf package? I’m sure a lot of people would want one.

    • Indeed, that would be so helpful!

      I’ve been working on it for days now, but the .deb Kernel wouldn’t boot after a forced install. I tried several variants with firmware updates, self-compiling the Kernel and so on. Still no success with I2C on my armhf system.

  30. Hello Chris,

    I am running your 3.2.23+ kernel and it works great.

    Further, I applied the RT_PREEMPT patch 3.2.23-rt37, which applied without any errors. However, there are bugs when running it. I tracked down the first few to be caused by double locking a spinlock in dwc_otg driver and fixed that. If you would like to take a look at my patch, you can find it there: http://stefan.blinkenarea.org/raspberrypi/patch-3.2.23_stefanBA_dwc_otg_1.patch

    • I haven’t got the time to review the patch properly, sorry πŸ™ It looks good however. That driver really is a steaming pile of poo and that’s the least of the problems with it!

    • Stefan, the patch looks okay to me.
      I’ll merge it into raspberrypi github. Please create pull requests to raspberrypi github if you fix any other bugs.

  31. Hi Chris,

    a few days ago i’ve checked out and compiled your kernel, but at startup i get the following strange error (RPi seems to work normally, but i would like to fix it πŸ˜‰

    EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    vmalloc: allocation failure: 0 bytes
    modprobe: page allocation failure: order:0, mode:0xd0
    Backtrace: […]

    May be you’ve had this problem, too or know this problem and possible solution.

    Thanks and best regards,


  32. Hi,
    I tried to build your kernel using the branch from github, using the config file provided in the .deb archive. I remove some unneeded features, but the modules directory uses more than 430 Mb.. where the one in the .deb archive use only 41 Mb :-/
    (version 3.2.23-rpi1+_1). May have I done sth wrong?


    • The make-kpkg build process strips a lot of debugging symbols from the modules and places them in a separate package that I don’t generate/upload because it’s so huge. So no, I don’t think you’ve done anything wrong, it’s expected behaviour! πŸ™‚

  33. Thank you for your magnificent effort!

    I just install the new 2012-07-15 Debian into my SD card and it works. Now i am trying to upgrade my kernel to the newest available with your two commands :
    dpkg -i linux-image-3.2.23-rpi1+_1_armel.deb
    cp /boot/vmlinuz-3.2.23-rpi1+ /boot/kernel.img

    but dpkg gives package architecture (armel) does not match system (armhf)

    I am a total beginner and don’t know how to handle that, could you please type if any extra command needed?

    my kind regards

  34. Hi,

    Your kernel works fine when mounting the rootfs from a sd-card, but I have not yet been able to boot it when mounting the rootfs via nfs. With the 3.1.9-kernel included in the debian image it works fine. I was using basically the options from here: http://var-blog-messages.blogspot.co.uk/2012/05/set-up-your-raspberry-pi-like-pro.html

    except that I used ip=dhcp. I also compiled your kernel myself, but encounter the same problem (as expected). I get a kernel panic with “VFS: Cannot open root device “nfs” or unknown block”
    Do I need to add a certain config-option?

    Best regards,

    • Ok. The ROOT_NFS option was hiding in menuconfig. It appeared after including nfs client (was set to M before).
      It’s building right now, so lets hope it works tomorrow.

  35. Ok. NFS_ROOT was not enough.
    After some more testing I ended up with setting these option to ‘y’ and now it works:

    Some are probably unnecessary as it was kind of a try and error system I used πŸ˜‰
    In general I think nfsroot-support may be a good candidate to include in a coming version.

    Best regards,


  36. Hi,

    I’m fairly new to the R-Pi and I have a strange problem. I started by downloading the default image from the Raspberry Pi site. I then upgraded the firmware and installed your kernel. My purpose is to use the SPI interface but the /dev/spi* -handles do not appear! I can modprobe the i2c module but those files do not appear.

    Furthermore, the system will hang if I start a web browser or try apt-get, maybe something to with ethernet traffic? Dmesg didn’t reveal anything interesting (at least to me). Do you have any pointers on what I should do? Thanks for your great work!

  37. I have build the cross compile tool chain exactly as documented, after sorting out all the dependencies that were not documented, such as static libraries etc πŸ™‚

    When I come to run “ARCH=arm make oldconfig” using the config file from the linux-image-3.2.23-rpi1+_1_armel.deb package, I get a lot of questions that are marked as “NEW”. Assuming that both your kernel and my attempt are being build from the same source tree from GitHub, I can’t understand why the config files do not exactly match. Are we actually working with different kernel levels?

    Could you detail exactly what command sequence you are invoking to get from thet GitHub source tree to a ready to run kernel image/modules?

    • I was pulling the main Git tree and not the correct branch. Silly me. Trying again.

      However, it might still be helpful if you could give a precis of the steps required just to confirm the process and help other intrepid explorers..

      • I suppose that I should also mention that I am using Fedora 17 i386 as my cross-compile host system and Fedora 17 arm as my target. I am therefore having to unpick the Debian related details and rethink them for the environment that I am using.
        The bottom line is that all I am trying to get to is the equivalent of the the “kernel-devel” and “kernel-header” rpm package contents for your kernel version so that I can work on modules.

  38. Hi Chris,

    i want to use Raspberry Pi as LTE Router with Huawei E398 USB modem.

    Beginning with mainline kernel 3.3 there is a module “qmi_wwan” for supporting wwan (3G/LTE/?) devices using a vendor specific management protocol called Qualcomm MSM Interface (QMI).

    Do you think there is a way to get it working?

  39. Hello,
    A bit new to this, so apologies if something below does not make sense!
    The Realtek RTL8188CUS wifi chipset seemed to work ok in 3.1.9, but in 3.2.3, though detected by dmesg, it never appears in ifconfig.

    Other wifi adapters work fine, but this is nice and small (used in products like the WNA1000M) so if there was any chance of getting it working correctly that would be great.

    • I think you have to do the same as I am. Rebuild the kernel and insert the “real” Realtek drivers. It seems that there is a module in the default kernel called, If I remember correctly, rtlwifi, that just sucks up the devices but doesn’t actually work properly.

  40. Hello Chris,
    I compiled your kernel (cross and on device) and everything runs great with the exception of the omxplayer. The video starts but after a few seconds the system freezes (tryed several videos). The player works with the stock kernel. Any ideas?
    I am running on Archlinux and I2c works great

  41. Hi Chris,

    I am a beginner with both raspberry pi and linux.
    In order to use I2c on pi, I have installed your last firmware 3.2.23 on a
    2012-06-18-wheezy (updated first).
    Once rebooted, i have lost keyboard, mouse and network (eth0).
    I can only login throught ttyAMA0. Do you have a idea of my problem?

  42. hii,
    i got problem in keyboard and mouse with 3.2.23 kernel. i downloaded the kernel and configured with bcmrpi_defconfig & bcmrpi_cutdown_defconfig & copying the working .config .(3 different steps i tried)
    its booting fine ,asking password etc. thats fine but after entering into gui keyboard and mouse are not working.
    i am using latest firmware and file sysetm of debian latest which is available in rpi original wiki downloads.
    could you plz look inti my problem..
    how can i debug it?
    thank u

Comments are closed.