Running the motion library on the Yun

This isn't hard to compile. I am currently wrassling with getting the latest OpenWrt-yun tree to compile so I compiled against the old tree. The binary seems to run fine on the latest image though. If anyone wants to try it there is a copy at:

Here is the conf file that works fairly well with my Logitech Orbit Sphere
https://www.dropbox.com/s/kki9i55n21b36al/motion-dist.conf

There several things that don't work but this will detect motion and save a jpg of it to /tmp.

Things that do work:
Streaming something to port 8081
Many of the controls on port 8080

Problems:
Streamed image is close to unidentifiable
Pan/Tilt control doesn't work

The executable above can be run by copying it and the conf file to /root on the Yun and executing:

root@Arduino:~# /root/motion -c /root/motion-dist.conf

This was compiled by untarring the source next to the OpenWrt-Yun tree and running:

STAGING_DIR=<path to tree>/staging_dir
export STAGING_DIR
CFLAGS=-I<path to tree>/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
export CFLAGS
LDFLAGS=-L<path to tree>/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
export LDFLAGs
CC=<path to tree>/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc
export CC
./configure --without-optimizecpu --without-sdl --without-mysql --without-pgsql --without-sqlite3 --host=mips-openwrt-linux-uclibc --without-ffmpeg
mkdir <path to tree>/staging_dir/usr/include/linux
cp <path to tree>/build_dir/target-mips_r2_uClibc-0.9.33.2/fswebcam-20110717/videodev.h  <path to tree>/staging_dir/usr/include/linux
make

I'll try to put together an install-able package when I get the current image built.