This article pertains to: * SlugOS 5.3-beta
Welcome to SlugOS/SlugOS5 More information can be found in the release notes: SlugOS/ReleaseNotes5x3
Note the heading at the top of this page; this color-coded annotation will be used to help readers of the wiki to determine the specific firmware and version to which the article applies.
WebCam support
In order to use a Logitech E3500 WebCam I needed to have the file uvccapture also under SlugOS/SlugOS5. Because it was not included in the standard distribution I had to build it myself. The version from !SlugOS 4.8 dit not work because of library problems. With the help of Jon Barber I got it to work.
Create `uvc` kernel module
For using this uvc (USB_VIDEO_CLASS) device under Video4Linux you also need an uvc driver which is not yet included in the distribution. This is a kernel module and must be enabled in the kernel config list with the letter "M" for Module.
type "make ARCH=arm menuconfig" to set uvc <M> flag in path: /home/*user*/slug/slugos/tmp/work/nslu2be-linux-gnueabi/linux-ixp4xx-2.6.27.8+svnr1085-r2/linux-2.6.27 Title: Linux Kernel Configuration /Device Drivers/Multimedia Devices/Video capture adapters/V4L USB devices/USB Video Class (UVC) <M> /Device Drivers/Multimedia Devices/Video for Linux <M> Output of menuconfig = ".config"
Next step is to build your kernel module uvccapture:
cd /home/*user*/slug make slugosbe-image
The file kernel-module-uvcvideo_2.6.27.8+svnr1085-r2_nslu2be.ipk is found in path: slug/slugos/tmp/deploy/ipk/nslu2be.
uvccapture
The purpose of this software is to capture an image from a USB webcam at a specified interval, and save it to a JPEG file, no other formats are supported. For more details have a look at http://packages.debian.org/en/lenny/uvccapture.
HowTo build an openembedded package
Because uvccapture was not included in the openembedded packages, I had to build it myself. This can be done with the Development/MasterMakefile. Once you have setup the cross toolchain on a PC Linux system (I use Ubuntu 08.10) you can setup a BitBake file to build the package. Please note that in order to exclude/include a package in the distribution you have to edit list SLUGOS_PACKAGES in file slugos-packages.bb in path openembedded/packages/meta.
To setup the environment do the following:
cd /home/*user*/slug/openembedded/packages mkdir uvccapture cd uvccapture mkdir files create/edit the file uvccapture_0.5.bb from the box below. cd files create/edit the file Makefile.patch from the box below. edit file slugos-packages.bb in openembedded/packages/meta. add to SLUGOS_PACKAGES uvccapture \ (in alphabetic order). I added also gnuplot to SLUGOS_PACKAGES.
Next step is to build your package uvccapture:
cd /home/*user*/slug make slugosbe-packages
After about 19 hours later (1st time build only, because all packages are build, 2nd time is much quicker) you have:
/home/*user*/slug/slugos/tmp/work/armv5teb-linux-gnueabi/uvccapture-0.5-r0
Make a cd to that folder and copy uvccapture-0.5/uvccapture to /usr/bin/uvccapture on your NSLU2 box.
In order to build the package uvccapture you need a BitBake file uvccapture_0.5.bb:
1. uvccapture_0.5.bb 2009-03-06 RudolfReuter DESCRIPTION = "USB UVC Video Class Snapshot Software for V4L2 driver." SECTION = "console/multimedia" PRIORITY = "optional" DEPENDS="jpeg" LICENSE = "GPLV2" PR = "r0" SRC_URI = "http://ftp.de.debian.org/debian/pool/main/u/uvccapture/uvccapture_0.5.orig.tar.gz file://Makefile.patch;patch=1" do_compile() { make } do_install() { install -d ${D}${bindir} install -m 0755 ${S}/uvccapture ${D}${bindir}/uvccapture }
The original Makefile needs a patch Makefile.patch:
--- 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 @@ -CC=gcc +#CC=gcc CPP=g++ APP_BINARY=uvccapture -VERSION = 0.4 -PREFIX=/usr/local/bin +VERSION = 0.5 +PREFIX=/usr/bin WARNINGS = -Wall -CFLAGS = -std=gnu99 -O2 -DLINUX -DVERSION=\"$(VERSION)\" $(WARNINGS) +CFLAGS += -std=gnu99 -O2 -DLINUX -DVERSION=\"$(VERSION)\" $(WARNINGS) CPPFLAGS = $(CFLAGS) OBJECTS= uvccapture.o v4l2uvc.o
Liste der Seiten in dieser Category:
Go Back to CategoryNslu2 or StartSeite; KontaktEmail (ContactEmail)