This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# mount configfs | |
mount -t configfs none /sys/kernel/config | |
# load libcomposite module | |
modprobe libcomposite | |
# create a gadget | |
mkdir /sys/kernel/config/usb_gadget/g1 | |
# cd to its configfs node | |
cd /sys/kernel/config/usb_gadget/g1 |