projects
/
linux-usb-otg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
70a2a15
)
create usb disk image
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 28 Aug 2017 06:00:06 +0000
(08:00 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 28 Aug 2017 06:00:06 +0000
(08:00 +0200)
usb-composite-all.sh
patch
|
blob
|
history
diff --git
a/usb-composite-all.sh
b/usb-composite-all.sh
index
086578d
..
324a6ac
100755
(executable)
--- a/
usb-composite-all.sh
+++ b/
usb-composite-all.sh
@@
-29,16
+29,16
@@
echo "girst" > strings/0x409/manufacturer
echo "Hardpass" > strings/0x409/product
N="usb0"
echo "Hardpass" > 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
# first byte of address must be even
mkdir -p functions/ecm.$N
mkdir -p functions/hid.$N
mkdir -p functions/mass_storage.$N
# first byte of address must be even
-HOST="
48:6f
:73:74:50:43" # "HostPC"
-SELF="
42:6
1:64:55:53:42" # "BadUSB"
-echo $HOST > functions/ecm.$N/host_addr
-echo $SELF > functions/ecm.$N/dev_addr
+HOST="
aa:00
:73:74:50:43" # "HostPC"
+SELF="
aa:0
1:64:55:53:42" # "BadUSB"
+
#
echo $HOST > functions/ecm.$N/host_addr
+
#
echo $SELF > functions/ecm.$N/dev_addr
echo 1 > functions/mass_storage.$N/stall
echo 0 > functions/mass_storage.$N/lun.0/cdrom
echo 1 > functions/mass_storage.$N/stall
echo 0 > functions/mass_storage.$N/lun.0/cdrom
@@
-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
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/
ln -s functions/mass_storage.$N configs/c.$C/
ln -s functions/hid.$N configs/c.$C/