Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 18672

Re: USB Gadget Mass Storage image location

$
0
0

Here's how to get at the storage in the msdos partition.

 

log into your Edison board over serial console or Wifi. If you're ssh-ing in over gadget rndis, you'll lose the connection because you have to unload the multifunction gadget. Here's the commands to make it available on your edison:

 

rmmod g_multi

mkdir /update

losetup -o 8192 /dev/loop0 /dev/disk/by-partlabel/update

mount /dev/loop0 /update

 

You  can now see the contents of the msdos partition in /update. And is writable, so you can put files in there.

 

To reverse this, and make it available on your host machine:

cd /

umount /update

modprobe g_multi

then pull the usb cable and re-insert it, at which stage the disk should re-appear on your host machine.

 

The reason for this is that you can't have two machines being the 'master' of the same partition at the same time, so you need to switch the owner. If it was NFS or Samba, the NFS or Samba process would always be in control. This case is different, as the g_multi driver allows the remote PC become the master, and cannot allow the Edison to also be writing to the disk at the same time.

 

Rgds,

Dave.


Viewing all articles
Browse latest Browse all 18672

Trending Articles