[问题]编译2.4.18的内核为什么不行呢?

为当前最终发行版之前的所有版本提供支持
回复
linux_bear
帖子: 1
注册时间: 2006-11-23 12:39
送出感谢: 0
接收感谢: 0

[问题]编译2.4.18的内核为什么不行呢?

#1

帖子 linux_bear » 2006-11-23 12:44

我按照论坛上的方法编译成功了2.6.18的内核,但是编译2.4.18时却在make bzImage一步无法进行下去了,错误信息如下:
gcc -D__KERNEL__ -I/usr/src/linux-2.4.18/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /usr/src/linux-2.4.18/include/linux/prefetch.h:13,
from /usr/src/linux-2.4.18/include/linux/list.h:6,
from /usr/src/linux-2.4.18/include/linux/wait.h:14,
from /usr/src/linux-2.4.18/include/linux/fs.h:12,
from /usr/src/linux-2.4.18/include/linux/capability.h:17,
from /usr/src/linux-2.4.18/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.18/include/linux/sched.h:9,
from /usr/src/linux-2.4.18/include/linux/mm.h:4,
from /usr/src/linux-2.4.18/include/linux/slab.h:14,
from /usr/src/linux-2.4.18/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.18/include/asm/processor.h:73: 错误: 数组元素的类型不完全
In file included from /usr/src/linux-2.4.18/include/linux/fs.h:201,
from /usr/src/linux-2.4.18/include/linux/capability.h:17,
from /usr/src/linux-2.4.18/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.18/include/linux/sched.h:9,
from /usr/src/linux-2.4.18/include/linux/mm.h:4,
from /usr/src/linux-2.4.18/include/linux/slab.h:14,
from /usr/src/linux-2.4.18/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.18/include/asm/byteorder.h:14: 警告: 忽略函数返回类型的类型 限定
/usr/src/linux-2.4.18/include/asm/byteorder.h:28: 警告: 忽略函数返回类型的类型 限定
In file included from /usr/src/linux-2.4.18/include/linux/byteorder/little_endian.h:11,
from /usr/src/linux-2.4.18/include/asm/byteorder.h:45,
from /usr/src/linux-2.4.18/include/linux/fs.h:201,
from /usr/src/linux-2.4.18/include/linux/capability.h:17,
from /usr/src/linux-2.4.18/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.18/include/linux/sched.h:9,
from /usr/src/linux-2.4.18/include/linux/mm.h:4,
from /usr/src/linux-2.4.18/include/linux/slab.h:14,
from /usr/src/linux-2.4.18/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.18/include/linux/byteorder/swab.h:132: 警告: 忽略函数返回类 型的类型限定
/usr/src/linux-2.4.18/include/linux/byteorder/swab.h:145: 警告: 忽略函数返回类 型的类型限定
/usr/src/linux-2.4.18/include/linux/byteorder/swab.h:159: 警告: 忽略函数返回类 型的类型限定
In file included from /usr/src/linux-2.4.18/include/linux/sched.h:23,
from /usr/src/linux-2.4.18/include/linux/mm.h:4,
from /usr/src/linux-2.4.18/include/linux/slab.h:14,
from /usr/src/linux-2.4.18/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.18/include/linux/smp.h:29: 错误: ‘smp_send_reschedule’ 类型 冲突
/usr/src/linux-2.4.18/include/asm/smp.h:65: 错误: ‘smp_send_reschedule’ 的上一 个声明在此
In file included from /usr/src/linux-2.4.18/include/linux/mm.h:4,
from /usr/src/linux-2.4.18/include/linux/slab.h:14,
from /usr/src/linux-2.4.18/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.18/include/linux/sched.h:275: 错误: syntax error before ‘lont’
/usr/src/linux-2.4.18/include/linux/sched.h:275: 警告: 结构或联合后没有分号
In file included from /usr/src/linux-2.4.18/include/linux/unistd.h:9,
from init/main.c:17:
/usr/src/linux-2.4.18/include/asm/unistd.h:360: 警告: 内建函数 ‘_exit’ 类型冲突make: *** [init/main.o] 错误 1

是为什么呢?
恳请高手多多指教~~~
NBNBone
帖子: 1
注册时间: 2009-08-11 17:26
送出感谢: 0
接收感谢: 0

Re: [问题]编译2.4.18的内核为什么不行呢?

#2

帖子 NBNBone » 2009-08-11 17:28

/home/user1/linux/include/linux/smp.h:29: 错误: 与‘smp_send_reschedule’类型冲突
/home/user1/linux/include/asm/smp.h:65: 错误: ‘smp_send_reschedule’的上一个声明在此
In file included from /home/user1/linux/include/linux/unistd.h:9,
from init/main.c:17:
/home/user1/linux/include/asm/unistd.h:360: 警告: 与内建函数‘_exit’类型冲突
init/main.c: 在函数‘start_kernel’中:
init/main.c:555: 警告: 格式字符串不是一个字面字符串而且没有待格式化的实参
顶一个。
我也有相同的问题,只不过我后面的问题如上,路过的兄弟姐妹帮忙看看,
jingshui644
帖子: 3
注册时间: 2010-11-06 23:17
送出感谢: 0
接收感谢: 0

Re: [问题]编译2.4.18的内核为什么不行呢?

#3

帖子 jingshui644 » 2010-11-07 16:42

请问你的问题解决了吗?
jingshui644
帖子: 3
注册时间: 2010-11-06 23:17
送出感谢: 0
接收感谢: 0

Re: [问题]编译2.4.18的内核为什么不行呢?

#4

帖子 jingshui644 » 2010-11-07 16:42

我也是遇到的同样的问题,希望高手帮忙指点指点,谢谢啦!!
回复

回到 “老旧版本支持”