Adding aleksa24 detect for pre-compiled DWC2

This commit is contained in:
2026-09-04 09:42:39 +00:00
parent eb5a4cb3d9
commit 9c49411159
+4 -2
View File
@@ -11,8 +11,10 @@ fi
# Is the dwc2 overlay installed? Nothing will work if it isn't. # Is the dwc2 overlay installed? Nothing will work if it isn't.
if lsmod | grep -q "dwc2"; then if [ -d /sys/class/udc ] && [ -n "$(ls -A /sys/class/udc)" ]; then
systemd-cat -t gadget.sh -p info echo "DWC2 module loaded, setting up OTG gadget serial and ethernet" systemd-cat -t gadget.sh -p info echo "DWC2 precompiled, setting up OTG gadget serial and ethernet"
elif lsmod | grep -q "dwc2"; then
systemd-cat -t gadget.sh -p info echo "Pre 6.18.39 kernel. DWC2 module loaded, setting up OTG gadget serial and ethernet"
else else
systemd-cat -t gadget.sh -p warning echo "DWC2 module missing. Aborting OTG setup." systemd-cat -t gadget.sh -p warning echo "DWC2 module missing. Aborting OTG setup."
systemctl disable serial-getty@ttyGS0.service systemctl disable serial-getty@ttyGS0.service