主题 : undefined reference to `ADC_LOCK'(原帖:编译2.6.31时出现的问题) 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 10480
精华: 0
发帖: 13
金钱: 105 两
威望: 42 点
综合积分: 26 分
注册时间: 2009-11-05
最后登录: 2012-11-21
楼主  发表于: 2009-11-09 22:45

 undefined reference to `ADC_LOCK'(原帖:编译2.6.31时出现的问题)

管理提醒: 本帖被 kasim 执行锁定操作(2009-11-11)
GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
drivers/built-in.o: In function `touch_timer_fire':
hid-quirks.c:(.text+0x7f8dc): undefined reference to `ADC_LOCK'
drivers/built-in.o: In function `stylus_updown':
hid-quirks.c:(.text+0x7f940): undefined reference to `ADC_LOCK'
make: *** [.tmp_vmlinux1] Error 1

2.6.31内核编译出现了如上问题,不知道应该怎么改?大侠帮下吧
[ 此帖被kasim在2009-11-10 08:30重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-11-10 08:29
undefined reference to `ADC_LOCK'

ADC_LOCK是友善之臂提供的ADC驱动中定义, 在触摸屏驱动中使用的变量, 在2.6.31中当然不存在, 如果你要用, 需要把ADC和触摸屏驱动一并抄过来.
"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."
级别: 新手上路
UID: 10480
精华: 0
发帖: 13
金钱: 105 两
威望: 42 点
综合积分: 26 分
注册时间: 2009-11-05
最后登录: 2012-11-21
2楼  发表于: 2009-11-10 13:29
那具体的定义ADC_LOCK的程序是那个啊?
级别: 新手上路
UID: 10480
精华: 0
发帖: 13
金钱: 105 两
威望: 42 点
综合积分: 26 分
注册时间: 2009-11-05
最后登录: 2012-11-21
3楼  发表于: 2009-11-10 22:44
ADC_LOCK是友善在/derivers/char/mini2440_adc.c中定义的一个互斥信号量,通过extern struct semaphore ADC_LOCK   在/deriver/input/touchscreen/mini2440_ts中调用,但是我疑惑的是为什么还会提示我未定义ADC_LOCK,难道还需要引入什么*.h文件吗?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2009-11-11 09:51

 回 3楼(zxx88) 的帖子

你必须把derivers/char/mini2440_adc.c编译成.o文件并且链接进最后的vmlinux
"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."
级别: 新手上路
UID: 10480
精华: 0
发帖: 13
金钱: 105 两
威望: 42 点
综合积分: 26 分
注册时间: 2009-11-05
最后登录: 2012-11-21
5楼  发表于: 2009-11-11 13:31
编译终于通过啦,可是下进板子里出现了错误,
Setup linux parameters at 0x30000100002a40000nux from RAM              
linux command line is: "noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAx000002a60000                                    
bl  
Boot the system      
C0"  
MACH_TYPE = 1999
Uncompressing Linux.............................................................
......................................................... done, booting the kern
el.

Supervivi> param show
Number of parameters: 9
name                    :          hex             integer
-------------------------------------------------------------
mach_type               :       000007cf                 1999
media_type              :       00000003                    3
boot_mem_base           :       30000000            805306368
baudrate                :       0001c200               115200
xmodem                  :       00000001                    1
xmodem_one_nak          :       00000000                    0
xmodem_initial_timeout  :       000493e0               300000
xmodem_timeout          :       000f4240              1000000
boot_delay              :       01000000             16777216
Linux command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
[ 此帖被zxx88在2009-11-11 15:51重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2009-11-11 18:36
关于内核启动的问题看这个帖子http://www.aiothome.com/bbs/read.php?tid-2661.html
这个问题和本贴讨论的问题无关,不要再在这里讨论了
"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."