embeded/raspberry pi2015. 8. 9. 01:02

CSI 를 통한 카메라가 v4l을 지원하지 않아 좀 불편해서..

(현재까진 raspivid 툴을 통해서 stdin으로 받는 수 밖에..)

이리저리 방법을 찾는중


음? MMAL은 또 머지?

The camera works with all models of Raspberry Pi 1 and 2. It can be accessed through the MMAL and V4L APIs, and there are numerous third-party libraries built for it, including the Picamera Python library.

[링크 : https://www.raspberrypi.org/products/camera-module/]


머.. 쉽게 될리가 없나? ㅋㅋㅋ

일단 automake에서 파일이 없다고 배째는 지라 확인필요 ㅠㅠ


---

빌드 명령어 모음

$ git clone git://git.linuxtv.org/v4l-utils.git

$ cd v4l-utils/

$ sudo apt-get install autoconf gettext libtool libjpeg62-dev

$ ./bootstrap.sh

$ ./configure

$ vi utils/dvb/Makefile

LIBS = -lrt

$ make -j 4

$ sudo make install

$ sudo modprobe bcm2835-v4l2

$ sudo v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=4

$ vlc


set은 sudo를 통해 되지만.

vlc로 받는 순간 다시 원복된다 머지...


$ v4l2-ctl --get-fmt-video

Format Video Capture:

        Width/Height      : 2592/16

        Pixel Format      : 'YU12'

        Field             : None

        Bytes per Line    : 3888

        Size Image        : 62208

        Colorspace        : SMPTE 170M

        Transfer Function : Default

        YCbCr Encoding    : Default

        Quantization      : Default

        Flags             :


---




pi@raspberrypi ~/src/v4l-utils $ lsmod | grep -i v4l

pi@raspberrypi ~/src/v4l-utils $ sudo modprobe bcm2835-v4l2

pi@raspberrypi ~/src/v4l-utils $ lsmod | grep -i v4l

bcm2835_v4l2           37225  0

videobuf2_vmalloc       3009  1 bcm2835_v4l2

videobuf2_core         33578  1 bcm2835_v4l2

v4l2_common             5077  2 bcm2835_v4l2,videobuf2_core

videodev              122487  3 bcm2835_v4l2,v4l2_common,videobuf2_core

pi@raspberrypi ~/src/v4l-utils $ v4l2-ctl --overlay=1

pi@raspberrypi ~/src/v4l-utils $ v4l2-ctl --set-fmt-video=width=1920,height=1088,pixelformat=4

pi@raspberrypi ~/src/v4l-utils $ v4l2-ctl --stream-mmap=3 --stream-count=100 --stream-to=somefile.264

<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 27 fps

<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 29 fps

<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 28 fps

<<<<<<<<<<<<<

pi@raspberrypi ~/src/v4l-utils $ file somefile.264

somefile.264: JVT NAL sequence, H.264 video @ L 40

pi@raspberrypi ~/src/v4l-utils $ v4l2-ctl --list-formats

ioctl: VIDIOC_ENUM_FMT

        Index       : 0

        Type        : Video Capture

        Pixel Format: 'YU12'

        Name        : 4:2:0, packed YUV


        Index       : 1

        Type        : Video Capture

        Pixel Format: 'YUYV'

        Name        : 4:2:2, packed, YUYV


        Index       : 2

        Type        : Video Capture

        Pixel Format: 'RGB3'

        Name        : RGB24 (LE)


        Index       : 3

        Type        : Video Capture

        Pixel Format: 'JPEG' (compressed)

        Name        : JPEG


        Index       : 4

        Type        : Video Capture

        Pixel Format: 'H264' (compressed)

        Name        : H264


        Index       : 5

        Type        : Video Capture

        Pixel Format: 'MJPG' (compressed)

        Name        : MJPEG


        Index       : 6

        Type        : Video Capture

        Pixel Format: 'YVYU'

        Name        : 4:2:2, packed, YVYU


        Index       : 7

        Type        : Video Capture

        Pixel Format: 'VYUY'

        Name        : 4:2:2, packed, VYUY


        Index       : 8

        Type        : Video Capture

        Pixel Format: 'UYVY'

        Name        : 4:2:2, packed, UYVY


        Index       : 9

        Type        : Video Capture

        Pixel Format: 'NV12'

        Name        : 4:2:0, packed, NV12


        Index       : 10

        Type        : Video Capture

        Pixel Format: 'BGR3'

        Name        : RGB24 (BE)


        Index       : 11

        Type        : Video Capture

        Pixel Format: 'YV12'

        Name        : 4:2:0, packed YVU


        Index       : 12

        Type        : Video Capture

        Pixel Format: 'NV21'

        Name        : 4:2:0, packed, NV21


        Index       : 13

        Type        : Video Capture

        Pixel Format: 'BGR4'

        Name        : RGB32 (BE)


pi@raspberrypi ~ $ v4l2-ctl --set-fmt-video=width=1920,height=1088,pixelformat=4

pi@raspberrypi ~ $ vlc





+

User space v4l driver

[링크 : http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14]


+

Kernel v4l driver / module

pi@raspberrypi ~/src $ git clone git://git.linuxtv.org/v4l-utils.git

Cloning into 'v4l-utils'...

remote: Counting objects: 21249, done.

remote: Compressing objects: 100% (4162/4162), done.

remote: Total 21249 (delta 16889), reused 21249 (delta 16889)

Receiving objects: 100% (21249/21249), 3.55 MiB | 699 KiB/s, done.

Resolving deltas: 100% (16889/16889), done.


pi@raspberrypi ~/src $ cd v4l-utils/

pi@raspberrypi ~/src/v4l-utils $ sudo apt-get install autoconf gettext libtool libjpeg62-dev

패키지 목록을 읽는 중입니다... 완료

의존성 트리를 만드는 중입니다

상태 정보를 읽는 중입니다... 완료

다음 패키지를 더 설치할 것입니다:

  automake autopoint autotools-dev libgettextpo0 libjpeg62 libltdl-dev

  libunistring0 m4

제안하는 패키지:

  autoconf2.13 autoconf-archive gnu-standards autoconf-doc gettext-doc

  libtool-doc automaken gfortran fortran95-compiler gcj

다음 새 패키지를 설치할 것입니다:

  autoconf automake autopoint autotools-dev gettext libgettextpo0 libjpeg62

  libjpeg62-dev libltdl-dev libtool libunistring0 m4

0개 업그레이드, 12개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.

5,660 k바이트 아카이브를 받아야 합니다.

이 작업 후 15.2 M바이트의 디스크 공간을 더 사용하게 됩니다.

계속 하시겠습니까 [Y/n]?

받기:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libunistring0 armhf 0.9.3-5 [408 kB]

받기:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgettextpo0 armhf 0.18.1.1-9 [130 kB]

받기:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libjpeg62 armhf 6b1-3+deb7u1 [85.9 kB]

받기:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main m4 armhf 1.4.16-3 [246 kB]

받기:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main autoconf all 2.69-1 [589 kB]

받기:6 http://mirrordirector.raspbian.org/raspbian/ wheezy/main autotools-dev all 20120608.1 [73.0 kB]

받기:7 http://mirrordirector.raspbian.org/raspbian/ wheezy/main automake all 1:1.11.6-1 [607 kB]

받기:8 http://mirrordirector.raspbian.org/raspbian/ wheezy/main autopoint all 0.18.1.1-9 [629 kB]

받기:9 http://mirrordirector.raspbian.org/raspbian/ wheezy/main gettext armhf 0.18.1.1-9 [1,879 kB]

받기:10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libltdl-dev armhf 2.4.2-1.1 [203 kB]

받기:11 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libtool armhf 2.4.2-1.1 [618 kB]

받기:12 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libjpeg62-dev armhf 6b1-3+deb7u1 [191 kB]

내려받기 5,660 k바이트, 소요시간 6초 (825 k바이트/초)

Selecting previously unselected package libunistring0:armhf.

(데이터베이스 읽는중 ...현재 92899개의 파일과 디렉터리가 설치되어 있습니다.)

libunistring0:armhf 패키지를 푸는 중입니다 (.../libunistring0_0.9.3-5_armhf.deb에서) ...

Selecting previously unselected package libgettextpo0:armhf.

libgettextpo0:armhf 패키지를 푸는 중입니다 (.../libgettextpo0_0.18.1.1-9_armhf.deb에서) ...

Selecting previously unselected package libjpeg62:armhf.

libjpeg62:armhf 패키지를 푸는 중입니다 (.../libjpeg62_6b1-3+deb7u1_armhf.deb에서) ...

Selecting previously unselected package m4.

m4 패키지를 푸는 중입니다 (.../archives/m4_1.4.16-3_armhf.deb에서) ...

Selecting previously unselected package autoconf.

autoconf 패키지를 푸는 중입니다 (.../autoconf_2.69-1_all.deb에서) ...

Selecting previously unselected package autotools-dev.

autotools-dev 패키지를 푸는 중입니다 (.../autotools-dev_20120608.1_all.deb에서) ...

Selecting previously unselected package automake.

automake 패키지를 푸는 중입니다 (.../automake_1%3a1.11.6-1_all.deb에서) ...

Selecting previously unselected package autopoint.

autopoint 패키지를 푸는 중입니다 (.../autopoint_0.18.1.1-9_all.deb에서) ...

Selecting previously unselected package gettext.

gettext 패키지를 푸는 중입니다 (.../gettext_0.18.1.1-9_armhf.deb에서) ...

Selecting previously unselected package libltdl-dev:armhf.

libltdl-dev:armhf 패키지를 푸는 중입니다 (.../libltdl-dev_2.4.2-1.1_armhf.deb에서) ...

Selecting previously unselected package libtool.

libtool 패키지를 푸는 중입니다 (.../libtool_2.4.2-1.1_armhf.deb에서) ...

Selecting previously unselected package libjpeg62-dev:armhf.

libjpeg62-dev:armhf 패키지를 푸는 중입니다 (.../libjpeg62-dev_6b1-3+deb7u1_armhf.deb에서) ...

install-info에 대한 트리거를 처리하는 중입니다 ...

man-db에 대한 트리거를 처리하는 중입니다 ...

libunistring0:armhf (0.9.3-5) 설정하는 중입니다 ...

libgettextpo0:armhf (0.18.1.1-9) 설정하는 중입니다 ...

libjpeg62:armhf (6b1-3+deb7u1) 설정하는 중입니다 ...

m4 (1.4.16-3) 설정하는 중입니다 ...

autoconf (2.69-1) 설정하는 중입니다 ...

autotools-dev (20120608.1) 설정하는 중입니다 ...

automake (1:1.11.6-1) 설정하는 중입니다 ...

update-alternatives: using /usr/bin/automake-1.11 to provide /usr/bin/automake (automake) in 자동 모드

autopoint (0.18.1.1-9) 설정하는 중입니다 ...

gettext (0.18.1.1-9) 설정하는 중입니다 ...

libltdl-dev:armhf (2.4.2-1.1) 설정하는 중입니다 ...

libtool (2.4.2-1.1) 설정하는 중입니다 ...

libjpeg62-dev:armhf (6b1-3+deb7u1) 설정하는 중입니다 ...


pi@raspberrypi ~/src/v4l-utils $  autoreconf -vfi

autoreconf: Entering directory `.'

autoreconf: configure.ac: not using Gettext

autoreconf: running: aclocal --force -I m4

autoreconf: configure.ac: tracing

autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION

autoreconf: configure.ac: creating directory build-aux

autoreconf: running: libtoolize --copy --force

libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.

libtoolize: copying file `build-aux/ltmain.sh'

libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.

libtoolize: copying file `m4/libtool.m4'

libtoolize: copying file `m4/ltoptions.m4'

libtoolize: copying file `m4/ltsugar.m4'

libtoolize: copying file `m4/ltversion.m4'

libtoolize: copying file `m4/lt~obsolete.m4'

autoreconf: running: /usr/bin/autoconf --force

autoreconf: running: /usr/bin/autoheader --force

autoreconf: running: automake --add-missing --copy --force-missing

configure.ac:76: installing `build-aux/config.guess'

configure.ac:83: required file `build-aux/config.rpath' not found

configure.ac:76: installing `build-aux/config.sub'

configure.ac:67: installing `build-aux/install-sh'

configure.ac:67: installing `build-aux/missing'

contrib/cobalt/Makefile.am: installing `build-aux/depcomp'

autoreconf: automake failed with exit status: 1


pi@raspberrypi ~/src/v4l-utils $ ./configure

checking for gcc... gcc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking how to run the C preprocessor... gcc -E

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking minix/config.h usability... no

checking minix/config.h presence... no

checking for minix/config.h... no

checking whether it is safe to define __EXTENSIONS__... yes

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... no

checking for mawk... mawk

checking whether make sets $(MAKE)... yes

checking for style of include used by make... GNU

checking dependency style of gcc... gcc3

checking whether to enable maintainer-specific portions of Makefiles... no

checking whether make supports nested variables... yes

checking for g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking dependency style of g++... gcc3

checking for gcc option to accept ISO C99... -std=gnu99

checking build system type... armv7l-unknown-linux-gnueabihf

checking host system type... armv7l-unknown-linux-gnueabihf

checking how to print strings... printf

checking for a sed that does not truncate output... /bin/sed

checking for fgrep... /bin/grep -F

checking for ld used by gcc -std=gnu99... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

checking the name lister (/usr/bin/nm -B) interface... BSD nm

checking whether ln -s works... yes

checking the maximum length of command line arguments... 1572864

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop

checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop

checking for /usr/bin/ld option to reload object files... -r

checking for objdump... objdump

checking how to recognize dependent libraries... pass_all

checking for dlltool... no

checking how to associate runtime and link libraries... printf %s\n

checking for ar... ar

checking for archiver @FILE support... @

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok

checking for sysroot... no

checking for mt... mt

checking if mt is a manifest tool... no

checking for dlfcn.h... yes

checking for objdir... .libs

checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no

checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC

checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes

checking if gcc -std=gnu99 static flag -static works... yes

checking if gcc -std=gnu99 supports -c -o file.o... yes

checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes

checking whether the gcc -std=gnu99 linker (/usr/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking how to run the C++ preprocessor... g++ -E

checking for ld used by g++... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking for g++ option to produce PIC... -fPIC -DPIC

checking if g++ PIC flag -fPIC -DPIC works... yes

checking if g++ static flag -static works... yes

checking if g++ supports -c -o file.o... yes

checking if g++ supports -c -o file.o... (cached) yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking dynamic linker characteristics... (cached) GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether ln -s works... yes

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking for doxygen... no

configure: WARNING: doxygen not found - will not generate any doxygen documentation

checking for perl... /usr/bin/perl

checking whether NLS is requested... yes

checking for msgfmt... /usr/bin/msgfmt

checking for gmsgfmt... /usr/bin/msgfmt

checking for xgettext... /usr/bin/xgettext

checking for msgmerge... /usr/bin/msgmerge

checking for ld used by GCC... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for shared library run path origin... /bin/bash: build-aux/config.rpath: No such file or directory

done

checking for CFPreferencesCopyAppValue... no

checking for CFLocaleCopyCurrent... no

checking for GNU gettext in libc... yes

checking whether to use NLS... yes

checking where the gettext function comes from... libc

checking for mode_t... yes

checking for promoted mode_t type... mode_t

checking whether the -Werror option is usable... yes

checking for simple visibility declarations... yes

checking sys/klog.h usability... yes

checking sys/klog.h presence... yes

checking for sys/klog.h... yes

checking for klogctl... yes

checking for ioctl with POSIX signature... no

checking for __secure_getenv... yes

checking for secure_getenv... no

checking for X11... yes

checking for GL... yes

checking for GLU... yes

checking jpeglib.h usability... yes

checking jpeglib.h presence... yes

checking for jpeglib.h... yes

checking for jpeg_read_header in -ljpeg... yes

checking for QT5... no

checking for QT... no

configure: WARNING: Qt4 or higher is not available

checking for ALSA... no

configure: WARNING: ALSA library not available

checking for library containing dlopen... -ldl

checking argp.h usability... yes

checking argp.h presence... yes

checking for argp.h... yes

checking for library containing argp_parse... none required

checking linux/i2c-dev.h usability... yes

checking linux/i2c-dev.h presence... yes

checking for linux/i2c-dev.h... yes

checking for iconv... yes

checking for working iconv... yes

checking for iconv declaration...

         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);

./configure: line 21526: test: =: unary operator expected

configure: creating ./config.status

config.status: error: cannot find input file: `Makefile.in'


[링크 : http://www.ics.com/blog/raspberry-pi-camera-module] 


+

INSTALL 문서를 보니

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 


$ ./bootstrap.sh

를 실행하래서 쿨하게 실행중 


pi@raspberrypi ~/src/v4l-utils $ ./bootstrap.sh

autoreconf: Entering directory `.'

autoreconf: configure.ac: not using Gettext

autoreconf: running: aclocal --force -I m4

autoreconf: configure.ac: tracing

autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION

autoreconf: running: libtoolize --copy --force

libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.

libtoolize: copying file `build-aux/ltmain.sh'

libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.

libtoolize: copying file `m4/libtool.m4'

libtoolize: copying file `m4/ltoptions.m4'

libtoolize: copying file `m4/ltsugar.m4'

libtoolize: copying file `m4/ltversion.m4'

libtoolize: copying file `m4/lt~obsolete.m4'

autoreconf: running: /usr/bin/autoconf --force

autoreconf: running: /usr/bin/autoheader --force

autoreconf: running: automake --add-missing --copy --force-missing

autoreconf: Leaving directory `.'

Generating locale v4l-utils-po build files for gettext version 0.18.1

Generating locale libdvbv5-po build files for gettext version 0.18.1 


오예!!!

pi@raspberrypi ~/src/v4l-utils $ ./configure

checking for gcc... gcc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking how to run the C preprocessor... gcc -E

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking minix/config.h usability... no

checking minix/config.h presence... no

checking for minix/config.h... no

checking whether it is safe to define __EXTENSIONS__... yes

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... no

checking for mawk... mawk

checking whether make sets $(MAKE)... yes

checking for style of include used by make... GNU

checking dependency style of gcc... gcc3

checking whether to enable maintainer-specific portions of Makefiles... no

checking whether make supports nested variables... yes

checking for g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking dependency style of g++... gcc3

checking for gcc option to accept ISO C99... -std=gnu99

checking build system type... armv7l-unknown-linux-gnueabihf

checking host system type... armv7l-unknown-linux-gnueabihf

checking how to print strings... printf

checking for a sed that does not truncate output... /bin/sed

checking for fgrep... /bin/grep -F

checking for ld used by gcc -std=gnu99... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

checking the name lister (/usr/bin/nm -B) interface... BSD nm

checking whether ln -s works... yes

checking the maximum length of command line arguments... 1572864

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop

checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop

checking for /usr/bin/ld option to reload object files... -r

checking for objdump... objdump

checking how to recognize dependent libraries... pass_all

checking for dlltool... no

checking how to associate runtime and link libraries... printf %s\n

checking for ar... ar

checking for archiver @FILE support... @

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok

checking for sysroot... no

checking for mt... mt

checking if mt is a manifest tool... no

checking for dlfcn.h... yes

checking for objdir... .libs

checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no

checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC

checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes

checking if gcc -std=gnu99 static flag -static works... yes

checking if gcc -std=gnu99 supports -c -o file.o... yes

checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes

checking whether the gcc -std=gnu99 linker (/usr/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking how to run the C++ preprocessor... g++ -E

checking for ld used by g++... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking for g++ option to produce PIC... -fPIC -DPIC

checking if g++ PIC flag -fPIC -DPIC works... yes

checking if g++ static flag -static works... yes

checking if g++ supports -c -o file.o... yes

checking if g++ supports -c -o file.o... (cached) yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking dynamic linker characteristics... (cached) GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether ln -s works... yes

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking for doxygen... no

configure: WARNING: doxygen not found - will not generate any doxygen documentation

checking for perl... /usr/bin/perl

checking whether NLS is requested... yes

checking for msgfmt... /usr/bin/msgfmt

checking for gmsgfmt... /usr/bin/msgfmt

checking for xgettext... /usr/bin/xgettext

checking for msgmerge... /usr/bin/msgmerge

checking for ld used by GCC... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for shared library run path origin... done

checking for CFPreferencesCopyAppValue... no

checking for CFLocaleCopyCurrent... no

checking for GNU gettext in libc... yes

checking whether to use NLS... yes

checking where the gettext function comes from... libc

checking for mode_t... yes

checking for promoted mode_t type... mode_t

checking whether the -Werror option is usable... yes

checking for simple visibility declarations... yes

checking sys/klog.h usability... yes

checking sys/klog.h presence... yes

checking for sys/klog.h... yes

checking for klogctl... yes

checking for ioctl with POSIX signature... no

checking for __secure_getenv... yes

checking for secure_getenv... no

checking for X11... yes

checking for GL... yes

checking for GLU... yes

checking jpeglib.h usability... yes

checking jpeglib.h presence... yes

checking for jpeglib.h... yes

checking for jpeg_read_header in -ljpeg... yes

checking for QT5... no

checking for QT... no

configure: WARNING: Qt4 or higher is not available

checking for ALSA... no

configure: WARNING: ALSA library not available

checking for library containing dlopen... -ldl

checking argp.h usability... yes

checking argp.h presence... yes

checking for argp.h... yes

checking for library containing argp_parse... none required

checking linux/i2c-dev.h usability... yes

checking linux/i2c-dev.h presence... yes

checking for linux/i2c-dev.h... yes

checking for iconv... yes

checking for working iconv... yes

checking for iconv declaration...

         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);

./configure: line 21526: test: =: unary operator expected

configure: creating ./config.status

config.status: creating Makefile

config.status: creating lib/Makefile

config.status: creating lib/libv4lconvert/Makefile

config.status: creating lib/libv4l2/Makefile

config.status: creating lib/libv4l1/Makefile

config.status: creating lib/libdvbv5/Makefile

config.status: creating lib/libv4l2rds/Makefile

config.status: creating lib/libv4l-mplane/Makefile

config.status: creating utils/Makefile

config.status: creating utils/libv4l2util/Makefile

config.status: creating utils/libmedia_dev/Makefile

config.status: creating utils/decode_tm6000/Makefile

config.status: creating utils/dvb/Makefile

config.status: creating utils/keytable/Makefile

config.status: creating utils/media-ctl/Makefile

config.status: creating utils/rds/Makefile

config.status: creating utils/v4l2-compliance/Makefile

config.status: creating utils/v4l2-ctl/Makefile

config.status: creating utils/v4l2-dbg/Makefile

config.status: creating utils/v4l2-sysfs-path/Makefile

config.status: creating utils/xc3028-firmware/Makefile

config.status: creating utils/qv4l2/Makefile

config.status: creating utils/rds-ctl/Makefile

config.status: creating contrib/Makefile

config.status: creating contrib/freebsd/Makefile

config.status: creating contrib/test/Makefile

config.status: creating contrib/gconv/Makefile

config.status: creating contrib/cobalt/Makefile

config.status: creating v4l-utils-po/Makefile.in

config.status: creating libdvbv5-po/Makefile.in

config.status: creating v4l-utils.spec

config.status: creating lib/libv4lconvert/libv4lconvert.pc

config.status: creating lib/libv4l1/libv4l1.pc

config.status: creating lib/libv4l2/libv4l2.pc

config.status: creating lib/libdvbv5/libdvbv5.pc

config.status: creating lib/libv4l2rds/libv4l2rds.pc

config.status: creating utils/media-ctl/libmediactl.pc

config.status: creating utils/media-ctl/libv4l2subdev.pc

config.status: creating utils/qv4l2/qv4l2.1

config.status: creating utils/v4l2-compliance/v4l2-compliance.1

config.status: creating utils/v4l2-ctl/v4l2-ctl.1

config.status: creating utils/keytable/ir-keytable.1

config.status: creating utils/dvb/dvb-fe-tool.1

config.status: creating utils/dvb/dvbv5-scan.1

config.status: creating utils/dvb/dvb-format-convert.1

config.status: creating utils/dvb/dvbv5-zap.1

config.status: creating config.h

config.status: executing depfiles commands

config.status: executing libtool commands

config.status: executing po-directories commands

config.status: creating v4l-utils-po/POTFILES

config.status: creating v4l-utils-po/Makefile

config.status: creating libdvbv5-po/POTFILES

config.status: creating libdvbv5-po/Makefile 


$ make

...

make[3]: Entering directory '/home/pi/src/v4l-utils/utils/dvb'

  CC     dvb-fe-tool.o

  CCLD   dvb-fe-tool

../../lib/libdvbv5/.libs/libdvbv5.so: undefined reference to `clock_gettime' 


아으으으으윽 ㅠㅠ


pi@raspberrypi ~/src/v4l-utils $ ./configure --help

`configure' configures v4l-utils 1.7.0 to adapt to many kinds of systems.


Usage: ./configure [OPTION]... [VAR=VALUE]...


To assign environment variables (e.g., CC, CFLAGS...), specify them as

VAR=VALUE.  See below for descriptions of some of the useful variables.


Defaults for the options are specified in brackets.


Configuration:

  -h, --help              display this help and exit

      --help=short        display options specific to this package

      --help=recursive    display the short help of all the included packages

  -V, --version           display version information and exit

  -q, --quiet, --silent   do not print `checking ...' messages

      --cache-file=FILE   cache test results in FILE [disabled]

  -C, --config-cache      alias for `--cache-file=config.cache'

  -n, --no-create         do not create output files

      --srcdir=DIR        find the sources in DIR [configure dir or `..']


Installation directories:

  --prefix=PREFIX         install architecture-independent files in PREFIX

                          [/usr/local]

  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX

                          [PREFIX]


By default, `make install' will install all the files in

`/usr/local/bin', `/usr/local/lib' etc.  You can specify

an installation prefix other than `/usr/local' using `--prefix',

for instance `--prefix=$HOME'.


For better control, use the options below.


Fine tuning of the installation directories:

  --bindir=DIR            user executables [EPREFIX/bin]

  --sbindir=DIR           system admin executables [EPREFIX/sbin]

  --libexecdir=DIR        program executables [EPREFIX/libexec]

  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]

  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]

  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]

  --libdir=DIR            object code libraries [EPREFIX/lib]

  --includedir=DIR        C header files [PREFIX/include]

  --oldincludedir=DIR     C header files for non-gcc [/usr/include]

  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]

  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]

  --infodir=DIR           info documentation [DATAROOTDIR/info]

  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]

  --mandir=DIR            man documentation [DATAROOTDIR/man]

  --docdir=DIR            documentation root [DATAROOTDIR/doc/v4l-utils]

  --htmldir=DIR           html documentation [DOCDIR]

  --dvidir=DIR            dvi documentation [DOCDIR]

  --pdfdir=DIR            pdf documentation [DOCDIR]

  --psdir=DIR             ps documentation [DOCDIR]


Program names:

  --program-prefix=PREFIX            prepend PREFIX to installed program names

  --program-suffix=SUFFIX            append SUFFIX to installed program names

  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names


System types:

  --build=BUILD     configure for building on BUILD [guessed]

  --host=HOST       cross-compile to build programs to run on HOST [BUILD]


Optional Features:

  --disable-option-checking  ignore unrecognized --enable/--with options

  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)

  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]

  --disable-dependency-tracking  speeds up one-time build

  --enable-dependency-tracking   do not reject slow dependency extractors

  --enable-maintainer-mode  enable make rules and dependencies not useful

                          (and sometimes confusing) to the casual installer

  --enable-silent-rules          less verbose build output (undo: `make V=1')

  --disable-silent-rules         verbose build output (undo: `make V=0')

  --enable-shared[=PKGS]  build shared libraries [default=yes]

  --enable-static[=PKGS]  build static libraries [default=yes]

  --enable-fast-install[=PKGS]

                          optimize for fast installation [default=yes]

  --disable-libtool-lock  avoid locking (might break parallel builds)

  --disable-doxygen-doc   don't generate any doxygen documentation

  --disable-doxygen-dot   don't generate graphics for doxygen documentation

  --enable-doxygen-man    generate doxygen manual pages

  --enable-doxygen-rtf    generate doxygen RTF documentation

  --enable-doxygen-xml    generate doxygen XML documentation

  --enable-doxygen-chm    generate doxygen compressed HTML help documentation

  --enable-doxygen-chi    generate doxygen seperate compressed HTML help index

                          file

  --disable-doxygen-html  don't generate doxygen plain HTML documentation

  --disable-doxygen-ps    don't generate doxygen PostScript documentation

  --disable-doxygen-pdf   don't generate doxygen PDF documentation

  --disable-nls           do not use Native Language Support

  --disable-rpath         do not hardcode runtime library paths

  --disable-libdvbv5      disable experimental dynamic libdvbv5 compilation

  --disable-libv4l        disable dynamic libv4l compilation

  --disable-v4l-utils     disable v4l-utils compilation

  --disable-qv4l2         disable qv4l2 compilation

  --enable-gconv          enable compilation of gconv modules


Optional Packages:

  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]

  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)

  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use

                          both]

  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]

  --with-sysroot=DIR Search for dependent libraries within DIR

                        (or the compiler's sysroot if not specified).

  --with-gnu-ld           assume the C compiler uses GNU ld default=no

  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib

  --without-libiconv-prefix     don't search for libiconv in includedir and libdir

  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib

  --without-libintl-prefix     don't search for libintl in includedir and libdir

  --with-localedir=PATH      Where the locale files are installed

  --without-jpeg          Do not use jpeg library

  --with-libudev          Enable libudev to detect a device name

  --with-libv4l1subdir=DIR

                          set libv4l1 library subdir (default=libv4l)

  --with-libv4l2subdir=DIR

                          set libv4l2 library subdir (default=libv4l)

  --with-libv4lconvertsubdir=DIR

                          set libv4lconvert library subdir (default=libv4l)

  --with-udevdir=DIR      set udev directory

  --with-gconvdir=DIR     set system's gconv directory

                          (default=/usr/lib/gconv)


Some influential environment variables:

  CC          C compiler command

  CFLAGS      C compiler flags

  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a

              nonstandard directory <lib dir>

  LIBS        libraries to pass to the linker, e.g. -l<library>

  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if

              you have headers in a nonstandard directory <include dir>

  CPP         C preprocessor

  CXX         C++ compiler command

  CXXFLAGS    C++ compiler flags

  CXXCPP      C++ preprocessor

  PKG_CONFIG  path to pkg-config utility

  PKG_CONFIG_PATH

              directories to add to pkg-config's search path

  PKG_CONFIG_LIBDIR

              path overriding pkg-config's built-in search path

  DOXYGEN_PAPER_SIZE

              a4wide (default), a4, letter, legal or executive

  X11_CFLAGS  C compiler flags for X11, overriding pkg-config

  X11_LIBS    linker flags for X11, overriding pkg-config

  GL_CFLAGS   C compiler flags for GL, overriding pkg-config

  GL_LIBS     linker flags for GL, overriding pkg-config

  GLU_CFLAGS  C compiler flags for GLU, overriding pkg-config

  GLU_LIBS    linker flags for GLU, overriding pkg-config

  QT5_CFLAGS  C compiler flags for QT5, overriding pkg-config

  QT5_LIBS    linker flags for QT5, overriding pkg-config

  QT5GL_CFLAGS

              C compiler flags for QT5GL, overriding pkg-config

  QT5GL_LIBS  linker flags for QT5GL, overriding pkg-config

  QT_CFLAGS   C compiler flags for QT, overriding pkg-config

  QT_LIBS     linker flags for QT, overriding pkg-config

  QTGL_CFLAGS C compiler flags for QTGL, overriding pkg-config

  QTGL_LIBS   linker flags for QTGL, overriding pkg-config

  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config

  ALSA_LIBS   linker flags for ALSA, overriding pkg-config

  libudev_CFLAGS

              C compiler flags for libudev, overriding pkg-config

  libudev_LIBS

              linker flags for libudev, overriding pkg-config


Use these variables to override the choices made by `configure' or to help

it to find libraries and programs with nonstandard names/locations.


Report bugs to the package provider. 


다시!

$ ./configure --disable-libdvbv5 

pi@raspberrypi ~/src/v4l-utils/utils/dvb $ vi Makefile

LIBS = -lrt


라즈베리 파이 2로 빌드할 경우 -j 4 옵션으로 5분 정도 걸린다.

2015. 08. 09. (일) 23:58:09 KST

2015. 08. 10. (월) 00:03:24 KST


실행은 실패..




pi@raspberrypi ~/src/v4l-utils $ sudo modprobe bcm2835-v4l2

pi@raspberrypi ~/src/v4l-utils $ lsmod | grep v4l

bcm2835_v4l2           37225  0

videobuf2_vmalloc       3009  1 bcm2835_v4l2

videobuf2_core         33578  1 bcm2835_v4l2

v4l2_common             5077  2 bcm2835_v4l2,videobuf2_core

videodev              122487  3 bcm2835_v4l2,v4l2_common,videobuf2_core


pi@raspberrypi ~/src/v4l-utils $ ls -al /dev/video0

crw-rw---T+ 1 root video 81, 0  8월 10 00:16 /dev/video0


pi@raspberrypi ~ $ sudo v4l2-ctl --set-fmt-video=width=2592,height=1944,pixelformat=3

VIDIOC_S_FMT: failed: Device or resource busy


pi@raspberrypi ~ $ v4l2-ctl --list-devices

mmal service 16.1 (platform:bcm2835-v4l2):

        /dev/video0



pi@raspberrypi ~ $ v4l2-ctl -D

Driver Info (not using libv4l2):

        Driver name   : bm2835 mmal

        Card type     : mmal service 16.1

        Bus info      : platform:bcm2835-v4l2

        Driver version: 3.18.11

        Capabilities  : 0x85200005

                Video Capture

                Video Overlay

                Read/Write

                Streaming

                Extended Pix Format

                Device Capabilities

        Device Caps   : 0x05200005

                Video Capture

                Video Overlay

                Read/Write

                Streaming

                Extended Pix Format 


pi@raspberrypi /etc $ vi modules

# /etc/modules: kernel modules to load at boot time.

#

# This file contains the names of kernel modules that should be loaded

# at boot time, one per line. Lines beginning with "#" are ignored.

# Parameters can be specified after the module name.


snd-bcm2835

bcm2835-v4l2


---


Posted by 구차니