On Tue, Sep 18 2012, Andrzej Pietrasiewicz wrote: > This is how I would like to setup the gadget with mass storage > (udc interface unchanged, so no udc choice for user; configfs root > for the gadget is named "usb-function-gadget", probably to be changed > after the udc-core supports choice of other than first available; some > names probably to be changed as well, e.g. iManufacturer->manufacturer > or something like that, connect->ready): > > $ insmod libcomposite.ko > $ insmod g_usb_functions.ko > $ mount -t configfs none /cfg > $ mkdir -p /cfg/usb-function-gadget/ufg/config1/function1 > $ echo -n <some id> > /cfg/usb-function-gadget/ufg/idVendor I assume -n would not really be needed. > $ echo -n <some id> > /cfg/usb-function-gadget/ufg/idProduct > $ echo -n <something> > /cfg/usb-function-gadget/ufg/bcdDevice > $ echo -n <string> > /cfg/usb-function-gadget/ufg/iManufacturer > $ echo -n <string> > /cfg/usb-function-gadget/ufg/iSerialNumber > $ echo -n <string> > /cfg/usb-function-gadget/ufg/iProduct > $ echo -n "f_mass_storage" > /cfg/usb-function-gadget/ufg/\ > config1/function1/name I'd drop “f_” prefix. After all, everything is a function here, the prefix serves no purpose. > $ mkdir /cfg/usb-function-gadget/ufg/config1/function1/\ > f_mass_storage > $ echo -n 1 > /cfg/usb-function-gadget/ufg/config1/function1/\ > f_mass_storage/luns > $ mkdir /cfg/usb-function-gadget/ufg/config1/function1/\ > f_mass_storage/lun0 > $ echo -n "file.img" > /cfg/usb-function-gadget/ufg/config1/\ > function1/f_mass_storage/lun0/file > $ echo -n 1 > /cfg/usb-function-gadget/ufg/connect -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michał “mina86” Nazarewicz (o o) ooo +----<email/xmpp: mpn@xxxxxxxxxx>--------------ooO--(_)--Ooo--
Attachment:
pgpn8J3yw2I6D.pgp
Description: PGP signature