Quote:
Originally Posted by abhijit_naik27
Hello Ramesh,
I need help from you.I am using SPCA5xx web cam driver. My target details are as follows,
Processor- IXP425 big endian
Architecture- ARM5VT
Kernel- 2.4.20mvl(From Montavista)
Can you give the procedure you followed to cross compiling SPCA5xx for your board?
Thanks in Advance.
|
Donwload the source, change the makefile present over there...
Since the kernel is 2.4..remove the 2.6 part in the Makefile ...
I modified like this ..........
---------------------------------------------------------------
VERSION = 00.60.00.1
CVSVERSION = "$Experimental work Michel Xhaard && Reza Jelveh 03/02/2004"
DEFINES =
###
# The following flags enable experimental features.
# By default, these are enabled for development versions of the driver, and
# disabled for release versions.
# Optional: Enable driver debugging
DEFINES += -DSPCA50X_ENABLE_DEBUG
# Optional: Enable direct register read/write for PAC207 development
#DEFINES += -DSPCA5XX_ENABLE_REGISTERPLAY
###
# The following flags enable features that aren't yet implemented, and
# therefore are disabled by default.
# Optional: Enable compression
DEFINES += -DSPCA50X_ENABLE_COMPRESSION
###
# Rest of Makefile follows here. You probably won't need to touch this.
# Setup defines
DEFINES += -DCONFIG_USB_SPCA5XX_MODULE=1 -DMODULE -D__KERNEL__
DEFINES += -DVID_HARDWARE_SPCA5XX=0xFF -DSPCA5XX_VERSION=\"$(VERSION)\"
#############################################################################
# For Linux 2.4 users.
# Change the following lines according to your system configuration.
# It is important to configure your particular source tree ("make dep") before
# compiling this module!
#############################################################################
###
# This makefile will build the spca50x driver module external to the kernel
# source tree. It makes it easier to swap kernels.
KERNEL_VERSION = "2.4.18-rmk7-pxa1-xhyper255"
#Put the name of your kernel here... uname -r on your target gives this... your kernel source directory also should have the
same name
###
# Location of the header files (most importantly the config files)
# for the kernel you want to build the module against.
# This should be correct for the currently installed kernel on your machine.
KINCLUDE = /home/rameshchandra/Ramesh/temp/2.4.18-rmk7-pxa1-xhyper255/include
#RAMESH
ath of your kernel source.
KERNEL_ACFILE = $(KINCLUDE)/linux/autoconf.h
KERNEL_MODVERSIONSFILE = $(KINCLUDE)/linux/modversions.h
MODULE_INSTALLDIR = /home/rameshchandra/Ramesh/Mywork/Cameraresearch/Logitechspca5xx/myinstalls
#RAMESH:check whether the appropriate file is present in your kernel
# Detect module versioning support
ifneq ($(strip $(shell grep 'define CONFIG_MODVERSIONS 1' $(KERNEL_ACFILE))),)
DEFINES += -DMODVERSIONS -include $(KERNEL_MODVERSIONSFILE)
endif# Detect SMP support
ifneq ($(strip $(shell grep 'define CONFIG_SMP 1' $(KERNEL_ACFILE))),)
DEFINES += -D__SMP__ -DSMP
endif
# Setup the tools
CC = /usr/local/hybus-arm-linux-R1.1/bin/arm-linux-gcc
LD = /usr/local/hybus-arm-linux-R1.1/bin/arm-linux-ld
# Setup compiler warnings
WARNINGS = -Wall -Wpointer-arith
WARNINGS += -Wcast-align -Wwrite-strings -Wstrict-prototypes
WARNINGS += -Wuninitialized -Wreturn-type -Wunused -Wparentheses
# Setup compiler flags
CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
#CFLAGS += -mpreferred-stack-boundary=2
CFLAGS += -I$(KINCLUDE) -Idrivers/usb
# Setup link flags
LDFLAGS = --strip-debug -r
----------------------------------------------------------------
In the warning flags keep what i wrote... other wise it will show some errors...
Hope this helps you... CC and LD you must know...are the cross-compiler..point it to your toolchain...
i think you know about these...
then save the make file and then give make...
spca5xx should be compiled for the target.. But still no answer for my question...No one replying in this forum...??
spca5xx works well in system but not in boards...i don't know what is the reason may be low-level cypress drivers for usb may be problem...
Hope atleast you will tell me when you get success in the board..
Please let me know it...