I want to compile binaries for my Guruplug Server kernel Linux guruplug 2.6.32-00007-g56678ec #1 PREEMPT Mon Feb 8 03:49:55 PST 2010 armv5tel GNU/Linux
I downloaded CodeSourcery Sourcery G++ Lite 2010.09-51 for the EABI target
I downloaded the kernel headers for 2.6.32.7 from
http://sheeva.with-linux.com/sheeva/I want to build from source (mjpeg-streamer) but I can't figure out how to direct the cross compiler
to use the 2.6.32 kernel headers
I wrote a bash script to change environment variables in the shell in which I want to compile
#!/bin/bash
export CC=/Opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gcc
export CFLAGS="-march=armv5te -mtune=xscale"
export CXX=/Opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-g++
export LD=/Opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-ld
export AR=/Opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-ar
export AS=/Opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-as
export NM=/Opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-nm
export STRIP=/Opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-strip
When I source the bash script and then type make I get
:$ make
/Opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gcc -march=armv5te -mtune=xscale -O2 -Wall -I/Opt/CodeSourcery/Sourcery_G++_Lite/arm-none-eabi/include -c -o mjpg_streamer.o mjpg_streamer.c
mjpg_streamer.c:27:22: fatal error: videodev.h: No such file or directory
compilation terminated.
make: *** [mjpg_streamer.o] Error 1
I tried modifying the Makefile with no success
###############################################################
#
# Purpose: Makefile for "M-JPEG Streamer"
# Author.: Tom Stoeveken (TST)
# Version: 0.3
# License: GPL
#
###############################################################
#CC = gcc
CC = /Opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gcc
CFLAGS += -O2 -Wall -I$ /Opt/CodeSourcery/Sourcery_G++_Lite/arm-none-eabi/include
EXTRA_CFLAGS = -I$ /Opt/Downloads/kernel_2.6.32.7_headers/usr/include
#CFLAGS += -O2 -DDEBUG -DLINUX -D_GNU_SOURCE -Wall
LFLAGS += -lpthread -ldl
APP_BINARY=mjpg_streamer
OBJECTS=mjpg_streamer.o utils.o
all: application plugins
&tc
What am I doing wrong? I looked at the man pages for the original CFLAGS setting and I don't understand
where the LINUX and _GNU_SOURCE macros are defined.
The README states
Dependencies for the input plugin "input_uvc.so":
* libjpeg
* recent Linux-UVC driver (newer then revision #170)
Dependencies for the output plugin "output_autofocus.so":
* libmath
Can I build against the lib on my desktop rather than the ones on the plug?
I installed the linux-UVC driver on the plug and I will get libjpeg and libmath
from Debian downloads.