SD flash reader of the Dell X300 works in linux
Translation of the original in Catalan. Read it in: CatalàCastellano
Finally, after more than two years with the Dell X300 without being able to use the SD unit it has built in, today I have managed to configure it. In fact, the support is still very 'beta' and the kernel module has not been around for long, but at least for reading the contents of the photos I have taken with the camera it is good enough.
I am going to try to explain the situation a little, so let's go step by step. As people who have a Dell X300 know, when you run lspci we see this:
...
02:03.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
02:03.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
...
So we deduce that this cardbus bridge (PCMCIA) is what actually holds the SD flash card reader. So, first of all we need to have PCMCIA support compiled into the Kernel and then we can download the kernel module. I recommend you download directly from the SVN because that way you will have it patched for the latest kernels; right now I am using 2.6.21.
To download the latest version of the Ricoh driver, then compile it and install it:
svn co https://sdricohcs.svn.sourceforge.net/svnroot/sdricohcs sdricohcs
cd sdricohcs
cd sdricoh_cs
make
make install
Now we already have the new driver installed in the kernel modules directory: sdricoh_cs. So, we can now load it together with the mmc_block module. A complete list of the related modules so that it works for you:
Module Size Used by
mmc_block 6408 2
sdricoh_cs 7180 0
mmc_core 20244 2 mmc_block,sdricoh_cs
pcmcia 28204 2 sdricoh_cs
yenta_socket 21260 4
rsrc_nonstatic 9856 1 yenta_socket
pcmcia_core 29712 4 ide_cs,pcmcia,yenta_socket,rsrc_nonstatic
Now if we insert a partitioned and formatted SD card, inside the /dev directory we have these new devices:
/dev/mmcblk0
/dev/mmcblk0p1
The second one refers to the partition, so we can use it to mount the SD card directly:
# mkdir /mnt/sd
# mount /dev/mmcblk0p1 /mnt/sd
If you do not specify any parameter when loading the sdricoh_cs kernel module, the card will be mounted read-only because mounting it for writing is considered dangerous, due to the unstable state of the driver. If you want to mount it for writing, add the write=1 parameter too; I have not tried it because I am happy being able to read, even if a bit slowly, the contents of the card. If you want more detailed information about all this, I recommend reading the README file that comes with the driver source code.
For more information:
-
Ricoh driver on Sourceforge
-
HOWTO SD and MMC card readers on Gentoo Wiki
-
Cardreader With Udev browse if you want the flash cards to automount when you connect them