first try at emulating uvc camera
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 29 Jun 2019 09:29:52 +0000 (11:29 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 29 Jun 2019 09:29:52 +0000 (11:29 +0200)
README
uvc-gadget.sh [changed mode: 0644->0755]

diff --git a/README b/README
index 6db5b7d..6620a6f 100644 (file)
--- a/README
+++ b/README
@@ -29,4 +29,5 @@ http://github.com/wismna/raspberry-pi/hackpi
 
 https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget-testing.txt
 
-
+https://gist.github.com/kbingham/c39c4cc7c20882a104c08df5206e2f9f
+https://github.com/wlhe/uvc-gadget
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