笔记本摄像头驱动(lexmarkx422无法启动怎么办)

  • 时间:
  • 浏览:84
  • 来源:奥一装修网

笔记本未检测到摄像头

郑州西亚斯学院

LD = arm-linux-ld

北京大学

CVSVERSION =“ $实验工作Michel Xhaard && Reza Jelveh 2004年3月2日”

东北大学

DEFINES =

以下标志启用实验功能。

默认情况下,对于驱动程序的开发版本启用这些功能,而

对于发行版本禁用。

可选:启用驱​​动程序调试

DEFINES + = -DSPCA50X_ENABLE_DEBUG

可选:启用直接寄存器读/写以进行PAC207开发

DEFINES + = -DSPCA5XX_ENABLE_REGISTERPLAY

以下标志启用尚未实现的功能,因此默认情况下禁用

可选:启用压缩

DEFINES + = -DSPCA50X_ENABLE_COMPRESSION

其他Makefile如下。您可能不需要触摸它。

安装程序定义

DEFINES + = -DCONFIG_USB_SPCA5XX_MODULE = 1 -DMODULE -D__KERNEL __

ifneq($(shell uname -r | cut -d。-f1,2),2。4)

ifneq($(KERNELRELEASE),)

我们被kbuild调用了

CFLAGS + = $(DEFINES)

obj-m + = spca5xx。o

spca5xx-objs:=驱动程序/ usb / spca5xx。o驱动程序/ usb / spcadecoder。o

else

我们是从命令行调用的

KERNEL_VERSION =`uname -r`

KERNEL_VERSION = 2。6。9

KERNELDIR:= / lib /模块/ $(KERNEL_VERSION)/构建

KERNELDIR:= /up-techpxa270/kernel/linux-2。6。9

PWD:= $(shell pwd)

MODULE_INSTALLDIR = / lib /模块/ $( KERNEL_VERSION)/内核/驱动程序/ USB /媒体/

MODULE_INSTALLDIR = /根/模块/

目标,不要更改!

默认值:

@ echo’为2。5 / 2。6内核构建SPCA5XX驱动程序。’

@ echo’记住:您必须具有对内核源代码树的读/写访问权限。 ’

$(MAKE)-C $(KERNELDIR)SUBDIRS = $(PWD)CC = $(CC)模块

安装:

mkdir -p $(MODULE_INSTALLDIR)

rm -f $(MODULE_INSTALLDIR)et61x。ko

安装-c -m 0644 spca5xx。ko $(MODULE_INSTALLDIR)

/ sbin / depmod -ae

卸载:

rm -f $(MODULE_INSTALLDIR)/spca5xx。ko

/sbin / depmod -aq

endif

else

内核版本测试

对于Linux 2。4用户。

根据您的系统配置更改以下行。

编译此模块之前配置您的特定源代码树(“ make dep”)很重要!

此makefile将在内核

源代码树外部构建spca50x驱动程序模块。它使交换内核变得更加容易。

KERNEL_VERSION =`uname -r`

KERNEL_VERSION = 2。4。x

表示要针对其构建模块的内核。

对于计算机上当前安装的内核,这应该是正确的。

KINCLUDE = / lib /模块/ $(KERNEL_VERSION)/构建/包含

笔记本内置摄像头驱动

KINCLUDE = / up -techpxa270 / kernel / linux2。4。x

KERNEL_ACFILE = $(KINCLUDE)/linux/autoconf。h

KERNEL_MODVERSIONSFILE = $( KINCLUDE)/linux/modversions。h

MODULE_INSTALLDIR = / lib /模块/ $(KERNEL_VERSION)/内核/驱动程序/ USB /

MODULE_INSTALLDIR = / root /模块/

检测模块版本支持

ifneq($(strip $( shell grep’定义CONFIG_MODVERSIONS 1’$(KERNEL_ACFILE)),)

定义+ = -DMODVERSIONS- include $(KERNEL_MODVERSIONSFILE)

endif

检测SMP支持

ifneq($(strip $(shell grep’define CONFIG_SMP 1’$ (KERNEL_ACFILE)))))

定义+ = -D__SMP__ -DSMP

endif

设置工具

CC = gcc

LD = ld

LD = arm-linux-gcc

设置编译器警告

警告= -Wall -Wpointer-arith

警告+ = -Wcast-align -Wwrite-strings -Wstrict-prototypes

警告+ = -Wuninitialized -Wreturn-type -Wunused -Wparentheses

设置编译器标志

CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe

CFLAGS + = -mpreferred-stack-boundary = 2

CFLAGS + = -I $(KINCLUDE)-Idrivers / usb

设置链接标志

LDFLAGS = --strip-debug -r

设置要包含在发行版中的文件列表

DIST_FILES = CHANGELOG \

README \

Makefile \

drivers / usb / Config。in \

驱动程序/ usb / spcadecoder。c \

驱动程序/ usb / spcadecoder。h \

驱动程序/ usb / spcagamma。h \

驱动程序/ usb / spcaCompat。h \

驱动程序/ usb / spcausb。h \

驱动程序/ usb / spca500_init。h \

驱动程序/ usb / spca501_init。h \

驱动程序/ usb / sp5xxfw2。dat \

驱动程序/ usb / sp5xxfw2。h \

驱动程序/ usb / spca506。h \

驱动程序/ usb / spca508_init。h \

驱动程序/ usb / spca561。h \

驱动程序/ usb / sonix。h \

驱动程序/ usb / cs2102。h \

驱动程序/ usb / hv7131b。h \

驱动程序/ usb / icm105a。h \

驱动程序/ usb / hv7131c。h \

驱动程序/ usb / hdcs2020。h \

驱动程序/ usb / pb0330。h \

驱动程序/ usb / tas5130c。h \

驱动程序/ usb / zc3xx。h \

驱动程序/ usb / tv8532。h \

驱动程序/ usb / cxlib。h \

驱动程序/ usb / sn9cxxx。h \

驱动程序/ usb / cx。h \

驱动程序/ usb / pac207 。h \

驱动程序/ usb / spca5xx。c \

驱动程序/ usb / spca5xx。h

OBJS =驱动程序/ usb / spcadecoder。o \

驱动程序/ usb / spca5xx。o

二进制= spca5xx。o

联想win10摄像头用不了

目标遵循此处

二进制文件:$(OBJS)

@ echo链接$(BINARY)

@ $(LD)$(LDFLAGS)-o $(BINARY)$(OBJS)

install:binary

@ echo安装您的root密码可能是必需的。

su -c“ make install-root”

install-root:

@ echo安装

@ rm -f / lib / modules /`uname -r`/kernel/drivers/usb/spca50x。o

@rm -f / lib / modules /`uname -r` /内核/驱动程序/ usb / et61x。o

@ cp spca5xx。o / lib / modules /`uname -r`/kernel/drivers/usb/spca5xx。o

@/sbin/depmod

dist:干净的二进制文件

@ echo制作可分发的归档文件

@ rm -f spca5xx- src- $(版本)。tar。gz

@ tar zcf spca5xx-src- $(版本)。tar。gz $(DIST_FILES)

@ rm -f spca5xx-module- $(版本)。tar。gz

@ cp $(二进制)spca5xx- $(版本)。o

@ tar zcf spca5xx-module- $(版本)。tar。gz spca5xx- $(版本)。o自述文件

@ rm spca5xx- $(版本)。o

。 co:Makefile $*。c

@echo编译$ *。 c

@ $(CC)$(CFLAGS)$(警告)$(定义)-c $ *。 c -o $ *。 o

依赖性在这里

驱动程序/ usb / spca5xx。o:驱动程序/ usb / spca5xx。h \

驱动程序/ usb / spcaCompat。h \

驱动程序/ usb / spcausb。h \

驱动程序/ usb / sonix。h \

驱动程序/ usb /spca500_init。h \

驱动程序/ usb / sp5xxfw2。h \

驱动程序/ usb / spca505_init。h \

驱动程序/ usb / spca506。h \

驱动程序/ usb / spca508_init。h \

驱动程序/ usb / spca561。h \

驱动程序/ usb / zc3xx。h \

驱动程序/ usb / tv8532。h \

驱动程序/ usb / cx。h \

驱动程序/ usb / mr。h \

驱动程序/ usb / sn9cxxx。h \

驱动程序/ usb / pac207。h \

驱动程序/ usb / spcadecoder。o:驱动程序/ usb / spcadecoder。h \

驱动程序/ usb / spcagamma。h \

endif

结束内核版本测试

其他目标

clean:

rm- r -f驱动程序/ USB / *。 o驱动程序/ usb / 。spcadecoder。o。cmd \

驱动程序/ usb / 。spca5xx。o。cmd * 。o * 。ko * 。mod。 *。 【az】 * core * 。i

做一些关于修改Makefile的注意事项:1Makefile被编译为不同的核心返回不同的目标文件,后一部分是针对2。4内核的。用户根据自己的内核进行修改。我正在修改的是2。6。9内核。关于2。4。x是2。4的一个版本,它只是一个代号。用户可以根据实际情况进行修改。 2有两点需要修改,一是gcc变成arm-linux-gcc;二是修改gcc。另一个是内核路径,请注意,这是交叉编译环境的内核路径,即arm-linux的内核路径,而不是pc Kernel上的linux系统。 3修改Makefile文件后,如果从未编译过arm-linux,则需要先编译内核,然后再编译。 MODULE_INSTALLDIR这是您编译的模块的放置路径,您无需更改它。当然,为了方便起见,最好将其更改为所需的文件夹。文件夹权限应更改为可读写。

第三步:制作

成功编译后,将在模块MODULE_INSTALLDIR路径中生成目标文件,例如spca5xx。ko和spca5xx。o。

步骤4:将目标文件spca5xx。ko(2。6内核)或spca5xx。o(2。4内核)安装到arm开发板上

步骤5:在开发板上。ko输入已安装的文件夹insmod spca5xx。步骤6:插入相机并测试相机

出乎意料的是,在/ dev /或/ dev / v4l / video0下会有video0设备符号

步骤7:cat / dev / video0》 a。jpg查看是否有文件a。jpg

按ctrl + C退出,将a。jpg复制到pc linux以通过gqview软件进行查看,还可以编辑图像获取小程序,抓取一个帧并将其另存为文件,然后转到pclinux进行查看。 gqview软件很麻烦。我编写了一个小程序来保存jpg文件并直接查看pc linux

,这非常方便。

当然有事故。加载相机驱动程序后,无法使用相机。下一篇文章将介绍一个特殊情况。我在这个问题上停留了一两天,并要求技术人才来解决它。前面有很多在线过程,我将进一步完善过程以供初学者参考,

网络摄像头价格

原始链接:http://www。eeworld。com。cn/mcu/article_31。html