Author Topic: Wanted: 5600 usb mass storage test volunteer/victim ;-)  (Read 8897 times)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« on: February 26, 2004, 09:50:43 am »
Attached is a tarball with 3 files inside:

Stick storage_fd.o in /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/storage_fd/

Stick the two .sh files anywhere you want (either in your path or cd to their directory and run them directly).

pxastart_storage.sh will load the storage_fd.o module and should then make your 5600 behave like a mass storage device (like one of those pen things you can stick in the USB port). It currently uses the CF card for the mass storage. You can edit the script to use /dev/mmcda1 instead of /dev/hda1 to use an MMC/SD card instead. The card in question will be mounted and unmounted by the scripts. Make sure this is possible (ie test to see whether your Z will allow you to umount cleanly. If it won\'t then the test won\'t work)

pxastart_net.sh will load the net_fd module which will return your 5600 to using the USB cradle connection as an ethernet connection (standard setup).

If the worst comes to the worst you can always reboot and the storage_fd module will be unloaded. It won\'t be loaded unless you run the pxastart_storage.sh script so there\'s no need to worry about breaking anything.

Basically I\'d just like someone to try out the scripts (run pxastart_storage.sh before putting your Z in the cradle) and see whether your WinXP/2k or Linux machine recognises it as a mass storage device.

Thank you,


Simon
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

ced

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • http://
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #1 on: February 26, 2004, 10:15:27 am »
I\'ve re-compile my own usb storage module.

I\'ve copied pxa_bi.o (because the size was different) and usb_storage.o to my zaurus and all the /etc files defined in the other thread for the 5500.

The storage has been loaded but I don\'t see any changes on my $M box.

I\'ve rebooted now and the kernel is sticked to text... no prompt, no ui...
SL-5600, kernel 2.6.16 + GPE from .dev
Ethernet Socket LP-E
Viking 256M SD

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #2 on: February 26, 2004, 11:05:00 am »
What do you mean \"the kernel is sticked to text\".

Do you mean you\'ve broken it? When you get it working again try the file I\'ve attached above. It doesn\'t change pxa_bi so it shouldn\'t kill your 5600 after a reboot (plus it doesn\'t mess around with the hotplug scripts, just by-passes them). The above file worked to some extent on my 5500 (non pxa) so it should produce some effect on a 5600.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #3 on: February 26, 2004, 11:23:09 am »
The storage has been loaded but no changes in linux box... except now my battery applet shows it\'s charging but not connected when removed from cradle?

Specs:
5600, zynergy-1.1with Special kernel
Mandrake 9.1

Maybe special kernel problem?
Let me know if you need any data later...I won\'t reboot yet (don\'t worry,no big deal)
Mandrake still sees a 5600 in usb view?

Greg

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #4 on: February 26, 2004, 11:30:55 am »
Hmm, very strange.

Could you do an lsmod and see what\'s loaded?

Cheers,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #5 on: February 26, 2004, 12:49:25 pm »
lardman

I\'m still working at it (when I have time today)

It is this damn file structure (not like oz) part of it is read only and I have to use a trick of tumnus to change it.

There is
/lib/modules -] /home/root/modules/
and
/lib/modules.rom/

and where it should be is read only

I will change that later...

Greg

ced

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • http://
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #6 on: February 26, 2004, 12:59:20 pm »
I\'ve changed /dev/hda1 to /dev/mmcda1

Code: [Select]
bash-2.05$ sudo ./pxastart_storage.sh

rmmod: module serial_fd is not loaded

rmmod: module net_fd is not loaded

/lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/bi/pxa_bi.o: invalid parameter parm_shortpacket



bash-2.05$ lsmod

Module                  Size  Used by

storage_fd             99872   0 (unused)

usbdcore               34544   0 [storage_fd]

usbdmonitor             5248   0

sharp_mmcsd_m          26256   1


I don\'t have a new drive on my $M box...
SL-5600, kernel 2.6.16 + GPE from .dev
Ethernet Socket LP-E
Viking 256M SD

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #7 on: February 26, 2004, 01:28:20 pm »
lardman

I can\'t place that driver where it has to be to work with the Zynergy rom1.1

With the Sharp rom and TKCrom I can:

mount /-o rw,remount

but that doesn\'t work on Zynergy

The drivers are located in a minix file system with 0kb free?

Any ideas?

Greg

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #8 on: February 26, 2004, 03:42:22 pm »
@ced: edit the script and remove the parameters which are passed to pxa_bi.o (I assumed that as the c860 pxa_bi.o took these so would the 5600 version, it looks like I was wrong).

@greg2: you can just provide a full path to the storage_fd.o file (in the script) so stick it anywhere. Also do what I\'ve suggested above if you have ced\'s problem (I assume you will).

BTW cheers for your help guys,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #9 on: February 26, 2004, 07:52:32 pm »
lardman

lsmod reads the same as ced

I made a poor attempt at editing the script...i won\'t go there

I don\'t even know what pxa_bi.o is or should do? But I will leave the drivers in place if you would like to attach another script for me to try.

Greg

ced

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • http://
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #10 on: February 27, 2004, 03:29:54 am »
Code: [Select]
bash-2.05$ lsmod

Module                  Size  Used by

pxa_bi                 21328   0 (unused)

storage_fd             99872   0 (unused)

usbdcore               34544   0 [pxa_bi storage_fd]

usbdmonitor             5248   0

sharp_mmcsd_m          26256   1



bash-2.05$ cat /proc/usb-storage

Protocol status:STORAGE_IDLE

USB status:USB_DISCONNECT

Media status:MEDIA_EJECT

Media chage:MEDIA_CHANGE_OFF

Device name:/mnt/card

Device file descriptor:0x00000000

Device size:0x0

Device block size:0x512

Device write protect:WR_PROTECT_ON

Bulk in max size:0

Bulk out max size:0

device write error:0

device read error:0

device flush error:0

write data bulk out timout:0

device write max time:0 msec

Schedule task max num:0x512

Schedule task use num:0x1

Schedule task max use num:0x1


My SD card is not mounted (ext2 type) and my M$ box doesn\'t have a new drive...
SL-5600, kernel 2.6.16 + GPE from .dev
Ethernet Socket LP-E
Viking 256M SD

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #11 on: February 27, 2004, 06:16:55 am »
Sorry, I just spotted a mistake in my script - I was using storage_device=/mnt/cf when it should be storage_device=/dev/hda1, so no wonder nothing was working.

@ced: Your card will need to be in a format which Windows can read (sorry I should have said that before). Do you have a Linux box which you could try it on (as it will be able to read an ext2 mass-storage device)?

@greg2: I\'ve attached a new set of scripts. I\'ve change the pxastart_storage.sh one and created a new greg2pxastart_storage.sh script for you. Before you run this script you have to \'cd\' to the directory which contains the storage_fd.o module.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #12 on: February 27, 2004, 06:19:03 am »
Hmm, I had to edit the scripts on a windows machine so it looks like they\'ve had line feeds added.

If you want to take a look at what I\'ve changed then change the original scripts on your Z that would probably be easiest.

Greg, if you have any troubles with editing them give me a shout.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

ced

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • http://
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #13 on: February 27, 2004, 10:30:36 am »
Code: [Select]
bash-2.05$ cat /proc/usb-storage

Protocol status:STORAGE_IDLE

USB status:USB_DISCONNECT

Media status:MEDIA_INSERT

Media chage:MEDIA_CHANGE_ON

Device name:/dev/hda1

Device file descriptor:0x00000000

Device size:0x0

Device block size:0x512

Device write protect:WR_PROTECT_OFF

Bulk in max size:0

Bulk out max size:0

device write error:0

device read error:0

device flush error:0

write data bulk out timout:0

device write max time:0 msec

Schedule task max num:0x512

Schedule task use num:0x0

Schedule task max use num:0x2


the usb status is still disconnected but now the CF is mounted.
If I plug my zaurus to the cradle then my M$ box reconise it as a \"SL series Ver3 (WDM)\" device. my CF card has a vfat type.
I get this with your script and with the C860 hotplug scripts.
If I\'ve used my SD card (ext2) then I get the same thing -] usb disconnected and card mounted.
SL-5600, kernel 2.6.16 + GPE from .dev
Ethernet Socket LP-E
Viking 256M SD

ced

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • http://
Wanted: 5600 usb mass storage test volunteer/victim ;-)
« Reply #14 on: February 27, 2004, 11:07:58 am »
sorry lardman, I\'ve used my own compiled module and it wasn\'t working... I\'ve switched to yours and it\'s working!

how did you configure/compile your storage_fd.o module?
SL-5600, kernel 2.6.16 + GPE from .dev
Ethernet Socket LP-E
Viking 256M SD