summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-06-09 15:04:23 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-06-12 21:19:58 +0300
commitcc32934a2309e88774c217907f6a62bf32a9cd92 (patch)
tree38723f2a0a8b4985221169e97ccc8b20df5daa33 /README.md
parent15f8f2dddbf81923aec60284435961a1343c4917 (diff)
Add README.md file
Start by adding short build instructions. The documentation should be expanded later. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md51
1 files changed, 51 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..932db55
--- /dev/null
+++ b/README.md
@@ -0,0 +1,51 @@
+# uvcgadget - UVC gadget C library
+
+uvcgadget is a pure C library that implements handling of UVC gadget functions.
+
+## Utilities
+
+- uvc-gadget - Sample test application
+
+## Build instructions:
+
+To compile:
+
+```
+$ mkdir build
+$ cd build
+$ cmake ..
+$ make -j4
+```
+
+## Cross compiling instructions:
+
+Directions for cross compiling depend on the build environment.
+
+For buildroot-based builds, cmake can be pointed to the toolchain file provided
+by buildroot:
+
+```
+$ mkdir build
+$ cd build
+$ cmake -DCMAKE_TOOLCHAIN_FILE=<buildrootpath>/output/host/usr/share/buildroot/toolchainfile.cmake ..
+$ make -j4
+```
+
+If your build environment doesn't provide a CMake toolchain file, the following
+template can be used as a starting point.
+
+```
+set(CMAKE_SYSTEM_NAME Linux)
+
+set(BUILD_ENV_ROOT "/path/to/your/build/enviroment/root/")
+
+# Specify the cross compiler
+set(CMAKE_C_COMPILER ${BUILD_ENV_ROOT}/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc)
+
+# Where is the target environment
+set(CMAKE_FIND_ROOT_PATH ${BUILD_ENV_ROOT}/target ${BUILD_ENV_ROOT}/host)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+```