MMC Mod only working with 64MB cards

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2, 3  Next
Author Message
That Guy
DD-WRT Novice


Joined: 09 May 2008
Posts: 11

PostPosted: Sun Jul 20, 2008 20:30    Post subject: MMC Mod only working with 64MB cards Reply with quote
DEVICE: Linksys WRT54g-TM (only one model)

BUILD: DD-WRT v24 (05/24/08 ) mega - build 9526

I'm trying to use SD cards on my router that are bigger than 64MB, but so far it is not working. I have tried using a Kingston 1GB micro SD card, an ADATA 150X 2GB SD card, and a Sandisk 2GB micro SD card, but the router has failed trying to use all 3. The only card that I have managed to get working is my 64 MB Kingmax micro SD card. I have tried preformatting all of the SD cards to the ext2 file system using both paragon partition manager and the Ubuntu Linux partition manager, but the router still does'nt report the SD card space available.

I have tried running the following commands while telneting with the 1 and 2GB cards in the router:

rmmod mmc
insmod mmc
mke2fs /dev/mmc/disc0/part1
mount -t ext2 /dev/mmc/disc0/part1 /mmc


To keep this post short, I will call this list of commands "mmc fix".


--With the 1GB Kingston microSD completely formatted with ext2 primary partition:


After running mmc fix, I run dmesg and get the following error:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: this board has no MMC mod installed!
mmc: error in mmc_init (-1)
....
....
mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: can't get major 121


And when I reboot, I get the following after typing dmesg while telneting:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: this board has no MMC mod installed!
mmc: error in mmc_init (-1)


--With the 1GB Kingston microSD formatted with 63MB ext2 primary partition:

After running mmc fix, I run dmesg and get the following error:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: error in mmc_card_config (2)
mmc: error in mmc_init (-1)
....
....
mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: can't get major 121


And when I reboot, I get the following after typing dmesg while telneting:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: error in mmc_card_config (2)
mmc: error in mmc_init (-1)


--With the 2GB ADATA SD completely formatted with ext2 primary partition:
(The exact same thing happens when it is formatted with a 123 and 124MB partition).


After running mmc fix, I run dmesg and get the following error:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: this board has no MMC mod installed!
mmc: error in mmc_init (-1)
....
....
mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: can't get major 121


And when I reboot, I get the following after typing dmesg while telneting:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: this board has no MMC mod installed!
mmc: error in mmc_init (-1)


--With the 2GB Sandisk micro SD completely formatted with ext2 primary partition:

After running mmc fix, I run dmesg and get the following error:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: this board has no MMC mod installed!
mmc: error in mmc_init (-1)
....
....
mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: can't get major 121


And when I reboot, I get the following after typing dmesg while telneting:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: this board has no MMC mod installed!
mmc: error in mmc_init (-1)


--With the 2GB Sandisk micro SD formatted with 124MB ext2 primary partition:

After running mmc fix, I run dmesg and get the following error:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: error in mmc_card_config (2)
mmc: error in mmc_init (-1)
....
....
mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: can't get major 121


And when I reboot, I get the following after typing dmesg while telneting:

mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
mmc: error in mmc_card_config (2)
mmc: error in mmc_init (-1)




For some reason, if I use the equation (0.064220183 X SD card's maximum partition size) and use the result as the SD card's ext2 partition, when I insert the card into the router, reboot, and then telnet into the router and run dmesg, it seems to return "error in mmc_card_config (2)" instead of "this board has no MMC mod installed!" (doesn't work for ADATA card). Does anyone know why this happens? Also, what do the error messages mean and how can I fix them? I'm sure there must be some way to get these cards to work correctly (I see people on eBay selling routers preconfigured with similar cards), I just dont know how to do it.

The router is running in AP mode, but will that affect whether it works or not?
Thanks in advance to all who take the time to read and/or respond to my post!
Sponsor
grantch
DD-WRT Novice


Joined: 17 Dec 2008
Posts: 10

PostPosted: Wed Dec 17, 2008 22:19    Post subject: Reply with quote
There was some discussion of this in another post. It is possibly a power supply current problem. I have seen the same effects and I have a 1 Amp supply. I am going to try an adapter that can supply more current if I can find one at home. I currently have a 32MB working but it won't see my 2GB

Grantch
anonymous123
DD-WRT User


Joined: 20 Feb 2008
Posts: 120

PostPosted: Thu Dec 18, 2008 21:29    Post subject: Reply with quote
I have a Kingston 2GB microSD card (with the SD adapter) attached to my modded WRT54GL (flashed with "DD-WRT v24-sp2 ( 11/30/08 ) std-nokaid - build 11028M NEWD Eko"), I enabled MMC support in management page and selected auto GPIO detection but the mmc.o module included with dd-wrt not functioned, the router keeps rebooting after formatting (automatically) the card in the startup. I have tried (with MMC support disabled in management page, and uploading the optimized mmc.o to /tmp and executed 'insmod /tmp/mmc.o') the optimized mmc.o module and voila!, the SD card works without issues. Search in google "optimized mmc driver" without the quotes. I attach some output pics (dmesg, df and MMC section of webgui) .


dmesg.jpg
 Description:
dmesg output showing the successful initialization of the SD card. If the ext2 partition was uncleanly unmounted, will appear a warning that suggests run e2fsck in the partition.
 Filesize:  182.19 KB
 Viewed:  17044 Time(s)

dmesg.jpg



webgui.jpg
 Description:
webgui main page showing the status of SD/MMC mounted card (in megabytes). Note that if your SD/MMC mod is not working properly and you enabled before the MMC support in management page, the status shows "2816 KB/ 0 KB"
 Filesize:  148.55 KB
 Viewed:  17044 Time(s)

webgui.jpg



df.jpg
 Description:
df output with the SD card mounted ( look for '/dev/mmc/disc0/part1' )
 Filesize:  85.72 KB
 Viewed:  17045 Time(s)

df.jpg


wallycarlson
DD-WRT Novice


Joined: 22 Dec 2008
Posts: 9

PostPosted: Sun Jan 18, 2009 19:27    Post subject: Could not complete mke2fs. with sd mod. Reply with quote
Never said done with mke2fs. The connection stopped.


Currently mega - build 11218M NEWD Eko

Here is the screen dump prior to loss of connection.

---------------------

root@DD-WRT-IP-BASE:~# insmod /tmp/mmc.o
root@DD-WRT-IP-BASE:~# mke2fs /dev/mmc/disc0/part1
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
124160 inodes, 247936 blocks
12396 blocks (5.00%) reserved for the super user
First data block=0
8 block groups
32768 blocks per group, 32768 fragments per group
15520 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Writing inode tables: done
Writing superblocks and filesystem accounting information:
--------------------------------
moreins
DD-WRT User


Joined: 18 Nov 2006
Posts: 320
Location: Cali, Colombia

PostPosted: Thu Jun 25, 2009 6:25    Post subject: Reply with quote
anonymous123 wrote:
I have a Kingston 2GB microSD card (with the SD adapter) attached to my modded WRT54GL (flashed with "DD-WRT v24-sp2 ( 11/30/08 ) std-nokaid - build 11028M NEWD Eko"), I enabled MMC support in management page and selected auto GPIO detection but the mmc.o module included with dd-wrt not functioned, the router keeps rebooting after formatting (automatically) the card in the startup. I have tried (with MMC support disabled in management page, and uploading the optimized mmc.o to /tmp and executed 'insmod /tmp/mmc.o') the optimized mmc.o module and voila!, the SD card works without issues. Search in google "optimized mmc driver" without the quotes. I attach some output pics (dmesg, df and MMC section of webgui) .


thanks for your info. i have a couple questions:

*before running the optimized mmc.o (insmod /tmp/mmc.o), do i need to disable MMC/SD Card Support at web gui?? if so, how can i see MMC status on web gui??

*i believe that running insmod /tmp/mmc.o will work only once. but if the router reboots, ill have to run it again...how can i put this as a startup command??

thanks!

_________________
WRT54GS v2.1 > v24-sp2 (01/01/09) mega
WRT54GS v5 > v24-sp2 (01/01/09) micro
PPTP, WDS link and SD Mod
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Thu Jun 25, 2009 11:30    Post subject: Reply with quote
First thing I would do is read these

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=52043

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486

_________________
The New Me
moreins
DD-WRT User


Joined: 18 Nov 2006
Posts: 320
Location: Cali, Colombia

PostPosted: Thu Jun 25, 2009 21:37    Post subject: Reply with quote
DHC_DarkShadow wrote:
First thing I would do is read these

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=52043

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486

dude, what are you talking about?
do you thing the Peacock thread will help with a sd mod???????
if you are gonna help here, dont point me to threads we already know and that dont solve these kind of issues we're talking here.

_________________
WRT54GS v2.1 > v24-sp2 (01/01/09) mega
WRT54GS v5 > v24-sp2 (01/01/09) micro
PPTP, WDS link and SD Mod
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Thu Jun 25, 2009 22:28    Post subject: Re: MMC Mod only working with 64MB cards Reply with quote
[quote="That Guy"]DEVICE: Linksys WRT54g-TM (only one model)

BUILD: DD-WRT v24 (05/24/08 ) mega - build 9526

First Thread: "Updated-Please update from V24 or V24-SP1 to a newer build"

And second I merely stated "what I would do"

_________________
The New Me
moreins
DD-WRT User


Joined: 18 Nov 2006
Posts: 320
Location: Cali, Colombia

PostPosted: Thu Jun 25, 2009 22:48    Post subject: Re: MMC Mod only working with 64MB cards Reply with quote
DHC_DarkShadow wrote:

And second I merely stated "what I would do"

well, you youre wrong about that. peacock thread has nothing to do with SD/MMC mods...its just a troubleshooting guide and basic stuff.

@anonymous123: hope you can help me with my questions above.

_________________
WRT54GS v2.1 > v24-sp2 (01/01/09) mega
WRT54GS v5 > v24-sp2 (01/01/09) micro
PPTP, WDS link and SD Mod


Last edited by moreins on Thu Jun 25, 2009 22:56; edited 1 time in total
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Thu Jun 25, 2009 22:54    Post subject: Reply with quote
What build are you running?
_________________
The New Me
turrmoil1
DD-WRT Novice


Joined: 08 Sep 2009
Posts: 23

PostPosted: Tue Sep 08, 2009 7:20    Post subject: SD Card Mod Issue Reply with quote
Hi I went through all the steps of the SD Card MMC Mod but am stuck.

I am running v24 SP2 released in June 2009.

Here are the steps I went through:
(1) Modded the hardware using GPIO2
(2) Did continuity check
(3) Test with enable disable script for GPIO 2, 3, 7
(4) Downloaded modified MMC ".O" file from:
https://forum.openwrt.org/viewtopic.php?id=9653

(5) Put it in tmp folder
(6) Ran the commands:
root@DD-WRT:~# insmod fat
root@DD-WRT:~# insmod vfat
root@DD-WRT:~# insmod /tmp/mmc
dmesg|tail

Below is the response I get from dmesg:
mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
Work around for large cards >= 1gb !
Attention : Card reports to have a block_len of 1024 bytes, cutting down to 2 x 512 bytes !
Size = 1921024, hardsectsize = 512, sectors = 3842048
Partition check:
mmca: p1

I have a 2GB Kingston SD Card. I could not find a 1GB SD Card in the market hence this was my only choice.
I did have a 4GB and an 8GB SD Card but those wouldn't even go this far!!

At this point the AMBER LED is solid.

After the above steps I am trying to format the card but that is causing problems. The router has a white led (GPIO 2) which starts to flicker when i try to format the SD Card using the command:
mke2fs /dev/mmc/disc0/part1

The putty screen on which I enter this command freezes at "Writing iNode Tables" 8/15.

The router goes into a reboot frenzy and keeps doing that for about 15 minutes.

At the end it comes back on but has no SD Card remembereance!!

Obviously as a result since formatting never got completed i never get to mount the card!!

What am I doing wrong? Any help is really appreciated.

THANKS.
turrmoil1
DD-WRT Novice


Joined: 08 Sep 2009
Posts: 23

PostPosted: Wed Sep 09, 2009 14:38    Post subject: Reply with quote
UPdate:
I finally formatted the card using the GParted live disc found here... http://gparted.sourceforge.net/download.php

After I formatted I was able to mount my 2GB card using the mmc.o file found here:
https://forum.openwrt.org/viewtopic.php?id=9653

BUT NOW I AM STUCK AGAIN!!!

I am trying to find a way to load the mmc.o file at router bootup but the directory where I am trying to copy this new file is read-only!!! Any ideas, how can I proceed further?

I am using the instructions at the link below to get this working:
http://home.versatel.nl/janssenmaj/mmc-sd-mod.html

It works in the temporary setup but doesnot work in the section where it says make permanent specially where it says create fstab file etc. That's where I get the read-only file error. I tried to do chmod etc. but that didn't help. The file previlidge is 755 instead of 777 for fstab!!

PLEASE HELP!!
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1593

PostPosted: Wed Sep 09, 2009 15:01    Post subject: Reply with quote
There are two ways to go about this.

The first way would be put the module you need on a server (online or local) and create a startup script that downloads and executes the proper modprobe command.

The second way and what I would do is use the firmware mod kit to add the needed module to your firmware.

There may be other ways.

_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
turrmoil1
DD-WRT Novice


Joined: 08 Sep 2009
Posts: 23

PostPosted: Wed Sep 09, 2009 15:39    Post subject: Reply with quote
autobot wrote:
There are two ways to go about this.

The first way would be put the module you need on a server (online or local) and create a startup script that downloads and executes the proper modprobe command.

The second way and what I would do is use the firmware mod kit to add the needed module to your firmware.

There may be other ways.


THANKS AUTOBOT.

I am planning to use the firmware mod route. Here's where I found it...
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=2844&postdays=0&postorder=asc&start=195

Is this the right one to use? I read in the quoted thread that the firmware mod kit found at http://www.bitsum.com/firmware_mod_kit.htm
causes problems with v24 version of ddwrt which is what I am using (v24 sp2)
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1593

PostPosted: Wed Sep 09, 2009 15:48    Post subject: Reply with quote
I use the one from here.
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
Goto page 1, 2, 3  Next Display posts from previous:    Page 1 of 3
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum