aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL
blob: 765fa26c7d93d090bc6bf775369855b39daed760 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Requirements:
-------------
* make and a C and C++ compiler
* optionally libjpeg v6 or later
* optionally Qt4 for building qv4l2

Building:
---------

If you checked out the source repository you need to install the autotools
environment and gettext first.

The autotools/gettext should be updated to the version that are shipped
on your distro. This can be done by running:
	$ ./bootstrap.sh

Then you need to configure any any desired options with:
	$ ./configure

You can get a summary of possible configurations via the --help option.
If used without arguments, it will set the install prefix to /usr/local/.

After configuration you need to start the build process with:
	$ make

Installing:
-----------

To install it at the prefix configured by ./configure, do, as root:
	# make install

Note that v4l-utils' "make install" supports DESTDIR for installing into
a build root for example:
	# make install DESTDIR=/mnt/sysimage

Cross Compiling:
----------------

Cross compiling has been tested with the Code Sourcery and Linaro ARM Linux
toolchain.

To cross compile with the Code Sourcery toolchain run the following commands:

export PATH=/opt/arm-2009q3/bin:$PATH
export PKG_CONFIG_LIBDIR=/path/to/cross/root/lib
./configure --host=arm-none-linux-gnueabi --without-jpeg
make

To cross compile with the Linaro toolchain run the following commands:

export PATH=/opt/gcc-linaro-arm-linux-gnueabihf-2012.09-20120921_linux/bin:$PATH
export PKG_CONFIG_LIBDIR=/path/to/cross/root/lib
./configure --host=arm-linux-gnueabihf --without-jpeg
make

Android Cross Compiling and Installing:
----------------

v4l-utils will only build using the complete AOSP source tree, because of the
stlport dependency.

List of v4l-utils that supply an Android.mk makefile:
* utils/v4l2-compliance
* utils/v4l2-ctl
* utils/v4l2-dbg

To cross compile an utility you must first configure the shell with Android's
envsetup.sh to add the mm alias, before running lunch to select your target
device.

cd /path/to/aosp
source build/envsetup.sh
lunch
cd /path/to/v4l-utils
cd <utility>
mm

Output binary will be located in the Android out directory, below the
target/product/<name>/system/bin/<v4l-utils executable name> path.

The binary executable can be pushed to the target Android device using
adb push <v4l-utils executable> /system/bin