Installing sd card driver for WRT54GL with OpenWRT White Russian

preparing the sd card

We need to get a reasonable filesystem on the sd card. It is possible to format the sd card with the router, but it's easier to use a computer. Boot a linux (if you're a windows user download Knoppix, or some other linux Live-CD, burn it to a cd and boot your computer with it. Connect a card reader to your computer, put the sd card that will be used in the WRT54GL into the card reader, change to a shell and execute: mkfs.ext2 /dev/sda1
Please make sure that you specify the right device. If you are not sure whether /dev/sda1 is the right one, use the commands mount and df -h to find out which name your sd card has.
Or just use a graphical application to format the sd card, for example qtparted.




install the sc card drivers

Get a ssh connection to the WRT54GL and type:
cd /lib/modules/2.4.30                                              Change to the modules directory
wget http://programmingstuff.free.fr/files/openwrt/whiterussian/mmc/1_3_4/gpio2/mmc.o                Downlaod the driver for the sd card
ipkg update                                                             update the package list
ipkg install kmod-ext2                                              installation of the needed package for using the ext2 filesystem
insmod ext2                                                             activate the module ext2
mkdir /mmc                                                             create the directory /mmc
echo "0x9c" > /proc/diag/gpiomask                         don't know but it's important
insmod mmc                                                            activate the module mmc (sd card driver)
mount /dev/mmc/disc0/part1 /mmc                         mount the sd card to /mmc
wifi                                                                           don't know

Now your sd card is part of the memory of the WRT54GL.




automatically mounting the sd card to /mmc each reboot

One way is to copy
/etc/init.d/S51mmc

to your router and make it executeable:
chmod +x /etc/init.d/S51mmc

or you want to mount the sd card to /. There are several advantages that are discussed in the chapter after next. If you decide to mount to / DO NOT USE the script /etc/init.d/S51mmc !




We want to know: How fast is our sd card?