USB gadget

The goal of this project is to create an USB gadget in RAM.

$ dd if=/dev/zero of=/mnt/system.img bs=1k count=500 00

500+0 records in

500+0 records out

512000 bytes (500.0KB) copied, 0.030585 seconds, 16.0MB/s


$ losetup /dev/loop0 /mnt/system

$ mkfs.vfat /dev/loop0 50000


/lib/modules # mkfs.vfat -F32 -v /dev/loop0

Device '/dev/loop0':

heads:255, sectors/track:63, bytes/sector:512

media descriptor:f8

total sectors:100000, clusters:98454, sectors/cluster:1

FATs:2, sectors/FAT:770

volumeID:00000237, label:''

# mount -t vfat /dev/loop0 -o loop /test/


cd /lib/modules/

/lib/modules # insmod libcomposite.ko

/lib/modules # insmod g_mass_storage.ko file=/dev/loop0


Sujet: USB gadget

Aucun message nʼ a été trouvé.

Nouvel avis