Author Topic: I Mounted A 2 Gig Sd Card!  (Read 215033 times)

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #75 on: July 15, 2007, 10:35:23 am »
And here's the 760/860 version.

EDIT: The same bug from the 6000 version is in this one too - hold off from using it until I get a new version out.
« Last Edit: July 16, 2007, 09:13:15 am by pelrun »
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

GoLinux

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #76 on: July 15, 2007, 08:20:24 pm »
Quote
Ok, I've attached a test module for the 6000. No guarantees this thing will even insmod properly, let alone work. It's not like I actually have a 6000 to test it on...

Remember, it's only for older-style 2G and 4G cards. SDHC cards will not work. Also, remember to rmmod the original sharp module before you try this out.

EDIT: I realised this morning there's a bug in this, it won't work (it'll probably identify 2G/4G cards as just 1G.) Will fix tonight.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164922\"][{POST_SNAPBACK}][/a][/div]

Pelrun,

I'll settle for the old SD!!!!! If you really make this work on the SL-6000 with the stock ROM and kernel, you are going to become a celebrity among Tosa owners......  

GO pelrun! And sincere thanks for attempting this. No matter the outcome, I really appreciate it.
____________________________
SL-6000L, Sharp ROM 1.12, Linux Kernel 2.4.18 with "pelrun patched" >1Gb SD driver
2Gb PNY SD
1Gb Sandisk SD
256Mb Sandisk CF
Psion 5mx
Psion 3c
D-Link DI-614+ 802.11b Access Point
Dell 4550 2.4GHz
Windows XP Home Edition (Sic.....)
MEPIS Linux 6.5.02 (YESSSSSS!!!)

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #77 on: July 16, 2007, 09:12:21 am »
Well, I fixed the silly bug from the previous modules (I got a bit too clever for my own good and omitted a bit of code which was vital... oops!) and created another couple, hopefully less buggy this time.

Still no warranty express or implied yada yada.

EDIT: There's enough independent testing below to show that these drivers work perfectly.
« Last Edit: July 22, 2007, 10:52:54 pm by pelrun »
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

ceffyl

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #78 on: July 16, 2007, 10:35:26 am »
Quote
Well, I fixed the silly bug from the previous modules (I got a bit too clever for my own good and omitted a bit of code which was vital... oops!) and created another couple, hopefully less buggy this time.

Still no warranty express or implied yada yada.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164977\"][{POST_SNAPBACK}][/a][/div]

Thank you thank you thank you thank you! I will buy a 2 gig card on my way home tonight and give it a spin... I'll let you know what happens.

Ceffyl
SL-5500 ROM 3.10
SL-6000 ROM 1.12
1 GB SD, 1 GB CF
Targus Universal IR Keyboard

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #79 on: July 16, 2007, 07:06:21 pm »
cool!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #80 on: July 16, 2007, 08:22:26 pm »
I just received my 2GB Sandisk Ultra II SD card today.  Amazon.com had the best price compared to eBay at the time that I made my order.  This little SD card flips open to provide its own USB port connector.  Preliminary testing seems to indicate that the card works with the modified driver.  I have replaced the link to the original Sharp driver with the new driver renamed as the Sharp driver.  Here is the result of running:

time nice -9 cp /mnt/card/rfc.cramfs /dev/null

real 0m39.138s
user 0m1.760s
sys 0m19.860s

rfc.cramfs is a compressed file of Internet RFC files.  The size of the rfc.cramfs file is 63,242,240 bytes, making the transfer rate approximately 3MB per second in system time, 1.6MB per second in real time.
« Last Edit: July 16, 2007, 08:51:56 pm by qx773 »

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #81 on: July 16, 2007, 08:35:38 pm »
I just did another test on my Zaurus SL-C760.

time nice -9 cp /mnt/card/rfc.cramfs /mnt/cf

real 1m6.517s
user 0m3.030s
sys 0m31.410s

My compact flash card is a 4GB Sandisk regular CF card.  That's a real-time data transfer rate of about 928KB/s.

The md5sum of the original file and the destination file matches, so they are probably identical.  

Thanks for the modified driver.  Nice work.
« Last Edit: July 16, 2007, 08:40:09 pm by qx773 »

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #82 on: July 16, 2007, 09:09:31 pm »
1) does df show the true size of the card?
2) can you still read/write files successfully when there's more than 1G on the card?

If the answer is 'yes' to both of those, then I guess we have a winner.
« Last Edit: July 16, 2007, 09:16:49 pm by pelrun »
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #83 on: July 16, 2007, 09:18:00 pm »
Yes to both so far.  I was listening to MP3 music just now from my 2GB SD card.

df reports about 1.98GB total on the card, 380MB used, 1.6GB available:

/dev/mmcda1 1983360 379680 1603680 19% /usr/mnt.rom/card

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #84 on: July 16, 2007, 09:58:57 pm »
Sorry - I mean accessing data stored after the 1GB mark on the card; with only 380MB used on your card you're testing the area we already know the sharp driver can access.

Thanks for the testing help!
« Last Edit: July 16, 2007, 11:39:55 pm by pelrun »
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #85 on: July 17, 2007, 01:47:02 am »
I copied a couple of big files, a 419MB ATI SDK and a 398MB Beyond the Red Line BattleStar Galactica free game demo, onto the Sandisk Ultra II SD card.  One thing that I accidentally learned by doing this is that Windows XP ignores the SD card's write protect tab.  That pushed the SD card contents over 1GB in size.  On the Zaurus SL-C760, I copied the files from the SD card to the CF card and am currently starting to compute their MD5SUMs.  That will take a while.  I would be more concerned about SD cards which are larger than 2GB in size in case the Sharp code uses signed 32 bit integer representations which would cause integer representations that are larger than 2,147,483,647 (2^31 - 1) to be interpreted as negative numbers.

I know that the Sharp voice recorder will falsely think that a mostly empty 4GB CF card is out of disk space, probably due to the use of signed 32 bit integer representations for checking the available space.

What technique did you use to disassemble and reassemble the object file?  I might have to do that with the Sharp voice recorder to disable its disk space check.

The MD5SUMs of the corresponding files are identical.  The computation finished as I was finishing this message.

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #86 on: July 17, 2007, 02:29:47 am »
Quote
398MB Beyond the Red Line BattleStar Galactica free game demo
I have memories of being caught in tight loops trying to get the last wretched cylon raider to just stay in my reticule in that game... aaargh! I believe my joystick is still in pieces after that (I'm partway through rewiring the cheap-ass thing to eliminate the dead zones, I didn't throw it at the wall!)

Quote
I would be more concerned about SD cards which are larger than 2GB in size in case the Sharp code uses signed 32 bit integer representations which would cause integer representations that are larger than 2,147,483,647 (2^31 - 1) to be interpreted as negative numbers.
With regards to the device driver I think this is probably quite unlikely (but testing is welcome!), your next point notwithstanding:

Quote
I know that the Sharp voice recorder will falsely think that a mostly empty 4GB CF card is out of disk space, probably due to the use of signed 32 bit integer representations for checking the available space.

What technique did you use to disassemble and reassemble the object file?  I might have to do that with the Sharp voice recorder to disable its disk space check.
objdump (part of GNU binutils) provided the disassembly; I used the version which came with the pdaXrom cross compiler. The assembly I did by hand, applying the changes with a hex editor.

I spent several hours exploring other options for larger edits, but it was not needed here.

Quote
The MD5SUMs of the corresponding files are identical.  The computation finished as I was finishing this message.
Fantastic!
« Last Edit: July 17, 2007, 02:30:20 am by pelrun »
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #87 on: July 17, 2007, 03:30:48 am »
Quote
I might have to do that with the Sharp voice recorder to disable its disk space check.
Try this.  
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #88 on: July 17, 2007, 04:44:37 am »
Quote
One thing that I accidentally learned by doing this is that Windows XP ignores the SD card's write protect tab.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165026\"][{POST_SNAPBACK}][/a][/div]

I suspect that's more likely to be the card reader not being able to detect the thing on the card, I suspect it does nothing on the card and relies on a sensor in the card reader.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

the_oak

  • Sr. Member
  • ****
  • Posts: 426
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #89 on: July 17, 2007, 03:48:25 pm »
Just replaced /lib/modules/2.4.18-rmk7-pxa3-embedix/
kernel/drivers/block/sharp_mmcsd_m.o with this module (after saving old driver as sharp_mmcsd_m_old.o) and rebooted. Put in a 2 GB SD card formatted fat16, with 1.9 GB of movies. Movies play fine!!

df reports:

1960064 KB as size of SD card with
1932960 in use and
27104 available  (99% in use)

Next would like to try re-formatting as ext2.  

Looks great!! Thanks!!!!!!!!!!!!!!!!!!!!!!!
« Last Edit: July 17, 2007, 03:49:11 pm by the_oak »
SL-6000L running Sharp 1.12 rom, (SOLD)
Fujitsu U820 with Windows 7
White Intel MacBook