主题 : 請問cmos攝像頭在linux內核2.6.35 移植的問題 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 61878
精华: 0
发帖: 18
金钱: 90 两
威望: 18 点
综合积分: 36 分
注册时间: 2012-01-10
最后登录: 2013-04-30
楼主  发表于: 2012-02-27 03:46

 請問cmos攝像頭在linux內核2.6.35 移植的問題

 現在想把原本2.6.32內核的cmos攝像頭驅動移植到 2.6.35

  參考了這網誌:

    http://blog.csdn.net/csuwzc/article/details/6527372

  把原本友善之臂提供的2.6.32 裡 s3c2440camif.c、s3c2440camif.h、s3c2440_ov9650.c、sccb.c、sccb.h 附製到 2.6.35裡'

  之後 s3c2440camif.c 中的:

   S3C2410_GPJ0  -> S3C2410_GPJ(0)
    S3C2410_GPJ1  -> S3C2410_GPJ(1)
   :
  然後 添上kconfig 與 Make

 編憶完並載上mini2440後 試圖開啟 Qtopia 裡的Cmos 攝像頭測試程序: 是言裝置有錯

  comsole裡的打印錯誤是這樣:


 cmos-camera: page allocation failure. order:10, mode:0xd1                     
[<c003055c>] (unwind_backtrace+0x0/0xf0) from [<c00706dc>] (__alloc_pages_node)
[<c00706dc>] (__alloc_pages_nodemask+0x4ec/0x544) from [<c0070744>] (__get_fre)
[<c0070744>] (__get_free_pages+0x10/0x3c) from [<c0286a3c>] (camif_open+0x114/)
[<c0286a3c>] (camif_open+0x114/0x26c) from [<c01bdfe4>] (misc_open+0x158/0x1dc)
[<c01bdfe4>] (misc_open+0x158/0x1dc) from [<c00957ac>] (chrdev_open+0x120/0x13)
[<c00957ac>] (chrdev_open+0x120/0x13c) from [<c00918e8>] (__dentry_open+0x13c/)
[<c00918e8>] (__dentry_open+0x13c/0x24c) from [<c0091ab4>] (nameidata_to_filp+)
[<c0091ab4>] (nameidata_to_filp+0x3c/0x50) from [<c009c270>] (do_last+0x418/0x)
[<c009c270>] (do_last+0x418/0x568) from [<c009dcb8>] (do_filp_open+0x178/0x4d4)
[<c009dcb8>] (do_filp_open+0x178/0x4d4) from [<c0091694>] (do_sys_open+0x58/0x)
[<c0091694>] (do_sys_open+0x58/0x144) from [<c002be60>] (ret_fast_syscall+0x0/)
Mem-info:                                                                     
Normal per-cpu:                                                               
CPU    0: hi:   18, btch:   3 usd:   0                                        
active_anon:914 inactive_anon:917 isolated_anon:0                             
 active_file:2 inactive_file:64 isolated_file:0                               
 unevictable:5 dirty:0 writeback:0 unstable:0                                 
 free:8394 slab_reclaimable:407 slab_unreclaimable:465                        
 mapped:2 shmem:101 pagetables:68 bounce:0                                    
Normal free:33576kB min:1016kB low:1268kB high:1524kB active_anon:3656kB inacto
lowmem_reserve[]: 0 0                                                         
Normal: 250*4kB 218*8kB 155*16kB 92*32kB 31*64kB 21*128kB 13*256kB 8*512kB 5*1B
172 total pagecache pages                                                     
0 pages in swap cache                                                         
Swap cache stats: add 0, delete 0, find 0/0                                   
Free swap  = 0kB                                                              
Total swap = 0kB                                                              
16384 pages of RAM                                                            
11547 free pages                                                              
1534 reserved pages                                                           
726 slab pages                                                                
46 pages shared                                                               
0 pages swap cached                            


那請問我要怎修改內核源代碼/改變配置  才能讓cmos攝相頭可以運行呢?

謝謝




 
级别: 新手上路
UID: 66907
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
综合积分: 2 分
注册时间: 2012-04-05
最后登录: 2013-01-24
1楼  发表于: 2012-04-05 16:45

 回 楼主(蓋格) 的帖子

您好!
我遇到了和您一样的问题,不过我内核是linux-2.6.32.2,不需要移植摄像头驱动,开机直接进摄像头可以打开,不过进的次数多了或者进了照片浏览等,再次进入就会出现和您一样的问题,请问您时如何解决的。
s3c2440
64M
的,QT编写的
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2012-04-05 18:07
从出错的信息看,应该是camif_open()里有内存泄露的状况。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."