Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Linux Software

Embedded Linux as Attached USB Storage Device? 20

dont_drink_the_water asks: "I am currently working on a few projects which will (hopefully) use Embedded Linux to deliver content (mp3 players, web servers, other possibilities). The question is, can Linux act as a USB attached hard drive, so that other machines can simply read/write data on the hard drive by using the USB port? Is anyone currently working on projects like this, and has any software been developed for this purpose?"
This discussion has been archived. No new comments can be posted.

Embedded Linux as Attached USB Storage Device?

Comments Filter:
  • The question is, can Linux act as a USB attached hard drive

    Oh yeah. In fact, you won't believe it, but I've actually got Linux acting as a power supply right now. I couldn't get Linux to act as a SoundBlaster Audigy, however, but I'm still working on it.

    -Bodero

  • by pwagland ( 472537 ) on Monday December 03, 2001 @11:02PM (#2652154) Journal
    plus a whole lot more... check it out here [terapin-mine.com].

    Note: While they say they are based on linux, they do not appear to of have released the sources anywhere that I can find. They do claim to be making a developers kit, but that is alos hard to find at the moment....

  • Hmm (Score:3, Interesting)

    by itwerx ( 165526 ) on Tuesday December 04, 2001 @12:40AM (#2652519) Homepage
    Why? It would be much cheaper and simpler to simply design an I/O interface to do that (or use any of the generic designs published by most of the big chip houses. E.g. NEC, Motorola, Maxim, etc.)
    Unless you're talking a RAID chassis or something (which be insanely stupid to hang off USB), it isn't much more than serial/parallel conversion/buffering with some voltage matching and a little driver code.
    Using embedded Linux for this would be like converting a laptop into a trip-computer for your bicycle. Major overkill.
    • by mlc ( 16290 )
      Yes, if *all* you want to do is I/O, you're right.

      But if my understanding of the question is correct, the poster wants to create an MP3 player or something that might actually have a use for an OS anyway. Once we already have an OS, can we make it behave as a USB non-host device? That seems to be the question.

      • Understood, but the same answer applies. What the poster is requesting is extreme overkill unless there are far more complex functions which were not mentioned.
        I have worked on a few embedded systems projects myself and have found that, in general, the KISS principle is quite applicable. Especially when somebody else has already done the development legwork for you.
        Everything mentioned in the question is faster and cheaper in ASIC format with perhaps a PIC or two for display and key enterfacing.
        Not until one gets into a system whose future use is uncertain, or the quantity of inputs and outputs exceeds a given number (depending on the ASIC's used) does the flexibility of a true embedded system become worthwhile.
        E.g. a PDA, definitely! A microwave oven, on the other hand, only qualifies because a manufacturer will have many models and it is cheaper to have a single core which can be reprogrammed with different features.

        Just my $.02. :)
  • I couldn't imagine a better idea than to run linux on my devices on a computer running linux. Infact, I have linux running on my sound processing unit which talks to my sound card, which also runs linux, which talks to my computer, which also runs linux. Infact, I dont have a single device that ISN'T based on some form of linux. Wow, the world is such a better place now that I run a seperate OS on everything.

    • Of course, with some of the QC problems that've been popping up in the kernel lately, you may find that doing a firmware/driver upgrade causes your speakers to catch on fire or the platters of your HDD to fly across the room, giving your goldfish a buzz cut.
  • by gillham ( 161958 ) on Tuesday December 04, 2001 @04:24AM (#2652964)
    The real question is whether Linux supports USB slave mode, rather than just host / master mode. Check this site [philips.com] for an example.

    Basically my understanding of this question is:
    "Can Linux act as a USB slave, and provide a slave or 'target' implementation of the USB Mass Storage Class?"

    In other words, can I build a fancy MP3 box with lots of storage that appears to be a USB hard drive to the host PC, but is really a Linux machine pretending to be "just" a USB hard disk?

    USB slave drivers and an Open Source implementation of the slave side of the USB Mass Storage Class would be cool.

    • Well, you could create a cable (such as the current PC->PC cables) with a chip to moderate...

      PC Master1 ---- dual-sided endpoint ----- PC master2

      The chip in the middle presents itself as a attached mass storage device to PC Master1 after configuration from PC2... Then it could buffer requests and data, and provide a solution... shouldn't be too hard to do with a little firmware.

      100BTX or Gigabit ethernet would be kinda nice, and a lot faster, too... (and allow a little more platform independance).
  • device (Score:2, Informative)

    The question is connectivity between different machines and devices...the terapin-mine was a great example. Thanks to those who even attempted to post something useful. The machine does more than just acting as a hard drive, of course, so yes, it will be necessary to have an operating system on it. The question still stands - how can a linux based machine act as a usb master and slave? Are there any existing projects?
  • I can't believe all the short sighted hecklers posting sarcastic relpies to this! Are you morons?
    Whether you're talking about a portable mp3 player, a wearable computer, or whatever the embedded application, can't you see the usefullness of being able to plug it into any computer usb port and have instant access to the file system? Here's one scenario: You have this linux-based mp3 player. You take it to work in the morning and plug it into your office pc where winamp accesses your mp3's to play through your pc sound system while you work. At the end of the day you copy the project you have been working on to the mp3 player hard disk. On the way home you stop at a friend's house and let him hear one of the new mp3's you've got. He want's a copy so you plug the player into his pc and copy the file over to his hard drive. He doesn't have broadband so you also leave him the latest 'what's cool' ISO so he can burn a copy (Hey you've got a 5gig drive on this thing, why not cary some cool stuff around) Then you go home and plug the player into your own pc and download the project you brought home from work.

    If you are talking about some other embedded application it could still be very usefull. The nice thing about it would be that you can plug the thing into any pc and have instant access to the files.
    • Thank god that someone here has a clue. I know how to really get the USB zealots going, firewire does this. You can connect two computers together using a firewire cable and get an instant network. heroinewarrior [heroinewarrior.com] has some code to do this for firewire. It's not identical in functionality but something nonetheless. Macs may or may not be able to do this too.

      t.

  • My Hipzip MP3 player from Iomega pretty much fits the bill. It runs on a proprietary os (dadio OS) which is based on eCos [redhat.com], [redhat.com] an embedded OS based on linux. It has updatable firmware and runs the OS on a maverick chip. It also has 40 MB removable media disks.

    While this is a far cry from the 5GB disk proposed somewhere above, the idea however is solid. A handheld device that runs a linux based embedded OS and can plug in as a drive under windows, macOS and probably linux (if I get USB support working).

    If you replaced the Iomega zip drive with a small hard drive, then it would be the device you are talking about.

    As is, the Hipzip allows me to store any file that fits into the 40MB limit.
  • The CerfCube [intrinsyc.com] is a ARM-based development board that can be used for designing USB devices. It runs Linux and has a number I/O capabilities.
  • Some time ago, when I saw an ad about the SanCube [micronet.com] I thought "That would be nice to have." and then "That should be possible to make!" especially since Firewire supports multiple masters and it's fast enough to make sense for a (albeit cheap) SAN.

    Having one SAN storage which can me expanded and then you can assign partitions to a certain host just is much more flexible than anything else a standard computer uses. LVM and netblock devices help though.

    Anyway, the point is, while USB has masters and slaves, Firewire does not distinguish between those, so every Firewire card can be host and slave, which makes it much easier from a hardware point of view to do, what the original poster wants to do.

    Now the software is a different thing. While USB is cheap and simple (the master controls and polls the slaves, the slaves just respond), Firewire is much more like SCSI: everyone can start to talk suddenly. Since I am not a device driver programmer, this is too much for me. But then, I am not the one who has to program the device drivers...

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...