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.
- Download the latest stable Kernel form kernel.org (full source) and safe it to /usr/src
- Download all three patches from the mailinglist (the current version is 0.10) to e.g. /usr/src/patch
- We need at least the packages build_essential, kernel_package and libncurses5-dev, so apt-get install them
- Now cd to /usr/src and untar the Kernel source
tar -xjvf linux-220.127.116.11.tar.bz2
and cd to the new directory linux-18.104.22.168
- 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
- To make it easier, we copy the current Kernel config and hope, that everything works fine:
cp /boot/config-`uname -r` .config
- Now we have to configure our new Kernel:
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.
- 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.
- We now have some .deb files in /usr/src that we can use as usual:
dpkg -i kernel-image-22.214.171.124_sdcard_i386.deb
- Now we are ready for a reboot (select the new Kernel in GRUB).
- 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.