2.6.14内核编译出现一个小问题,怎么解决?

jiongdy 2009-05-08 09:58:13
用3.4.1arm-linux-gcc编译2.6.14.1内核出现错误,具体也没有报在哪里?

执行命令:
[chandy@localhost linux-2.6.14.1]$ make ARCH=arm CROSS_COMPILE=arm-linux- zImage

执行结果:

CHK include/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
SPLIT include/linux/autoconf.h -> include/config/*
SYMLINK include/asm-arm/arch -> include/asm-arm/arch-s3c2410
Generating include/asm-arm/mach-types.h
CC arch/arm/kernel/asm-offsets.s
In file included from include/asm/system.h:96,
from include/asm/bitops.h:22,
from include/linux/bitops.h:77,
from include/linux/thread_info.h:20,
from include/linux/spinlock.h:53,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from arch/arm/kernel/asm-offsets.c:13:
include/asm/proc-fns.h:154:28: include/asm/asm/cpu-single.h: Too many levels of symbolic links
In file included from include/asm/bitops.h:22,
from include/linux/bitops.h:77,
from include/linux/thread_info.h:20,
from include/linux/spinlock.h:53,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from arch/arm/kernel/asm-offsets.c:13:
include/asm/system.h:105: warning: "struct mm_struct" declared inside parameter list
include/asm/system.h:105: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from include/asm/pgtable.h:440,
from include/linux/mm.h:36,
from arch/arm/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: In function `ptep_set_wrprotect':
include/asm-generic/pgtable.h:134: warning: implicit declaration of function `cpu_set_pte'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

刚开始学习linux,不是很懂,请教高手指点!
...全文
230 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
puheavy123 2009-05-10
  • 打赏
  • 举报
回复
我编译的时候没出现任何问题,一切很顺利....
jiongdy 2009-05-10
  • 打赏
  • 举报
回复
是不是我装的redhat linux版本有问题?
xhy_851221 2009-05-09
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 morris88 的回复:]
貌似交叉编译环境有点儿问题

为S3C2410建立arm-linux交叉编译环境:http://bbs.driverdevelop.com/htm_data/12/0804/110198.html
[/Quote]up
yangzhifu 2009-05-09
  • 打赏
  • 举报
回复
用3.4.1的还是一样的问题啊?
jiongdy 2009-05-09
  • 打赏
  • 举报
回复
我就是直接拷贝的linux-2.6.14.1/arch/arm/configs/s3c2410_defconfig到linux-2.6.14.1/.config进行编译的。
我是在root用户下编译的,当用普通用户时会报有的文件被拒绝访问。

编译器用的是3.4.1,要配置什么呢,我自己随便写的一个hello.c都可以用他来编译。
sqs570408 2009-05-09
  • 打赏
  • 举报
回复
可能是编译器的问题,也可能是配置的问题,

asm-offsets.s 这个文件编译出错一般是编译器问题,不要用2.95.3,用3.4.1

编译器版本的问题,2.6内核不能使用以往的2.95.3版本的gcc,需改用3.4.1版本。关于编译器,最好不要自己做,下载网上现成的就可以了。http://www.gnuarm.com/这里有arm的编译器下载。

如果你用的是3.4.1的话,那就看看配置了.

建议先用arch/arm/config/下对应的默认config编译。
比如我的就是2410的.config,copy到kernel根目录即可

  • 打赏
  • 举报
回复
...看不懂,帮顶吧
morris88 2009-05-08
  • 打赏
  • 举报
回复
morris88 2009-05-08
  • 打赏
  • 举报
回复
貌似交叉编译环境有点儿问题

为S3C2410建立arm-linux交叉编译环境:http://bbs.driverdevelop.com/htm_data/12/0804/110198.html

4,438

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧