1
C1000/3x00 General discussions / How To Use Usb Host?
« on: May 17, 2005, 05:21:58 pm »
Just to close this thread off, after setting up a cross compile arm-linux environment on my NetBSD x86 box, I've now managed to build the sharp spitz-j 2.4.20 kernel, with the following changes to drivers/usb/storage:
It now works (well dmesg shows some messages, but it copies files). Note that Hotplug needed a tweak, the setup as shipped used /mnt/usbhdd, which didn't exist, creating the dir and it all seems to be happy Note this might just be a quirk of the Trisoft setup.
Now I just need to load up some apps and I'm all set for my holiday in US/Canada
Thanks,
Chris
PS the rough guide to setting up a cross build env is here:
http://www.qtopia.net/modules/developers/q...Chain_For_Win32
with glibc and sharp kernel source taken from here:
http://translate.google.com/translate?hl=e...ficial%26sa%3DG
Code: [Select]
diff -rup linux/drivers/usb/storage/transport.h ../arm-linux/drivers/usb/storage/transport.h
--- linux/drivers/usb/storage/transport.h 2004-08-21 01:48:57.000000000 +0100
+++ ../arm-linux/drivers/usb/storage/transport.h 2005-05-17 21:15:10.000000000 +0100
@@ -75,6 +75,8 @@
#define US_PR_JUMPSHOT 0xf3 /* Lexar Jumpshot */
#endif
+#define US_PR_DEVICE 0xff /* Use device's value */
+
/*
* Bulk only data structures
*/
diff -rup linux/drivers/usb/storage/unusual_devs.h ../arm-linux/drivers/usb/storage/unusual_devs.h
--- linux/drivers/usb/storage/unusual_devs.h 2004-08-21 01:48:57.000000000 +0100
+++ ../arm-linux/drivers/usb/storage/unusual_devs.h 2005-05-17 21:42:30.000000000 +0100
@@ -228,6 +228,12 @@ UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x
US_SC_SCSI, US_PR_CB, NULL,
US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE ),
+UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0500,
+ "Sony",
+ "DSC-P100/P200",
+ US_SC_8070, US_PR_DEVICE, NULL,
+ US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE ),
+
/* Reported by wim@geeks.nl */
UNUSUAL_DEV( 0x054c, 0x0025, 0x0100, 0x0100,
"Sony",
diff -rup linux/drivers/usb/storage/usb.c ../arm-linux/drivers/usb/storage/usb.c
--- linux/drivers/usb/storage/usb.c 2004-08-21 01:48:58.000000000 +0100
+++ ../arm-linux/drivers/usb/storage/usb.c 2005-05-17 21:14:42.000000000 +0100
@@ -620,7 +620,9 @@ static void * storage_probe(struct usb_d
/* Determine subclass and protocol, or copy from the interface */
subclass = unusual_dev->useProtocol;
- protocol = unusual_dev->useTransport;
+ protocol = (unusual_dev->useTransport == US_PR_DEVICE) ?
+ altsetting->bInterfaceProtocol :
+ unusual_dev->useTransport;
flags = unusual_dev->flags;
/*
It now works (well dmesg shows some messages, but it copies files). Note that Hotplug needed a tweak, the setup as shipped used /mnt/usbhdd, which didn't exist, creating the dir and it all seems to be happy Note this might just be a quirk of the Trisoft setup.
Now I just need to load up some apps and I'm all set for my holiday in US/Canada
Thanks,
Chris
PS the rough guide to setting up a cross build env is here:
http://www.qtopia.net/modules/developers/q...Chain_For_Win32
with glibc and sharp kernel source taken from here:
http://translate.google.com/translate?hl=e...ficial%26sa%3DG