Linux移植Windows摄像头驱动,Arm-Linux摄像头驱动程序的移植

Arm-Linux摄像头驱动程序的移植

转载,原帖位

置:http://doc.xuehai.net/blog/static/762350652010333285148/ Arm-Linux摄像头驱动程序的移植

Arm开发板上摄像头的移植有两种方法:第一,将驱动程序添加到内核,通过编译内核,烧写到板子上;第二种,通过动态加载摄像头驱动模块的方法进行硬件的驱动。作者首先在PC的linux系统进行摄像驱动程序的移植,保证驱动程序版本正确,然后将驱动程序编译成模块,通过文件系统挂载到板子,然后进行加载,进而创建摄像头设备节点。下面将具体介绍摄像头动态加载的过程。 移植过程所使用的摄像头型号ZC301P,arm板上的内核版本为2.6.9,开发板为pxa270,所采用的驱动程序包为spca5xx-20060501.tar.gz。 第一步,使用命令解压文件: tar zxvf spca5xx-20060501.tar.gz 进入spca5xx-20060501 : cd spca5xx-20060501 第二步,修改Makefile文件:VERSION = 00.60.00

Makefile的内容如下,注释掉的为蓝色,红色表示修改过的内容:

CC =arm-linux-gcc

LD =arm-linux-ld

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)\"

ifneq ($(shell uname -r | cut -d. -f1,2), 2.4)

ifneq ($(KERNELRELEASE),) # We were called by kbuild

CFLAGS += $(DEFINES)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值