X-Git-Url: http://git.rot13.org/?p=linux-usb-otg;a=blobdiff_plain;f=usb-composite-all.sh;h=4593a0143fe5ac56d56b552a0da90a91f4417cb5;hp=086578d8f3b928368f13b3359811aedd58ea7369;hb=2126c651eaa36269876326ec0d852d31ae66241c;hpb=70a2a155530bda803e88e90815f48c5b1cf9ea54 diff --git a/usb-composite-all.sh b/usb-composite-all.sh index 086578d..4593a01 100755 --- a/usb-composite-all.sh +++ b/usb-composite-all.sh @@ -1,4 +1,4 @@ -#!/bin/bash -xe +#!/bin/bash -e # this file is from: https://github.com/ckuethe/usbarmory/wiki/USB-Gadgets echo "creating composite mass-storage, serial, ethernet, hid..." @@ -24,12 +24,12 @@ echo 0x0100 > bcdDevice # v1.0.0 echo 0x0200 > bcdUSB # USB2 mkdir -p strings/0x409 -echo "fedcba9876543210" > strings/0x409/serialnumber -echo "girst" > strings/0x409/manufacturer -echo "Hardpass" > strings/0x409/product +echo `cat /proc/device-tree/serial-number` > strings/0x409/serialnumber +echo `uname -r` > strings/0x409/manufacturer +echo `hostname -s` > strings/0x409/product N="usb0" -mkdir -p functions/acm.$N +mkdir -p functions/acm.gs0 mkdir -p functions/ecm.$N mkdir -p functions/hid.$N mkdir -p functions/mass_storage.$N @@ -56,8 +56,8 @@ C=1 mkdir -p configs/c.$C/strings/0x409 echo "Config $C: ECM network" > configs/c.$C/strings/0x409/configuration echo 250 > configs/c.$C/MaxPower -ln -s functions/acm.$N configs/c.$C/ -ln -s functions/ecm.$N configs/c.$C/ +ln -s functions/acm.gs0 configs/c.$C/ +#ln -s functions/ecm.$N configs/c.$C/ ln -s functions/mass_storage.$N configs/c.$C/ ln -s functions/hid.$N configs/c.$C/