Author Topic: 5600 As A Usb Drive  (Read 5954 times)

ebank

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • http://www.bankflash.com/ed
5600 As A Usb Drive
« on: December 13, 2005, 03:57:11 pm »
I am trying to set up my 5600 with the Watapon (sharp based) rom to act as a usb drive as described here:
http://people.bath.ac.uk/enpsgp/Zaurus/binaries/ (bottom of the page).

I do have a CF memory card plugged in.
Output from lsmod Before running the script.
bash-2.05# /sbin/lsmod
Module                  Size  Used by
pxa_bi                 21328   0  (unused)
net_fd                 25024   1
usbdcore               34544   0  [pxa_bi net_fd]
registers              26416   0  (unused)
usbdmonitor             5248   0
sharp_mmcsd_m          26256   2

When I run the script start_storage.sh, it looks like it runs fine until the last line:
/sbin/insmod /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/bi/pxa_bi.o shortpacket=1 recvpacket=256

Which throws this error:
Invalid parameter parm_shortpacket

If I remove the parameter shortpacket, I get:
Invalid parameter parm_recvpacket

If I also remove the recvpacket parameter, I don’t get any errors, but then when I try to connect it to my PC, It sees the usb device, but it doesn’t know what it is.

Do I need a different pxa_bi.o?
Can someone tell me how to get the correct one?

Is there something I am overlooking?  I would really like to get this to work.

Thanks
Ed

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
5600 As A Usb Drive
« Reply #1 on: December 14, 2005, 06:49:54 am »
The pxa_bi.o file is from your Zaurus anyway so it should be the right one.

Perhaps the 5600's version of pxa_bi.o doesn't accept arguments - this seems to be the case. What info does the PC return about the usb device when you remove the two parameters?


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

ebank

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • http://www.bankflash.com/ed
5600 As A Usb Drive
« Reply #2 on: December 14, 2005, 03:54:39 pm »
See attached JPG for the windows XP error.  Basically it says that it is a Unknown USB storage device.

Maybe the parameters are named slightly different?
« Last Edit: December 14, 2005, 04:11:00 pm by ebank »

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
5600 As A Usb Drive
« Reply #3 on: December 15, 2005, 07:18:30 am »
modinfo will tell you any parameter names.

Have a read of these and see if anything rings a bell:

https://www.oesf.org/forums/index.php?showtopic=1996&hl=
https://www.oesf.org/forums/index.php?showtopic=1485&hl=


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

ebank

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • http://www.bankflash.com/ed
5600 As A Usb Drive
« Reply #4 on: December 15, 2005, 09:47:17 am »
Here is the results from modinfo:
Code: [Select]
bash-2.05# /sbin/modinfo /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/bi/pxa_bi.o
filename:    /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/bi/pxa_bi.o
description: "Xscale USB Device Bus Interface"
author:      "sl@lineo.com, tbr@lineo.com"
parm:        dbg string

I also ran modinfo on storage_fd.o:
Code: [Select]
filename:    /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/strage_fd/storage_fd.o
description: "USB Device Mass Storage Function"
author:      "Shunnosuke kabata"
parm:        vendor_id int, description "vendor id"
parm:        product_id int, description "product id"
parm:        out_pkt_sz int
parm:        in_pkt_sz int
parm:        storage_device string
Is it possible to use the packet parms in here as a substitute for the missing ones in pxa_bi.o?
« Last Edit: December 15, 2005, 09:55:35 am by ebank »

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
5600 As A Usb Drive
« Reply #5 on: December 15, 2005, 10:43:03 am »
Quote
I also ran modinfo on storage_fd.o:
Code: [Select]
filename:    /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/strage_fd/storage_fd.o
description: "USB Device Mass Storage Function"
author:      "Shunnosuke kabata"
parm:        vendor_id int, description "vendor id"
parm:        product_id int, description "product id"
parm:        out_pkt_sz int
parm:        in_pkt_sz int
parm:        storage_device string
I think your using the wrong storage module?

This is the one I have had 'some' luck with on a 5600:
Code: [Select]
filename:       storage_fd.o
kernel_version: 2.4.18-rmk7-pxa3-embedix
author:         kabata@kyoto-cti.co.jp
description:    USB Device Mass Storage Function
parm_vendor_id: i
parm_product_id:i
parm_out_pkt_sz:i
parm_in_pkt_sz: i
parm_desc_vendor_id:vendor id
parm_desc_product_id:product id
kernel_version: 2.4.18-rmk7-pxa3-embedix
parm_storage_device:s

It 'was' in one of the old threads that lardman posted links to. I believe that the other one was for the sa1100?

Greg

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
5600 As A Usb Drive
« Reply #6 on: December 15, 2005, 10:51:56 am »
I'll take a look at the modules I have kicking around and let you know.


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

ebank

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • http://www.bankflash.com/ed
5600 As A Usb Drive
« Reply #7 on: December 15, 2005, 01:37:00 pm »
Quote
I think your using the wrong storage module?

This is the one I have had 'some' luck with on a 5600:
Code: [Select]
filename:       storage_fd.o
kernel_version: 2.4.18-rmk7-pxa3-embedix
author:         kabata@kyoto-cti.co.jp
description:    USB Device Mass Storage Function
parm_vendor_id: i
parm_product_id:i
parm_out_pkt_sz:i
parm_in_pkt_sz: i
parm_desc_vendor_id:vendor id
parm_desc_product_id:product id
kernel_version: 2.4.18-rmk7-pxa3-embedix
parm_storage_device:s

It 'was' in one of the old threads that lardman posted links to. I believe that the other one was for the sa1100?

Greg
[div align=\"right\"][a href=\"index.php?act=findpost&pid=107194\"][{POST_SNAPBACK}][/a][/div]
Greg, Could you post the output of modparm for your pxa_bi.o?

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
5600 As A Usb Drive
« Reply #8 on: December 15, 2005, 04:47:52 pm »
Quote
Greg, Could you post the output of modparm for your pxa_bi.o?
It's the same pxa_bi.o that you have... it's from the sharp rom.

Would you like me to attach the storage module here?

Greg

ebank

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • http://www.bankflash.com/ed
5600 As A Usb Drive
« Reply #9 on: December 15, 2005, 08:11:06 pm »
Greg,
Please attach it.  Can you also post the scripts you use?
Or if you don’t use scripts, what parameters you use?
Can you also describe what you mean by ‘some luck’?

Thanks
Ed

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
5600 As A Usb Drive
« Reply #10 on: December 16, 2005, 06:14:43 am »
An aside:

You're using watapon aren't you - does this have any kernel differences to the standard Sharp kernel?

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

ebank

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • http://www.bankflash.com/ed
5600 As A Usb Drive
« Reply #11 on: December 16, 2005, 07:21:39 am »
From the Watapon Web Site:
http://www.duelmonsters.ca/zaurus/

Kernel
2.4.18-rmk7-pxa3-embedix
Standard 5600 Config
XScale Cache Workaround DISABLED (effectively doubles processor speed compared to default kernel -- may cause minor instability, although I haven't noticed much -- only with some movies and some games)

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
5600 As A Usb Drive
« Reply #12 on: December 16, 2005, 12:23:20 pm »
Quote
I am trying to set up my 5600 with the Watapon (sharp based) rom to act as a usb drive
This could be part of the problem. I was not able to make this work at all on the Watapon Rom.

Over a year ago when Chaos had more time and was working on his Watapon Rom I suggested to him to include this feature. He requested the info and I gave it to him, but it never became a feature of his rom.

All the info is in the threads lardman has linked in his post. As is noted in the thread... I have only made this work on the original sharp rom v1.32 with the special kernel v1.3. I should also add that I have never tried to use it with windows, but I have mounted it with the terminal on a linux box as:

mount /dev/sda

As for the 'some luck' part... it doesn't 'always' mount on the first try.

Greg

Here are lardman's original scripts (with an error corrected as per the thread it was in) and module from that thread:

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
5600 As A Usb Drive
« Reply #13 on: December 20, 2005, 07:28:26 am »
Thanks Greg,

Ed, I should have some more time after Xmas to look into this if you still need help then.


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