Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

a5xx ÉãÏñÍ·Çý¶¯ÒÆÖ²£¨For Linux 2.6.14£©

Spca5xx ÉãÏñÍ·Çý¶¯ÒÆÖ²£¨For Linux 2.6.14£©
Ò»£®ÏÂÔز¢½âѹSpca5xxÇý¶¯£¬±¾ÎÄʹÓÃÁËgspcav1-20070508°æ±¾¡£
¶þ£®°æ±¾ËµÃ÷£ºÖ®Ç°³¢ÊÔ¹ýspca5xx*µÄ¶à¸ö°æ±¾£¬ËäÈ»ÒÆֲûÓÐÎÊÌ⣬µ«ÊÇÔÚ½øÐÐv4lÓ¦ÓÃʱ£¬³öÏֺܶàĪÃûÆäÃîµÄ´íÎ󣬱ÈÈçISOC data errorµÈ£¬ºóÀ´»»³ÉÁË×îеÄgspca°æ±¾£¬ÎÊÌâÈ«²¿½â¾ö¡£
Èý£®ÍêÕû±àÒëÒÆÖ²ºÃµÄLinux 2.6.14 for S3C2410Äںˣ¬ÖÁÓÚ¹ý³Ì£¬¿É²Î¿¼blogÀïµÄÁíһƪÄÚºËÒÆÖ²Îĵµ¡£
ËÄ£®ÐÞ¸ÄMakefile
£¨1£© Ð޸ıäÁ¿KERNELDIR := ~/linux-2.6.14
£¨2£© Ð޸ıäÁ¿MODULE_INSTALLDIR := $KERNELDIR/drivers/usb/media/
£¨3£© Ð޸ıäÁ¿MODULE_INSTALLDIR2 := $KERNELDIR/drivers/media/video/
£¨4£© Ôö¼Ó±äÁ¿CROSS_COMPILE_CC := /usr/local/arm/3.4.1/bin/arm-linux-gcc
£¨ÕâÀïʹÓõıàÒëÆ÷ÊÇarm-linux-gcc-3.4.1£©
£¨5£© ÐÞ¸ÄÃüÁ
Ô´´úÂ룺$(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) CC=$(CC) modules
½« $(CC) ÐÞ¸ÄΪ $(CROSS_COMPILE_CC)
Î壮±àÒëGspca
#make clean
#make
Áù£®½á¹û
ÔÚGspcaÖ÷Ŀ¼Ï²úÉúgspca.ko


Ïà¹ØÎĵµ£º

LinuxÇý¶¯Ö®ioctl

ÔÚÓû§¿Õ¼ä£¬Ê¹ÓÃioctlϵͳµ÷ÓÃÀ´¿ØÖÆÉ豸£¬Ô­ÐÍÈçÏ£º
int ioctl(int fd, unsigned long cmd, ...);
µÚÈý¸ö²ÎÊý²»±íʾһ¸ö±äÊýÄ¿µÄ²ÎÊý£¬¶øÊÇÒ»¸öÀàÐÍ¿ÉÑ¡µÄ²ÎÊý¡£µÚÈý¸ö²ÎÊýÒÀÀµÓÚ¿ØÖÆÃüÁһЩÃüÁî²»ÓòÎÊý£¬Ò»Ð©ÓÃÒ»¸öÕûÊýÖµ£¬Ò»Ð©Ê¹ÓÃÖ¸Õë
1¡¢ioctlº¯Êý¶¨ÒåÃüÁî
ÔÚ±àдioctl´úÂë֮ǰ£¬Ê×ÏÈÐèÒª¶¨ÒåÃüÁΪÁË·ÀÖ¹ ......

LinuxÉ豸Çý¶¯¿ª·¢Ïê½â ±Ê¼Ç4 LinuxÄÚºËÄ£¿é

modprobeÃüÁî±ÈinsmodÃüÁîÇ¿´ó£¬ËüÔÚ¼ÓÔØijģ¿éʱ»áͬʱ¼ÓÔظÃÄ£¿éËùÒÀÀµµÄÆäËûÄ£¿é¡£Ê¹ÓÃmodprobeÃüÁî¼ÓÔصÄÄ£¿éÈôÒÔ“modprobe –r filename”µÄ·½Ê½Ð¶Ôؽ«Í¬Ê±Ð¶ÔØÆäÒÀÀµµÄÄ£¿é¡£
printk´òÓ¡µ½var/log/messages
2.6ÄÚºËÖÐÒѼÓÔصÄÐÅÏ¢Ò²´æÔÚÓÚ/sys/moduleĿ¼Ï£¬¼ÓÔØhello.koºó£¬ÄÚºËÖн«°üº¬/sys/mod ......

LinuxÉ豸Çý¶¯¿ª·¢Ïê½â ±Ê¼Ç7 ²¢·¢¿ØÖÆ


ÖжÏÆÁ±ÎµÄʹÓ÷½·¨£º
local_irq_disable() //¹ØÖжÏ
local_irq_enable() //¿ªÖжÏ
ÕâÁ½¸öº¯Êý¶¼Ö»ÄܽûÖ¹ºÍʹÄܱ¾cpuÄÚµÄÖжϣ¬Òò´Ë£¬²¢²»Äܽâ¾öSMP¶àcpuÒý·¢µÄ¾ºÌ¬¡£Òò´Ë£¬µ¥¶ÀʹÓÃÖжÏÆÁ±Îͨ³£²»ÊÇÒ»ÖÖÖµµÃÍƼöµÄ±ÜÃ⾺̬µÄ·½·¨£¬ËüÊÊÒËÓë×ÔÐýËøÁªºÏʹÓÃ
ÁíÍ⣬local_irq_save(flags)³ýÁ˽øÐнûÖ¹ÖжϲÙ×÷ÒÔÍ⣬»¹± ......

Linux LDDÃüÁîµÄʹÓÃ

1.Ê×ÏÈldd²»ÊÇÒ»¸ö¿ÉÖ´ÐгÌÐò£¬¶øÖ»ÊÇÒ»¸öshell½Å±¾
 
2¡¢lddÄܹ»ÏÔʾ¿ÉÖ´ÐÐÄ£¿éµÄdependency£¬ÆäÔ­ÀíÊÇͨ¹ýÉèÖÃһϵÁеĻ·¾³±äÁ¿£¬ÈçÏ£ºLD_TRACE_LOADED_OBJECTS¡¢LD_WARN¡¢LD_BIND_NOW¡¢LD_LIBRARY_VERSION¡¢
LD_VERBOSEµÈ¡£µ±LD_TRACE_LOADED_OBJECTS»·¾³±äÁ¿²»Îª¿Õʱ£¬ÈκοÉÖ´ÐгÌÐòÔÚÔËÐÐʱ£¬Ëü¶¼»áÖ»ÏÔʾģ ......

¶Ô±È£ºLinuxºÍWindowsϵͳÏ̼߳äµÄÇø±ð


¶Ô±È£ºLinuxºÍWindowsϵͳÏ̼߳äµÄÇø±ð
ÊìϤWIN32±à³ÌµÄÈËÒ»¶¨ÖªµÀ£¬WIN32µÄ½ø³Ì¹ÜÀí·½Ê½ÓëLinuxÉÏÓÐןܴóÇø±ð£¬ÔÚUNIXÀֻÓнø³ÌµÄ¸ÅÄµ«ÔÚWIN32ÀïÈ´»¹ÓÐÒ»¸ö"Ïß³Ì"µÄ¸ÅÄÄÇôLinuxºÍWIN32ÔÚÕâÀ﾿¾¹ÓÐ×ÅʲôÇø±ðÄØ£¿
 
WIN32ÀïµÄ½ø³Ì/Ïß³ÌÊǼ̳Ð×ÔOS/2µÄ¡£ÔÚWIN32À"½ø³Ì"ÊÇÖ¸Ò»¸ö³ÌÐò£¬¶ø"Ïß³Ì"ÊÇÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ