Author Topic: USB Storage ported to 5xxx ROM\'s ?  (Read 25356 times)

Mitch

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
USB Storage ported to 5xxx ROM\'s ?
« Reply #30 on: February 26, 2004, 10:29:36 am »
But you still need the drivers for syncing.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #31 on: February 26, 2004, 10:35:49 am »
Yes and no (if you can perform the sync using the data file from the Z on the PC a la Ko/Pi then no).

But I don\'t want to be able to sync, just to easily transfer information when I go to visit someone else\'s office. I don\'t want to have to install drivers on their computer (if they\'d even let me, or if they even had sufficient privileges to do so), just to plug it in and copy back and forth.


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/
USB Storage ported to 5xxx ROM\'s ?
« Reply #32 on: February 27, 2004, 07:35:21 am »
I\'ve compared the 5600 and C860 kernel source and there are almost no differences (the only ones are related to being able to set a packet size as a parameter), so I guess that once ced and greg2 grab my corrected scripts they will be able to use mass storage on their 5600s.

Not ideal for my quest to get it working on the 5500 (I was hoping that it wouldn\'t work on the 5600 and that the differences between the two sets of source would be larger and would show me what to add to the 5500 kernel), but it\'ll make 5600 users happy.


Si

P.S. I\'m getting a bit ahead of myself here, no-one has actually got it working yet (my initial scripts had a typo), but I\'m 90% sure it will work.
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://
USB Storage ported to 5xxx ROM\'s ?
« Reply #33 on: February 27, 2004, 10:41:17 am »
so how come the pxa_bi.o from the C860 source doesn\'t work on the SL5600?
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/
USB Storage ported to 5xxx ROM\'s ?
« Reply #34 on: February 27, 2004, 11:06:11 am »
I don\'t know, but there really are very few differences. There\'s a line in the makefile.in and config.in files (I think those are the right names) which specify that storage_fd should be built, and in the pxa.c file there are only the differences which are due to the addition of the module parameters.

Perhaps I\'ll have to dig deeper and see whether anything else is linked in (I\'m pretty sure there\'s nothing else) or try to take a look at the various #defines which may affect it.


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

maslovsky

  • Hero Member
  • *****
  • Posts: 1426
    • View Profile
    • http://my-zaurus.narod.ru
USB Storage ported to 5xxx ROM\'s ?
« Reply #35 on: February 27, 2004, 12:33:18 pm »
I also think that USB storage will work on 5600 - they are using the same USB support module.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #36 on: February 27, 2004, 01:56:43 pm »
It worked! On my 5500.

God only knows why it wouldn\'t work yesterday (I\'ve not changed anything).

Anyway, my storage_fd.o module + scripts has allowed my 256Mb CF card to be recognised and mounted on my Linux box.

Time to try WinXP.....

 
Si

P.S. The issue may have been that I hadn\'t started the storage_fd.o module before I put my Z in the cradle (or that I booted my desktop Linux box with it already in the cradle, etc.)
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/
USB Storage ported to 5xxx ROM\'s ?
« Reply #37 on: February 27, 2004, 02:11:05 pm »
Yep, WinXP works too.

Read and write both work fine. Under Linux the device is /dev/sda (no numbers).

I suppose I should make a package for people to install. Maslovsky & ced, you\'ve both used the C860 hotplug scripts, do you think these are the best way to go (rather than my quick hack method of using 2 separate scripts to start and stop the storage funtion)?


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/
USB Storage ported to 5xxx ROM\'s ?
« Reply #38 on: February 27, 2004, 03:49:40 pm »
Looks like the above file is also the one to use for the 5600.

Here are the commands I used to compile it (after sourcing my standard GCC2.95.3 cross toolchain script):

cd whichever/dir/has/the/source/in/it

arm-linux-gcc -D__KERNEL__ -I/home/simon/dev/OE/oe-packages-exported/tmp/base/linux-2.4.18-rmk7-pxa3-embedix-r0/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -mapcs -fno-strict-aliasing -fno-common -fno-common -pipe -mapcs-32 -march=armv4 -mtune=strongarm1100 -mshort-load-bytes -msoft-float -DMODULE  -DKBUILD_BASENAME=storage   -c -o storage_fd.o storage-fd.c

arm-linux-gcc -D__KERNEL__ -I/home/simon/dev/OE/oe-packages-exported/tmp/base/linux-2.4.18-rmk7-pxa3-embedix-r0/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -mapcs -fno-strict-aliasing -fno-common -fno-common -pipe -mapcs-32 -march=armv4 -mtune=strongarm1100 -mshort-load-bytes -msoft-float -DMODULE  -DKBUILD_BASENAME=storage   -c -o schedule_task.o schedule_task.c

arm-linux-gcc -D__KERNEL__ -I/home/simon/dev/OE/oe-packages-exported/tmp/base/linux-2.4.18-rmk7-pxa3-embedix-r0/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -mapcs -fno-strict-aliasing -fno-common -fno-common -pipe -mapcs-32 -march=armv4 -mtune=strongarm1100 -mshort-load-bytes -msoft-float -DMODULE  -DKBUILD_BASENAME=storage   -c -o storageproto.o storageproto.c

arm-linux-ld -r -a storage_fd_drv.o storage_fd.o storageproto.o schedule_task.o

mv storage_fd_drv.o storage_fd.o



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

rrusaw

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • http://
USB Storage ported to 5xxx ROM\'s ?
« Reply #39 on: February 27, 2004, 09:02:45 pm »
Code: [Select]
+++ sa1100.c    2004-02-27 19:19:34.628738128 -0500

@@ -440,6 +440,7 @@

                                         udc_interrupts, *(UDCSR), *(UDCCS0), *(UDCAR));



                        usbd_device_event (udc_device, DEVICE_RESET, 0);

+                       usbd_device_event (udc_device, DEVICE_ADDRESS_ASSIGNED,0);

                }



                if (status & UDCSR_SUSIR) {


To compile i used the 860 kernel source with the drivers/usb/device/bi directory from the 5500 kernel source. I then patched the sa1100.c driver as above (1 line)  copied the sl5500 config (arch/arm/def-configs/collie) to .config. I then manually copied the CONFIG_USBD_STORAGE section from the boxer config into the .config.

After that it was a simple matter of building the kernel and modules and copying the files over to the Z and using modified versions of lardman\'s scripts to load the appropiate modules.

Cheers and good luck

Ryan

Anonymous

  • Guest
USB Storage ported to 5xxx ROM\'s ?
« Reply #40 on: February 27, 2004, 09:48:00 pm »
Nice work Si!


Anonymous

  • Guest
USB Storage ported to 5xxx ROM\'s ?
« Reply #41 on: February 28, 2004, 04:32:23 pm »
Hah, very strange, but after reading your post I\'ve tried it again at my home PC. IT WORKED! Something could be wrong with my PC at work, but WinXP was able to recognize CF card in SL5500 just fine.

I\'m using hotplug scripts from c860 root fs. I think I can write a simple application that will alow to switch between USB storage and network modes.
I will build an IPK when I get back to work on Monday.

Regards,
maslovsky

Anonymous

  • Guest
USB Storage ported to 5xxx ROM\'s ?
« Reply #42 on: February 29, 2004, 09:20:46 am »
Bad news - that only worked once. Next time I connect zaurus windows does not see  a CF card being inserted. Just like before.
I cannot figure out if this is a zaurus or windows problem.

maslovsky

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
USB Storage ported to 5xxx ROM\'s ?
« Reply #43 on: February 29, 2004, 11:09:31 am »
It seems to be working every time for me now.

With my Z out of the cradle I run my script to insmod storage_fd, then just pop it in the cradle and it works. I may have switched off between insmoding and sticking it in the cradle actually, but ever since I can take it out and put it back in without any troubles. I also tend to not boot with the Z in the cradle, this might make a difference, I\'m not sure.

Something else to check is that the card can be cleanly umounted.


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/
USB Storage ported to 5xxx ROM\'s ?
« Reply #44 on: February 29, 2004, 02:11:26 pm »
Right, I\'ve managed to replicate your troubles. To get around it I have to do the following:

take Z out of cradle (might not be necessary)
run script to insmod storage_fd
suspend/switch off
turn back on and place in the cradle.

Strange.


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