Slightly updated RPi kernel

I’ve updated my Raspberry Pi 3.2.18 kernel with some patches and slight configuration changes since the last one:

  • The USB code is now built-in instead of being a module. This means that people who want to keep their root filesystem on a USB hard disk or similar can do so.
  • Some fixes for my I2C driver that prevent it reading/writing further than it should have. This caused at least one user to experience a kernel panic.

I have not yet reverted the MMC/SD commit that I suspect is causing many people issues. So far I have had only one conclusive report that it has helped. If you have had trouble with an SD card in my kernel but not in the official kernel and have the opportunity to build a kernel with commit 84045e4 reverted, please let me know the outcome.

Update: This is no longer the most current kernel. You can find the latest version on my Raspberry Pi kernel project page.

32 thoughts on “Slightly updated RPi kernel

  1. Pingback: Chris's Digital Realm » Another new RPi kernel (3.2.18)

  2. Hi,

    maybe you remember, i had the mmc problem too on OpenELEC. Reverting 84045e4 helps to solve this problem. Other then that it seems 3.2.18 has a much faster transferrate on SDcards:

    Kernel 3.1.10:
    root ~ # sync; rm testing; sync; time ( dd if=/dev/zero of=testing bs=16k
    count=10000; sync)
    10000+0 records in
    10000+0 records out
    163840000 bytes (156.3MB) copied, 38.149376 seconds, 4.1MB/s

    real 0m39.139s
    user 0m0.060s
    sys 0m3.420s

    Kernel 3.2.18:
    root ~ # sync; rm testing; sync; time ( dd if=/dev/zero of=testing bs=16k
    count=10000; sync)
    10000+0 records in
    10000+0 records out
    163840000 bytes (156.3MB) copied, 21.412055 seconds, 7.3MB/s

    real 0m23.431s
    user 0m0.060s
    sys 0m3.440s


  3. Thanks for all your work on this. I was able to get it working without too much trouble, even though it’s been years since I’ve done any Linux hacking. I was confused for a short bit because I originally built the kernel without the CONFIG_I2C_CHARDEV option and thus wasn’t enabling the i2c-dev driver so the /dev/i2c-0 & i2c-1 devices did not exist.


  4. yesterday I have upgraded my debian squeeze (via apt-get upgrade) to newest release and I have used your kernel with i2c support. But my pi couldn’t boot anymore.

    How can I install i2c and spi driver support ?


  5. Downloaded package and installed using dpkg -i, there were a couple of errors but it seems to have completed successfully. I can see new files in /boot but how do I select which kernel is used…?


    • Depends which image you’re using, but if it’s the official image: copy /boot/vmlinuz-3.2.18-rpi1+ to /boot/kernel.img. Make sure you have the latest firmware files (start.elf et al).

  6. I’m looking at creating a kernel for Raspbian my merging your 3.2.18 kernel and the Debian Wheezy 3.2.18 kernel. As an experiment I tried a the very simplistic approach of applying the Debian kernel patches over your version of the kernel. Unfortunately, it seems there are just too many places where both versions of the kernel have modified the same kernel source files. Thus a great many of the patches fail. This is probably to be expected, but it was worth a try.

    Any ideas on ways to approach this problem? I guess I’ll need to settle on the RPi kernel without Debian patches applied.

    • I’d say probably all of the conflicts are due to the Debian kernel including the 3.2.0=>3.2.18 patches, as my branch does. If you really wanted the Debian patches, you could try to rebase my kernel against 3.2.0.

  7. Hi Chris, thanks so much for your efforts on this. I’ve got your image running with the latest firmware and have moved /usr, /var and /home to dedicated filesystems on a USB-attached SSD. My attempts to move the rootfs have been less successful. Is this likely to be because the SATA Bridge (CONFIG_USB_STORAGE_CYPRESS_ATACB) isn’t compiled into the kernel?

    • If your SATA bridge chip requires those modules then yes, it’s likely that’s why you can’t get it to boot.

  8. Thanks for the clarification Chris. Time to try out your cross-compilation instructions! 🙂

  9. Hi,
    I have downloaded and installed this with dpkg -i and copied vmlinuz… to /boot/kernel.img and i am not seeing any i2c ports when i look in /dev/*

    My assumption was that somewhere in /dev/* there should be something like /dev/i2c-0 or something or am i looking in the wrong place?

    Thankyou for your help in advance.

  10. Thank you for your prompt reply, as it happens i worked this out about 40 seconds after posting while looking in a thread on the rpi forum (i must read more carefully before posting *is a fool*). I can see them and am now about to start on some code and will let you know how things go.

    Thankyou for your hard work on this.

  11. Hi again, sorry to be a pest. Is SLC bus hold implemented in the i2c drivers?


  12. I tried this 3.2.18 kernel and it wouldn’t boot with either the 192MB or 224 MB firmware. I’m using a PNY “Premium” 4GB sdhc (class 4) card.

  13. I just tried it with the 128MB firmware, and it didn’t boot either (only the PWR LED lit up).

    I assume these are the newest firmware as they’re from the debian6-19-04-2012 torrent.

  14. Ah, I don’t know how I missed that.

    I’m trying to use Hexxeh’s firmware updating tool, but I’m getting some git errors (fatal: The remote end hung up unexpectedly). I’ll let you know how it works once I can get an updated copy of the firmware.


  15. Excellent, with the upgraded firmware and modprobe’ing i2c-dev, I now have spidev0.0/1 and i2c-0/1! Thanks for the work on getting this kernel working.

  16. Hi Chris, I have an SD card that works OK with the current ‘standard’ kernel (as at today’s “Rebuild with updated (more debug) kernel” commit), but which gives “error -110 whilst initialising SD card”. Are you still interested in someone trying a kernel build with 84045e4 reverted?

  17. Hi Chris,
    Just wanted to say thanks to you, Frank Buss, et al for the wonderful work on the I2C driver and MMC updates, esp. in your 3.2.19 kernel. I’ve rebuilt your source and also got my PCF8523 RTC working. Great work, and thanks again!

  18. hi,
    Your Kernel works fine.

    But i need the staging driver “RealTek RTL8712U (RTL8192SU) Wireless LAN NIC driver” for my Wifi-Dongle.

    My first try, to compile a driver as kernel-module failed.

    I use ubuntu 12.04 and the cross compile “gcc-4.6-arm-linux-gnueabi” from Repository

    My steps:
    git clone
    cd linux
    git checkout remotes/origin/rpi-3.2.18
    cp $rpi$/boot/config-3.2.18-rpi1+ .config
    make ARCH=arm menuconfig
    – and add the driver as module
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules
    cp drivers/staging/rtl8712/r8712u.ko $rpi$/lib/modules/3.2.18-rpi1+/kernel/net/wireless

    When i make modprobe r8712u
    i get “Invalid module format”

    possibly because the version name in my modules is “3.2.18”, but the kernel has “3.2.18-rpi1+” ?

    My second try
    to compile the complete kernel dosn’t work.
    i save my vmlinux as kernel.img, but the RPI dosen’t boot.

    How do you create deb packages?

    • The Ubuntu ARM compiler is compiled for ARMv7 and is likely not to work properly for the Raspberry Pi. This could be obvious breakage or subtle things going wrong in unexpected ways.

      I use kernel-package to generate the deb files, though the version currently available in Debian wheezy is broken so I have patched up my own one. No idea if the Ubuntu one works.

      I’ll include that module in a new revision of my 3.2.19 kernel which I haven’t posted about yet, but hope to this evening.

  19. Hi Chris,

    The Ubuntu ARM compiler is compiled for ARMv7 and is likely not to work properly for the Raspberry Pi. This could be obvious breakage or subtle things going wrong in unexpected ways.

    Ulp! I’ve been using Ubuntu 12.04 gcc-4.6-arm-linux-gnueabi to cross-compile all along and they work OK. But are there any special switches I could/should consider using to avoid future issues?

  20. I have had troubles with 2 different SD cards when testing Chris’ kernels up to 3.2.20 – cards worked perfectly when using the standard Raspi kernel (3.1.9). Cards are:
    – SanDisk, 4GB microSDHC, Class2
    – Samsung, 16GB microSDHC, Class10
    After switching to Chris’ kernel 3.2.17 and reverting drivers/mmc/host/sdhci-bcm2708.c to 9ffcbeda1f8125de65d8325b6afa7d75439d7db9 it works again with both cards.

    • Is that including 3.2.20 or is it OK in this kernel? This version has many improvements to the SD code which means it should work well now.

  21. unfortunately including 3.2.20 on at least Samsung SDHC (my preferred card). Actually my strategy was to start with the latest kernel and then stepping back and finally 3.2.17 with my simple approach was the 1st one which could at least boot.
    However, I am still doing tests on that Samsung card as I still encountered some problems i.e. corruption of SD card (2nd partition’s fs could not get identified when system got shut down/power off and booted again)
    Let me do some further tests before I return with a more conclusive report (as I just started on that topic)

  22. Now my system is able to boot from Samsung 16GB SDHC w/o any further problems.
    It seems that my firmware in /boot (which was version 2012-06-13) was not sufficiently up-to-date => finally I had to switch to version 2012-06-17 to get it working.
    mea culpa => I had forgotten to update my firmware repository when 3.2.20 was released on 2012-06-17

Comments are closed.