Differences between revisions 2 and 3
Revision 2 as of 2010-01-23 18:08:17
Size: 3609
Editor: localhost
Comment: Local Merge - 'RudisWiki9'
Revision 3 as of 2011-03-23 09:05:41
Size: 3665
Editor: dslb-084-058-142-238
Comment: ; KontaktEmail (ContactEmail)
Deletions are marked like this. Additions are marked like this.
Line 83: Line 83:
Go back to CategoryHowTo or FrontPage ; KontaktEmail (ContactEmail)

HowTo compile package "uvccapture" within openembedded

In order to compile any new package for the NSLU2 box you should use openembedded and a cross development environment. As webcam a Logitech E3500 is used. The driver is "uvcvideo" (can be enabled in the kernel .configure file). As capture programs "w3cam (vidcat)" and "gphoto2" can not be used. The program "uvccapture" is known to work under slugOS 4.8beta, but the binary does not work under slugOS5 because of library problems.

Cross Environment

My host system is an i386 PC with Ubuntu 0810 running. You start with the MastertMakefile:
There is an updated user manual for openembedded available:
Help may come from chat IRC freenode#openslug.

In order to compile a single package there is already a package "helloworld" provided. Let's look first at the pathes:
Surprise, you will found no C source code. I will describe what is different in the distribution, compared to the usermanual.
The File helloworld_1.0.0.bb is a BitBake File and creates in the function "do_fetch()" the C source file "helloworld.c".

In order to learn how it works use the provided example "helloworld", type within folder "slug":

cd slugos; source setup-env; bitbake  -v -b openembedded/packages/helloworld/helloworld_1.0.0.bb

Setup Package for optware

First you need a make template. see
http://www.nslu2-linux.org/wiki/Optware/AddAPackageToOptware and
The source package is in : http://packages.debian.org/squeeze/uvccapture
The template file is in "slug/optware/make/template.mk". Next type cd slug/optware then make make/uvccapture.mk.


Setup Package for openembedded, uvccapture

As a help for the command "patch" and "diff" look at: http://www.linuxforums.org/applications/using_diff_and_patch.html

To generate a patch file for the original Makefile use: diff -uN uvccapture-0.5/Makefile Makefile > Makefile.patch

With the help of Jon Barber I could setup a BitBake file for uvccapture.

# uvccapture_0.5.bb  2009-03-06 RudolfReuter
DESCRIPTION = "USB UVC Video Class Snapshot Software for V4L2 driver."
SECTION = "console/multimedia"
PRIORITY = "optional"
PR = "r0"

SRC_URI = "http://ftp.de.debian.org/debian/pool/main/u/uvccapture/uvccapture_0.5.orig.tar.gz \

do_compile() {

do_install() {
        install -d ${D}${bindir}
        install -m 0755 ${S}/uvccapture ${D}${bindir}/uvccapture

The patch file for the original makefile is:

--- uvccapture-0.5/Makefile     2008-08-01 04:26:18.000000000 +0200
+++ Makefile    2009-03-09 10:46:22.000000000 +0100
@@ -1,13 +1,13 @@
-VERSION = 0.4
+VERSION = 0.5
 OBJECTS= uvccapture.o v4l2uvc.o

Go back to CategoryHowTo or FrontPage ; KontaktEmail (ContactEmail)

UvccaptureBuild (last edited 2011-03-23 09:05:41 by dslb-084-058-142-238)