歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux編程 >> Linux編程

luvcview攝像頭程序到Cortex A8的移植

一、下載SDL源碼包,交叉編譯

#tar –xzvf SDL-1.2.14.tar.gz

#mv SDL-1.2.14 SDL-1.2.14-arm

#cd SDL-1.2.14-arm/

#cd /usr/local/

#sudo mkdirSDL-ARM-linux-gcc4.3.3

#./configure CC=arm-none-linux-gnueabi-gcc--target=arm-linux --host=arm-linux --prefix=/usr/local/SDL-ARM-linux-gcc4.3.3/--enable-static --disable-shared --disable-joystick --disable-cdrom--disable-esd --disable-nasm --enable-video-x11 --enable-video-fbcon --enable-video-opengl--enable-osmesa-shared --disable-arts --without-x --enable-debug -enable-loadso--disable-video-directfb

#make

#sudo make install

 

error:

./src/audio/dma/SDL_dmaaudio.c: Infunction 'DMA_WaitAudio':

./src/audio/dma/SDL_dmaaudio.c:166:error: impossible constraint in 'asm'

make: *** [build/SDL_dmaaudio.lo]Error 1

--disable-video-x11(去掉此項可以編譯通過,按照上面編譯不會出現此錯誤)

二、下載luvcview標准源碼包,編譯luvcview

#tar xzvf luvcview-2007-0512.tar.gz

#mv luvcview-2007-0512luvcview-2007-0512-arm

#cd luvcview-2007-0512-arm

#vim Makefile

 

##############################

# spcaview Makefile

##############################

 

INSTALLROOT=$(PWD)

 

+CC=arm-none-linux-gnueabi-gcc

+CPP=arm-none-linux-gnueabi-g++

INSTALL=install

APP_BINARY=luvcview

BIN=/usr/local/bin

SDLLIBS = $(shell sdl-config--libs)

SDLFLAGS = $(shell sdl-config--cflags

+SDLLIBS =-L/usr/local/SDL-ARM-linux-gcc4.3.3/lib -lSDL

+SDLFLAGS =/usr/local/SDL-ARM-linux-gcc4.3.3/include

#LIBX11FLAGS +=-I/home/ema/dvsdk/ti-dvsdk_dm3730-evm_4_02_00_06/omap35x_graphics_sdk_4.00.00.01/gfx_dbg_es2.x/freedesktop/kdrive/usr/X11R6_SGX/include-L/home/ema/dvsdk/ti-dvsdk_dm3730-evm_4_02_00_06/omap35x_graphics_sdk_4.00.00.01/gfx_dbg_es2.x/freedesktop/kdrive/usr/X11R6_SGX/lib

#X11_LIB += /home/ema/dvsdk/ti-dvsdk_dm3730-evm_4_02_00_06/omap35x_graphics_sdk_4.00.00.01/gfx_dbg_es2.x/freedesktop/kdrive/usr/X11R6_SGX/lib

VERSION = 0.2.1

 

#WARNINGS = -Wall \

#           -Wundef -Wpointer-arith-Wbad-function-cast \

#           -Wcast-align -Wwrite-strings-Wstrict-prototypes \

#           -Wmissing-prototypes-Wmissing-declarations \

#           -Wnested-externs -Winline-Wcast-qual -W \

#           -Wno-unused

#           -Wunused

 

+CFLAGS +=-I/home/ema/dvsdk/ti-dvsdk_dm3730-evm_4_02_00_06/omap35x_graphics_sdk_4.00.00.01/gfx_dbg_es2.x/freedesktop/kdrive/usr/X11R6_SGX/include

CFLAGS += -DUSE_SDL -O2 -DLINUX-DVERSION=\"$(VERSION)\" -I$(SDLFLAGS) $(WARNINGS)

CPPFLAGS = $(CFLAGS)

 

OBJECTS= luvcview.o color.outils.o v4l2uvc.o gui.o avilib.o

               

all:    luvcview

 

#carefully:"+" means that need to amend or need to add.

Copyright © Linux教程網 All Rights Reserved