On Wed, Apr 28, 2010 at 10:49:43AM +0530, Viral Mehta wrote: > Hi, > > > -----Original Message----- > > From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx] > > Sent: Wednesday, April 28, 2010 12:25 AM > > To: Viral Mehta > > Cc: linux-usb@xxxxxxxxxxxxxxx > > Subject: RE: USB gadget with drivers "on board" > > > > On Tue, 27 Apr 2010, Viral Mehta wrote: > > > > > I want to store drivers/software for Windows > > > as well as Linux BUT on different partitions and "on board". > > > > Why on different partitions? Doesn't that just make your life harder? > > What's wrong with putting everything into multiple top-level > > directories on the same partition? > > > No. other way around, it makes user's life easier. Here is the scenario, > I have one USB Digital Picture Frame. It has one NAND flash. I am doing 3 extra > Partitions on it (other than for uImage and etc). One has software for Windows, other > Partition has for Linux and third one will have for MAC. I will use those partitions > As "Backing File" while emulating this device as CD-ROM. > > Now 3 partitions because,why a Windows user should see MAC and Linux softwares ? > Or a Linux user will not care about softwares for Windows and MAC. Why not? How can you know? What if the device is plugged into a server that is accessed over samba to a Windows machine? > Or even I should not confuse a user by giving 3 choices. If you handle your "autorun" files correctly, they will not be confused. And again, Linux doesn't need drivers on the device, that's not how Linux operates. > Instead best user experience > Will be if I can auto install those softwares by *detecting* OS on USB host. As Alan said, it is almost impossible to do that. > Here is one more option that I am thinking of, but have not tested yet, > 1. create 3 partitions on flash. > 2. Burn first partition with Windows related software and use filesystem as CDFS > 3. Burn second partition with MAC related software and use filesystem as HFS > 4. Burn third partition with Linux related software and use filesystem as ext2 > > Now, when device is connected to USB host, set autoloading of the module on device something like, > insmod g_file_storage.ko file=/dev/<second partition> > (or e.g., insmod g_file_storage.ko file=/dev/block/mtdblock2> > > now, assume that user is connecting this device to Windows, in that case Windows will report an error > saying that ohhh I don?t understand the filesystem on the device. (Note that I am trying with second partition > which has HFS filesystem on it.) I have used Windows machines that support ext2 and HFS. > And if device can get, somehow, this error then it will try The device can not get that error, in a way that does not require you to write a windows driver that is currently installed and running, sorry. And again, what about Windows machines that support HFS. Due to the ipod, it is becoming quite common. good luck, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html