Compare commits
1 Commits
master
...
39c0f158fe
| Author | SHA1 | Date | |
|---|---|---|---|
| 39c0f158fe |
+6
-4
@@ -12,17 +12,19 @@ fi
|
||||
|
||||
# Is the dwc2 overlay installed? Nothing will work if it isn't.
|
||||
if lsmod | grep -q "dwc2"; then
|
||||
systemd-cat -t gadget.sh -p info echo "DWC2 module loaded, setting up OTG gadget serial and ethernet"
|
||||
echo "DWC2 module loaded, setting up OTG gadget serial and ethernet" | logger -t $0 -p info
|
||||
echo "DWC2 module loaded"
|
||||
else
|
||||
systemd-cat -t gadget.sh -p warning echo "DWC2 module missing. Aborting OTG setup."
|
||||
echo "DWC2 module missing. Aborting OTG setup." | logger -t $0 -p info
|
||||
echo "DWC2 module missing"
|
||||
systemctl disable serial-getty@ttyGS0.service
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo modprobe libcomposite
|
||||
modprobe libcomposite
|
||||
cd /sys/kernel/config/usb_gadget
|
||||
if [ -d "MyGadget" ]; then
|
||||
systemd-cat -t gadget.sh -p warning echo "MyGadget already exists. Aborting OTG setup."
|
||||
echo "MyGadget already exists. Aborting OTG setup." | logger -t $0 -p info
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user