Disable USB mass storage

When I connect the BeagleBone Black to my PC it shows up as as USB mass storage device. Is there some way that I can disable this function? I want to use Ethernet over USB but I don’t want it to act as a storage device.

In Angstrom:

modify:

/usr/bin/g-ether-load.sh

https://github.com/beagleboard/meta-beagleboard/blob/master/meta-beagleboard-extras/recipes-support/usb-gadget/gadget-init/g-ether-load.sh#L64

see:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/usb/gadget_multi.txt
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/usb/mass-storage.txt

Regards,

Hi RCN,

How about your latest Ubuntu demo image?

SG

/opt/scripts/boot/am335*

In my Debian I did
sudo nano /opt/scripts/boot/am335x_evm.sh

You could comment out line shown below, but it would disable Ethernet.

#modprobe g_multi file=${gadget_partition} cdrom=0 stall=0 removable=1 nofua=1 iSerialNumber=${SERIAL_NUMBER} iManufacturer=Circuitco iProduct=BeagleBone${BLACK} host_addr=${cpsw_1_mac}

add this to have Ethernet

modprobe g_ether host_addr=${cpsw_1_mac}