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

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
I Mounted A 2 Gig Sd Card!
« Reply #30 on: January 29, 2006, 08:09:54 am »
Quote
- Interesting.  This implies just anyone with the right know-how could replace the sharp sd card driver and enable larger SD card usage, and perhaps SDIO-like capability.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=112821\"][{POST_SNAPBACK}][/a][/div]

the pdaxrom team (sashz in particular i think) has developed a driver to allow SD cards > 1GB to be used on clamshell models which is currently being tested. if we ask nicely, he might compile it for sharp rom too.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #31 on: February 01, 2006, 07:24:47 pm »
Has anyone got this working for the Cxx00 series Zaurus's (Zaurii) yet?

I'm looking into buying my first SD in the next week and I dont want to buy a 1gig and 2.. 3... and 4gig become the new "thing" right after my purchase... I dont want multiple cards because once the sd goes in... it prolly wont come back out unless I need to copy a large file from/to it using my pc... since I will be running my swap space from it...

Thanks
A Crutch
« Last Edit: February 01, 2006, 07:26:28 pm by InSearchOf »
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

bimbo

  • Newbie
  • *
  • Posts: 4
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #32 on: February 11, 2006, 03:43:26 pm »
Quote
Anyway, if you want to repeat my experiment, just download and install this ipk, and reboot the Zaurus:

hi, I got the sdlink package, install it and can manually mount my sdcards.
One thing I found, is that the `sdiomgr` tries to mount /mnt/card wich fails on my C860.
I can only mount on the /usr/mnt.rom/card since /mnt/card is a symlink.
My SanDisk wlan-sdcard is not recognized at all.

Is there any chance to get a 4GB sdcard from Transcend working?
I use the original sharp rom for my zaurus.

by bimbo

bimbo

  • Newbie
  • *
  • Posts: 4
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #33 on: February 15, 2006, 06:03:14 pm »
Quote
Thanks C-Guys!

I was poking around the driver for their WiFi card to investigate something.  Then, I realized that they
[...]
Anyway, if you want to repeat my experiment, just download and install this ipk ...

I does it. A 4GB Trancent sdcard work in a C860 with stock rom using the sd-link package.
It's great!

Quote
2) vfat filesystems are fine.  I had some problems with ext2.  I fixed it by reformatting my card with "mke2fs -b 1024 /dev/mmcda1".  This driver doesn't seem to like block sizes > 1024.

The zaurus format the partition, but cannot mount it, because it does not change the fragment size for partitions larger than 512 MB. I format the card in a reader at my desktop, even with
"mke2fs -b 1024" and I end up with nearly 3.8GB real space in my zaurus. The blocksize parameter is important, else the fragment size is set to 4096.

There is only one point: the `sdiomgr` does not check whether or not any process is using the filesystem before it tries to "umount" it, like the "/etc/sdcontrol" does. For that, i.e. if mysql runs, the `umount` fails, resulting in a garbeled filesystem. I will merge these scripts next days, and if anybody needs, I can post it.

HAND

corecoder

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://patternsemerge.home.mindspring.com
I Mounted A 2 Gig Sd Card!
« Reply #34 on: February 16, 2006, 08:14:18 am »
Does the filesystem get garbled on suspend?

Thats the prob I had. If your scripts help that, please post. I tried all kinds of things.
 There was a post about the line with all the mount options, but I didn't see them in the sdiomgr script. All I saw was the line with uid and gid options.
SL-C860 Original Sharp ROM (Flash back and forth wit RC5)/Pocket Workstation
4gb/1gb/340mb MicroDrives
1gb/512/256 SD cards
CampactLAN
Ambicom wireless LAN
Pretec Bluetooth
Ambicom Modem
PocketTop IR keyboard
2X-5500 Orginal ROM/OZ3.5.1

bimbo

  • Newbie
  • *
  • Posts: 4
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #35 on: February 16, 2006, 04:33:34 pm »
Quote
Does the filesystem get garbled on suspend?

Thats the prob I had. If your scripts help that, please post. I tried all kinds of things.
 There was a post about the line with all the mount options, but I didn't see them in the sdiomgr script. All I saw was the line with uid and gid options.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114998\"][{POST_SNAPBACK}][/a][/div]

that't the line in question.

first, try it manually:

after resume have a shell an be root. try

8<--
$ umount /usr/mnt.rom/card
$ mount /dev/mmcda1 /usr/mnt.rom/card
$ ls /usr/mnt.rom/card/*
8<--

everything o.k.?
(sorry, I've not yet completed the script for generic use. give me the weekend)

bimbo

  • Newbie
  • *
  • Posts: 4
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #36 on: February 23, 2006, 06:30:00 pm »
Quote
Does the filesystem get garbled on suspend?

Thats the prob I had. If your scripts help that, please post. I tried all kinds of things.
 There was a post about the line with all the mount options, but I didn't see them in the sdiomgr script. All I saw was the line with uid and gid options.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114998\"][{POST_SNAPBACK}][/a][/div]

I'm so very sorry for the long time ...

It's rather simple: just call the original /etc/sdcontrol from within the sdiomgr and everything is fine.
I added some lines to see whats happen, simply touch /tmp/sd to set it active.

this is the complete script, that works for me since 1 week.
HAND

because I can't upload the script (no permissions) I paste it below:
8<--
#!/bin/sh
#
#   Copyright © 2004 By C-guys, Inc.
#   1-6-3, Roppongi, Minato-ku, Tokyo Japan
#
#   This software is protected by the law and the agreement concerning
#   a Japanese country copyright method, an international agreement,
#   and other intellectual property right and may be used and copied
#   only in accordance with the terms of such license and with the inclusion
#   of the above copyright notice.
#
#   This software or any other copies thereof may not be provided
#   or otherwise made available to any other person.  No title to
#   and ownership of the software is hereby transferred.
#
#   The information in this software is subject to change without
#   notice and should not be construed as a commitment by C-guys, Inc.
#
#****************************************************************************

export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/home/QtPalmtop/bin
DEV=/dev/mmcda1
MNT=/usr/mnt.rom/card
SDCONTROL=/etc/sdcontrol

BUSTYPE=$1
EVENT=$2

INSTALL_DIR=/home/root/Settings/sd-link11b/res

LOGFILE=/tmp/sd
if [ -f $LOGFILE ]; then

cat >> $LOGFILE << EOF
----------

this is $0

BUSTYPE = $BUSTYPE
EVENT = $EVENT
 
current environment:
EOF
env >> $LOGFILE

fi

if [ "x"$BUSTYPE != "xsdcard" ]; then exit 0; fi

if [ "x"$BUS  = "x" ]; then exit 0; fi
if [ "x"$SLOT = "x" ]; then exit 0; fi

case "x"$EVENT in
xattach)
   if [ "x"$HAVE_SDMEMORY != "x" ]; then
     if [ "x"$BUS":"$SLOT = "x0:0" ]; then

        #do_umount
        #umount $MNT
        #mount -o uid=500,gid=500 $DEV $MNT

        # for zaurus SL-Cxxx series
        $SDCONTROL compeject
        $SDCONTROL insert
     fi
   fi

   if [ "x"$HAVE_SDIO != "x" ]; then
     if [ "y"$VENDOR":"$PRODUCT = "y0x0092:0x0001" ]; then
       echo "0" > $INSTALL_DIR/qcop.lock
       echo "1" > $INSTALL_DIR/status.inf
#       qcop QPE/Network 'up()'
     fi
   fi
 
  ;;  

xdetach)
   if [ "x"$HAVE_SDMEMORY != "x" ]; then
     if [ "x"$BUS":"$SLOT = "x0:0" ]; then

        #do_umount
        #umount $MNT

        # for zaurus SL-Cxxx series
        $SDCONTROL compeject
     fi
   fi

   if [ "x"$HAVE_SDIO != "x" ]; then
     if [ "y"$VENDOR":"$PRODUCT = "y0x0092:0x0001" ]; then
       echo "-1" > $INSTALL_DIR/qcop.lock
       echo "0" > $INSTALL_DIR/status.inf
#       qcop QPE/Network 'down()'
     fi
   fi

  ;;  

*)
  ;;
esac

8<--

corecoder

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://patternsemerge.home.mindspring.com
I Mounted A 2 Gig Sd Card!
« Reply #37 on: February 24, 2006, 11:11:43 am »
Thanks. This works.
As long as there is only one partition/filesystem its OK.

I did a little more testing.
 
I have two partitions. A vfat and an ext2. The ext2 is running Pocketworkstation which I mount and start using Icons.

After a suspend the filesystems/mounts are messed up.

Why would the filesystems have to umount on suspend anyway? Does home umount?
SL-C860 Original Sharp ROM (Flash back and forth wit RC5)/Pocket Workstation
4gb/1gb/340mb MicroDrives
1gb/512/256 SD cards
CampactLAN
Ambicom wireless LAN
Pretec Bluetooth
Ambicom Modem
PocketTop IR keyboard
2X-5500 Orginal ROM/OZ3.5.1

stbrock

  • Full Member
  • ***
  • Posts: 149
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #38 on: May 09, 2006, 11:48:46 pm »
Could someone tell me how to restart the sd control processes using either the original script from Dr Wowe or bimbo's version? I am running Cacko 1.23 Lite on a C860. When I install the ipk and reboot, I can read a 2GB or 4GB card fine. Once. But suspending or unmounting and removing the card kills the process and after that the sd slot is entirely dead. Inserting a card, trying to mount /dev/mmcda1, and other attempts all fail and don't even generate any error messages in dmesg. If I remove and reinstall the driver ipk, things work again. But only once.

I've tried quite a few commands to reset or restart the sd control processes when this happens, but apparently not the right ones, or at least not in the right order. What's the trick?

rokugo

  • Full Member
  • ***
  • Posts: 130
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #39 on: May 18, 2006, 07:48:34 am »
Quote
Could someone tell me how to restart the sd control processes using either the original script from Dr Wowe or bimbo's version? I am running Cacko 1.23 Lite on a C860. When I install the ipk and reboot, I can read a 2GB or 4GB card fine. Once. But suspending or unmounting and removing the card kills the process and after that the sd slot is entirely dead. Inserting a card, trying to mount /dev/mmcda1, and other attempts all fail and don't even generate any error messages in dmesg. If I remove and reinstall the driver ipk, things work again. But only once.

I've tried quite a few commands to reset or restart the sd control processes when this happens, but apparently not the right ones, or at least not in the right order. What's the trick?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=126352\"][{POST_SNAPBACK}][/a][/div]

I came across the same problem yesterday when reinstalling Cacko on my C860, this is how I managed to get it to work:

1) install the SDIO drivers and reboot.
2) copy bimbo's script onto Notepad (or any plaintext editor on your PC).
 [ Invalid Attachment ]
3)transfer to the Zaurus' usr/sbin directory to replace the original sdiomgr script. Make sure to set the appropriate file permission (easily done with TreeExplorerQT)
4) Open this new script with ZEditor, and check the very first line.  It should be:
#!/bin/sh
But chances are there will be a an extra character before the # (on my Japanese C860 its a square box). Somehow Windows had automatically added this character into the script rendering it useless.
So delete this junk character and make sure you save the script as a UTF-8 encoding.
5) Reboot and enjoy 2GB and above SD card support.
currently:  SL-C860 Cacko 1.23 ROM converted to full Japanese
formerly: SL-C1000 Cacko 1.23 ROM converted to full Japanese
Sony WL100 wifi CF card (handed down from old Clie)
A-Data 60X 2GB SD card loaded with Super Daijirin, Green Goddess5, NJECD and Eijiro

zedkatuf2

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • http://www.projectgalileo.org.uk
I Mounted A 2 Gig Sd Card!
« Reply #40 on: June 08, 2006, 11:48:20 am »
Quote
I came across the same problem yesterday when reinstalling Cacko on my C860, this is how I managed to get it to work:

1) install the SDIO drivers and reboot.
2) copy bimbo's script onto Notepad (or any plaintext editor on your PC).
 [ Invalid Attachment ]
3)transfer to the Zaurus' usr/sbin directory to replace the original sdiomgr script. Make sure to set the appropriate file permission (easily done with TreeExplorerQT)
4) Open this new script with ZEditor, and check the very first line.  It should be:
#!/bin/sh
But chances are there will be a an extra character before the # (on my Japanese C860 its a square box). Somehow Windows had automatically added this character into the script rendering it useless.
So delete this junk character and make sure you save the script as a UTF-8 encoding.
5) Reboot and enjoy 2GB and above SD card support.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=127575\"][{POST_SNAPBACK}][/a][/div]

Does anyone know if this will work on a collie (5500)?
Zaurus SLC3200 (Terrier) [SOLD]
Hardware extras: 2Gb Viking SD card 4Gb Transcode MMC card 2Gb Kingston 50x CF card Symbol Socket Spectrum & Ambicom 1100C  WLAN cards Shirtpocket Bluetooth CF  & Sitecom USB cards Running Pdaxii13 using Meanie's Atika ROM & full-hd apps.

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #41 on: January 30, 2007, 09:18:25 pm »
Quote
1) install the SDIO drivers and reboot.
2) copy bimbo's script onto Notepad (or any plaintext editor on your PC).
 [ Invalid Attachment ]
3)transfer to the Zaurus' usr/sbin directory to replace the original sdiomgr script. Make sure to set the appropriate file permission (easily done with TreeExplorerQT)
4) Open this new script with ZEditor, and check the very first line.  It should be:
#!/bin/sh
But chances are there will be a an extra character before the # (on my Japanese C860 its a square box). Somehow Windows had automatically added this character into the script rendering it useless.
So delete this junk character and make sure you save the script as a UTF-8 encoding.
5) Reboot and enjoy 2GB and above SD card support.[div align=\"right\"][a href=\"index.php?act=findpost&pid=127575\"][{POST_SNAPBACK}][/a][/div]
It's been a while, but I'm just jumping on this bandwagon (late as usual ). By following these instructions I'm able to use my Transcend 4gb card in my C860. YAH! BUT I've partitioned it into a 1gb ext2 & a 3gb fat32 & I'm experiencing the suspend problems others have mentioned (in my case the unit locks up & I have to do a hard restart).

I want to be able to install programs & other stuff on the ext2 & have a swap file there to. Has anyone found a fix to this problem? thks
GROG!

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #42 on: February 01, 2007, 11:03:52 am »
Quote
I want to be able to install programs & other stuff on the ext2 & have a swap file there to. Has anyone found a fix to this problem? thks[div align=\"right\"][a href=\"index.php?act=findpost&pid=152972\"][{POST_SNAPBACK}][/a][/div]
Well I managed to get this setup stable as far as I can tell so far. For the archives in case anyone's interested, here's what I did.

First, put my hacked version of Cacko's /etc/sdcontrol script (see attachment). This will mount/umount all sd partitions listed in the /etc/fstab, so you need to add your card partitions there. Here's mine for an example:

Code: [Select]
zaurus:$ grep mmcd /etc/fstab
/dev/mmcda1     /mnt/card       auto    noauto,owner,umask=000  0  0
/dev/mmcda2     /mnt/card1      auto    noauto,owner,umask=000  0  0
You of course need to create the directories the partitions are to be mounted on (the second on /mnt/card1 in my example).

Now your Z will automatically mount all of your partitions when the card is inserted.

To overcome the suspend problem, I found I needed to eject the card before I suspended. When the Z resumes It'll automatically re-insert it & all's well. So I created a new apm script & symlinked it so it'll be run when the Z suspends.

Code: [Select]
# ll /etc/apm.d/sd
-rwxr-xr-x    1 root     root           33 Feb  1 08:49 /etc/apm.d/sd
# cat /etc/apm.d/sd
#!/bin/sh
/etc/sdcontrol eject
# ln -s /etc/apm.d/sd /etc/apm.d/suspend.d/S99sd
Note that all of this has to be done as root.

And that's it. Like I said, seems to work for me. I'll report back if I have any problems. HTH
GROG!

shelandy

  • Newbie
  • *
  • Posts: 6
    • View Profile
I Mounted A 2 Gig Sd Card!
« Reply #43 on: February 08, 2007, 02:53:38 am »
Hi!

I am using sharp-rom on my C860.
Like "grog", I wish to use ext2 for my SD.  However, I will use only ext2 on the whole 2G PQI SD card.  I check my /etc, there is no apm.d.  since "grog" mentioned that he got the problem when he used "bimbo"'s /usr/sbin/sdiomgr with one FAT partition and one ext2  partition, I guessed it is OK for me to use "bimbo"'s script with ext2 only.  
I used
mke2fs -b 1024 /dev/mmcda1
to format the SD.  It won't automount although it should.
I tried manually mount /mnt/card
It complained that there is some issue with the mount parameter.  
So I guess that's becuase /etc/fstab
so I changed the entry to
/dev/mmcda1   /mnt/card  ext2   defaults 0 0

Now I can  manually mount, However
It turn out to be, I can not see the SD mounted after I turn off the power and turn on again.  

So I guess bimbo's script has some issue with ext2 partition, not with two partitions.
Has any one a better solution to let ext2 partition work without sufferring from lost in suspend?
 
Another question:  how can people who using sharp rom adapt grog's appraoch, whcih seems to work fine with ext2.


thanks

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
I Mounted A 2 Gig Sd Card!
« Reply #44 on: February 08, 2007, 11:08:08 am »
Quote
Another question:  how can people who using sharp rom adapt grog's appraoch, whcih seems to work fine with ext2.[div align=\"right\"][a href=\"index.php?act=findpost&pid=153458\"][{POST_SNAPBACK}][/a][/div]
Does the card show up the first time after you've restarted/rebooted? Try to manually eject the card & then suspend. Is the card automatically remounted when you resume?

Depending on your results of the above tests, the fact that you can't set the apm scripts as I've lined out is probably the crux of the matter. The card needs to be ejected before you suspend. I would've thought that since Cacko is a Sharp-based ROM it would've used the same apm scheme. Obviously not.

If I can make some time (a very short commodity these days) I can flash back to Sharp & see if I can figure it out. In the mean time, if somebody else can shed some light for shelandy, that'd be great.
« Last Edit: February 08, 2007, 12:55:10 pm by grog »
GROG!