求教:内核编译出错

内核编译和嵌入式产品的设计与开发
回复
头像
Porco
帖子: 3
注册时间: 2008-03-31 11:35
送出感谢: 0
接收感谢: 0

求教:内核编译出错

#1

帖子 Porco » 2008-09-17 11:49

本人初学小菜鸟一个,由于买的开发板用的是2.4.19的内核,暂时没能移植2.6的内核,要做驱动的编译又需要建立2.4.19的内核树,所以就在2.6下编译2.4内核(不知对不?)

但是在make bzImage时报错如下,网上没能搜索到准确答案,所以求助各位大虾(小弟实在不敢改文件里什么东西)

gcc -D__KERNEL__ -I/usr/src/linux-2.4.19/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -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.19/include/linux/prefetch.h:13,
from /usr/src/linux-2.4.19/include/linux/list.h:6,
from /usr/src/linux-2.4.19/include/linux/wait.h:14,
from /usr/src/linux-2.4.19/include/linux/fs.h:12,
from /usr/src/linux-2.4.19/include/linux/capability.h:17,
from /usr/src/linux-2.4.19/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.19/include/linux/sched.h:9,
from /usr/src/linux-2.4.19/include/linux/mm.h:4,
from /usr/src/linux-2.4.19/include/linux/slab.h:14,
from /usr/src/linux-2.4.19/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.19/include/asm/processor.h:74: error: array type has incomplete element type
In file included from /usr/src/linux-2.4.19/include/linux/fs.h:201,
from /usr/src/linux-2.4.19/include/linux/capability.h:17,
from /usr/src/linux-2.4.19/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.19/include/linux/sched.h:9,
from /usr/src/linux-2.4.19/include/linux/mm.h:4,
from /usr/src/linux-2.4.19/include/linux/slab.h:14,
from /usr/src/linux-2.4.19/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.19/include/asm/byteorder.h:14: warning: type qualifiers ignored on function return type
/usr/src/linux-2.4.19/include/asm/byteorder.h:28: warning: type qualifiers ignored on function return type
In file included from /usr/src/linux-2.4.19/include/linux/byteorder/little_endian.h:11,
from /usr/src/linux-2.4.19/include/asm/byteorder.h:45,
from /usr/src/linux-2.4.19/include/linux/fs.h:201,
from /usr/src/linux-2.4.19/include/linux/capability.h:17,
from /usr/src/linux-2.4.19/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.19/include/linux/sched.h:9,
from /usr/src/linux-2.4.19/include/linux/mm.h:4,
from /usr/src/linux-2.4.19/include/linux/slab.h:14,
from /usr/src/linux-2.4.19/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.19/include/linux/byteorder/swab.h:132: warning: type qualifiers ignored on function return type
/usr/src/linux-2.4.19/include/linux/byteorder/swab.h:145: warning: type qualifiers ignored on function return type
/usr/src/linux-2.4.19/include/linux/byteorder/swab.h:159: warning: type qualifiers ignored on function return type
In file included from /usr/src/linux-2.4.19/include/linux/fs.h:317,
from /usr/src/linux-2.4.19/include/linux/capability.h:17,
from /usr/src/linux-2.4.19/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.19/include/linux/sched.h:9,
from /usr/src/linux-2.4.19/include/linux/mm.h:4,
from /usr/src/linux-2.4.19/include/linux/slab.h:14,
from /usr/src/linux-2.4.19/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.19/include/linux/ncp_fs_i.h:26: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp_fs_i.h:27: warning: ‘packed’ attribute ignored for field of type ‘__u8[6]’
In file included from /usr/src/linux-2.4.19/include/linux/ncp_mount.h:12,
from /usr/src/linux-2.4.19/include/linux/ncp_fs_sb.h:12,
from /usr/src/linux-2.4.19/include/linux/fs.h:701,
from /usr/src/linux-2.4.19/include/linux/capability.h:17,
from /usr/src/linux-2.4.19/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.19/include/linux/sched.h:9,
from /usr/src/linux-2.4.19/include/linux/mm.h:4,
from /usr/src/linux-2.4.19/include/linux/slab.h:14,
from /usr/src/linux-2.4.19/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.19/include/linux/ncp.h:24: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:25: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:26: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:27: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:28: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:29: warning: ‘packed’ attribute ignored for field of type ‘__u8[]’
/usr/src/linux-2.4.19/include/linux/ncp.h:37: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:38: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:39: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:40: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:41: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:42: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:43: warning: ‘packed’ attribute ignored for field of type ‘__u8[]’
/usr/src/linux-2.4.19/include/linux/ncp.h:137: warning: ‘packed’ attribute ignored for field of type ‘__u8’
/usr/src/linux-2.4.19/include/linux/ncp.h:138: warning: ‘packed’ attribute ignored for field of type ‘__u8[256]’
/usr/src/linux-2.4.19/include/linux/ncp.h:174: warning: ‘packed’ attribute ignored for field of type ‘__u8’
In file included from /usr/src/linux-2.4.19/include/asm/smp.h:17,
from /usr/src/linux-2.4.19/include/linux/smp.h:14,
from /usr/src/linux-2.4.19/include/linux/sched.h:23,
from /usr/src/linux-2.4.19/include/linux/mm.h:4,
from /usr/src/linux-2.4.19/include/linux/slab.h:14,
from /usr/src/linux-2.4.19/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.19/include/asm/mpspec.h:86: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
In file included from /usr/src/linux-2.4.19/include/linux/sched.h:23,
from /usr/src/linux-2.4.19/include/linux/mm.h:4,
from /usr/src/linux-2.4.19/include/linux/slab.h:14,
from /usr/src/linux-2.4.19/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.4.19/include/linux/smp.h:29: error: conflicting types for ‘smp_send_reschedule’
/usr/src/linux-2.4.19/include/asm/smp.h:65: error: previous declaration of ‘smp_send_reschedule’ was here
In file included from /usr/src/linux-2.4.19/include/linux/unistd.h:9,
from init/main.c:17:
/usr/src/linux-2.4.19/include/asm/unistd.h:365: warning: conflicting types for built-in function ‘_exit’
make: *** [init/main.o] Error 1


求助大虾!谢谢了!
头像
cnkilior
论坛版主
帖子: 4979
注册时间: 2007-08-05 17:40
送出感谢: 0
接收感谢: 5 次

#2

帖子 cnkilior » 2008-09-17 11:50

浪费版面!
头像
Porco
帖子: 3
注册时间: 2008-03-31 11:35
送出感谢: 0
接收感谢: 0

#3

帖子 Porco » 2008-09-17 11:53

占版面对不起了,但我不知道怎么改,只能全部发上来,实在抱歉!
回复

回到 “内核及嵌入式开发”