SD-card reader and Ubuntu Linux

I finally managed to get the built-in SD-card reader in my DELL Inspiron 6000 working and this should work for most other built-in card readers, too.

Before I start with the how-to, big thanks to the developers of the Secure Digital Host Controller Interface driver and Mark Lindeman, who’s instructions were very helpful.The Kernel patch provided by the SDHCI team somehow doesn’t work with the Ubuntu default Kernel (or at least I didn’t managed to get it working), so we have to use the vanilla Kernel. You should be root (type sudo -s) for most of the steps.

  1. Download the latest stable Kernel form (full source) and safe it to /usr/src
  2. Download all three patches from the mailinglist (the current version is 0.10) to e.g. /usr/src/patch
  3. We need at least the packages build_essential, kernel_package and libncurses5-dev, so apt-get install them
  4. Now cd to /usr/src and untar the Kernel source

    tar -xjvf linux-

    and cd to the new directory linux-

  5. It’s time to apply the three patches we downloaded from the mailinglist:

    patch -p1 < ../patch/sdhci-0001.bin patch -p1 < ../patch/pci-sdhc-0001.bin patch -p1 < ../patch/mmc-respopcode-0001.bin

  6. To make it easier, we copy the current Kernel config and hope, that everything works fine:

    cp /boot/config-`uname -r` .config

  7. Now we have to configure our new Kernel:

    make menuconfig

    Go to Device Drivers -> MMC/SD Card Support and enable (press y) atleast MMC support, MMC block device driver and Secure Digital Host Controller Interface support (EXPERIMENTAL). It might be a good idea to also configure the other new features, but probably it will work without.

  8. Time to build our new Kernel (with vanilla taste):

    make-kpkg –initrd –revision sdcard binary

    This will take some time, so drink 42 coffees or something like that.

  9. We now have some .deb files in /usr/src that we can use as usual:

    dpkg -i kernel-image-

  10. Now we are ready for a reboot (select the new Kernel in GRUB).
  11. I simply inserted a SD-card in a slot and had a look at the output of dmesg and mounted the device listend there using -t vfat.

Please keep in mind that building a vanilla kernel is very complex and not a good idea if you don’t now, what you’re exactly doing. The vanilla kernel also might miss some features that are patched in the Ubuntu default kernel, so you could get problems with some hardware.

1 Comment

  1. » [Ubuntu Dapper ] SD Card reader for Acer aspire 5102 -

Comments are closed.