----linux--内核编译的问题:undefined reference to `printascii'

undefined reference to `printascii'

2.6.21 linux 内核 3.4.1 toolchains (gcc3.4.1 glibc2.3.2 binutils2.1.5.90.0.3) 
在配置好内核后 进行编译 

出现如下错误: 
LD .tmp_vmlinux1 
arch/arm/mach-s3c2410/built-in.o(.text+0x1fd4): In function `$a': 
: undefined reference to `printascii' 
make: *** [.tmp_vmlinux1] Error 1 


printascii/printch/printhex/printhex2/printhex4/printhex8 定义于arch/arm/kernel/debug.S,这几个“函数”依赖于平台相关的几个“函数”:addruart senduart waituart busyuart (include/asm-arm/arch-s3c2410/debug-macro.S)来实现不依赖于 串口驱动的信息打印。 

需要打开以下两个选项(实际上是后一个,其依赖前一个): 
Kernel debugging (CONFIG_DEBUG_KERNEL=y) 
Kernel low-level debugging functions (CONFIG_DEBUG_LL=y) 

出错是在2410平台相关的目录中pm.c在定义了CONFIG_ S3C2410_PM_DEBUG 时要引用 printascii,但这个选项并没有自动打开上面的两个选项。(Bug:) 

因此,最终解决方案是: 
[1] 关闭PM调试选项:S3C2410 PM Suspend debug; 或 
[2] 打开上面两个核心调试选项;或 
[3]修改 arch/arm/mach-s3c2410/Kconfig 文件: 


config S3C2410_PM_DEBUG

bool "S3C2410 PM Suspend debug"

depends on ARCH_S3C2410 && PM

+ select CONFIG_DEBUG_KERNEL CONFIG_DEBUG_LL 
help

Say Y here if you want verbose debugging from the PM Suspend and

Resume code. See `Documentation/arm/Samsing-S3C24XX/Suspend.txt`

for more information.


或 


config S3C2410_PM_DEBUG

bool "S3C2410 PM Suspend debug"

- depends on ARCH_S3C2410 && PM 
+ depends on ARCH_S3C2410 && PM && CONFIG_DEBUG_LL 
help

Say Y here if you want verbose debugging from the PM Suspend and

Resume code. See `Documentation/arm/Samsing-S3C24XX/Suspend.txt`

for more information.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值