first try at emulating uvc camera
[linux-usb-otg] / uvc-gadget.sh
old mode 100644 (file)
new mode 100755 (executable)
index 4b8a4f1..00fd4ee
@@ -1,6 +1,17 @@
 #!/bin/sh
 
 # https://gist.github.com/kbingham/c39c4cc7c20882a104c08df5206e2f9f
+# needs user-space part https://github.com/wlhe/uvc-gadget
+
+if [ ! -d uvc-gadget ] ; then
+       git clone https://github.com/wlhe/uvc-gadget
+       cd uvc-gadget && make
+       cd -
+fi
+
+
+# load module
+cd /sys/kernel/config/usb_gadget/ || modprobe libcomposite
 
 set -e
 #set -x