当前位置: 技术问答>linux和unix
一个编译内核时碰到的问题。
来源: 互联网 发布时间:2016-01-19
本文导语: 我用的 是fadro5. 下载的 是2.6.10版本的内核。 先 make gconfig 然后 make 出了一大堆错误:[root@localhost linux-2.6.10]# make >/dev/null scripts/mod/sumversion.c: 在函数 ‘parse_file’ 中: scripts/mod/sumversion.c:260: 警告:传递参数 ...
我用的 是fadro5. 下载的 是2.6.10版本的内核。
先 make gconfig
然后 make
出了一大堆错误:[root@localhost linux-2.6.10]# make >/dev/null
scripts/mod/sumversion.c: 在函数 ‘parse_file’ 中:
scripts/mod/sumversion.c:260: 警告:传递参数 1 (属于 ‘grab_file’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:277: 警告:传递参数 1 (属于 ‘parse_string’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:283: 警告:传递参数 1 (属于 ‘parse_comment’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c: 在函数 ‘parse_source_files’ 中:
scripts/mod/sumversion.c:335: 警告:初始化指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:344: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:357: 警告:传递参数 1 (属于 ‘parse_file’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c: 在函数 ‘strip_rcs_crap’ 中:
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘strncmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:467: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:467: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:467: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:483: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:484: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c: 在函数 ‘maybe_frob_rcs_version’ 中:
scripts/mod/sumversion.c:494: 警告:传递参数 1 (属于 ‘strip_rcs_crap’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c: 在函数 ‘read_symbol’ 中:
scripts/kallsyms.c:152: 警告:对指针赋值时目标与指针有/无符号不一致
scripts/kallsyms.c:153: 警告:传递参数 1 (属于 ‘strcpy’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c: 在函数 ‘symbol_valid’ 中:
scripts/kallsyms.c:190: 警告:传递参数 1 (属于 ‘strstr’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/conmakehash.c: 在函数 ‘getunicode’ 中:
scripts/conmakehash.c:36: 警告:初始化指针时目标与指针有/无符号不一致
scripts/conmakehash.c:44: 警告:对指针赋值时目标与指针有/无符号不一致
scripts/conmakehash.c:45: 警告:传递参数 1 (属于 ‘strtol’) 给指针时目标与指针有/无符号不一致
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from init/main.c:16:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
init/main.c: 在函数 ‘maxcpus’ 中:
init/main.c:150: 警告:传递参数 2 (属于 ‘get_option’) 给指针时目标与指针有/无符号不一致
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from init/version.c:10:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from init/do_mounts.c:1:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/topology.h:33,
from include/linux/mmzone.h:372,
from include/linux/gfp.h:4,
from include/linux/slab.h:15,
from include/linux/percpu.h:4,
from include/linux/rcupdate.h:41,
from include/linux/dcache.h:10,
from include/linux/fs.h:16,
from init/initramfs.c:2:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
init/initramfs.c: 在函数 ‘flush_window’ 中:
init/initramfs.c:402: 警告:传递参数 1 (属于 ‘flush_buffer’) 给指针时目标与指针有/无符号不一致
init/initramfs.c: 在函数 ‘unpack_to_rootfs’ 中:
init/initramfs.c:443: 警告:对指针赋值时目标与指针有/无符号不一致
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from arch/i386/kernel/process.c:17:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
arch/i386/kernel/process.c: 在函数 ‘show_regs’ 中:
arch/i386/kernel/process.c:259: 警告:传递参数 2 (属于 ‘show_trace’) 给指针时目标与指针有/无符号不一致
{standard input}: Assembler messages:
{standard input}:764: Error: suffix or operands invalid for `mov'
{standard input}:765: Error: suffix or operands invalid for `mov'
{standard input}:963: Error: suffix or operands invalid for `mov'
{standard input}:964: Error: suffix or operands invalid for `mov'
{standard input}:1040: Error: suffix or operands invalid for `mov'
{standard input}:1041: Error: suffix or operands invalid for `mov'
{standard input}:1141: Error: suffix or operands invalid for `mov'
{standard input}:1142: Error: suffix or operands invalid for `mov'
{standard input}:1207: Error: suffix or operands invalid for `mov'
{standard input}:1219: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/process.o] 错误 1
make: *** [arch/i386/kernel] 错误 2
烦劳哪位大侠帮忙看看是怎么回事?
先 make gconfig
然后 make
出了一大堆错误:[root@localhost linux-2.6.10]# make >/dev/null
scripts/mod/sumversion.c: 在函数 ‘parse_file’ 中:
scripts/mod/sumversion.c:260: 警告:传递参数 1 (属于 ‘grab_file’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:277: 警告:传递参数 1 (属于 ‘parse_string’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:283: 警告:传递参数 1 (属于 ‘parse_comment’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c: 在函数 ‘parse_source_files’ 中:
scripts/mod/sumversion.c:335: 警告:初始化指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:344: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:357: 警告:传递参数 1 (属于 ‘parse_file’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c: 在函数 ‘strip_rcs_crap’ 中:
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:463: 警告:传递参数 1 (属于 ‘strncmp’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:467: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:467: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:467: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:483: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c:484: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/mod/sumversion.c: 在函数 ‘maybe_frob_rcs_version’ 中:
scripts/mod/sumversion.c:494: 警告:传递参数 1 (属于 ‘strip_rcs_crap’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c: 在函数 ‘read_symbol’ 中:
scripts/kallsyms.c:152: 警告:对指针赋值时目标与指针有/无符号不一致
scripts/kallsyms.c:153: 警告:传递参数 1 (属于 ‘strcpy’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c: 在函数 ‘symbol_valid’ 中:
scripts/kallsyms.c:190: 警告:传递参数 1 (属于 ‘strstr’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/kallsyms.c:194: 警告:传递参数 1 (属于 ‘__builtin_strcmp’) 给指针时目标与指针有/无符号不一致
scripts/conmakehash.c: 在函数 ‘getunicode’ 中:
scripts/conmakehash.c:36: 警告:初始化指针时目标与指针有/无符号不一致
scripts/conmakehash.c:44: 警告:对指针赋值时目标与指针有/无符号不一致
scripts/conmakehash.c:45: 警告:传递参数 1 (属于 ‘strtol’) 给指针时目标与指针有/无符号不一致
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from init/main.c:16:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
init/main.c: 在函数 ‘maxcpus’ 中:
init/main.c:150: 警告:传递参数 2 (属于 ‘get_option’) 给指针时目标与指针有/无符号不一致
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from init/version.c:10:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from init/do_mounts.c:1:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/topology.h:33,
from include/linux/mmzone.h:372,
from include/linux/gfp.h:4,
from include/linux/slab.h:15,
from include/linux/percpu.h:4,
from include/linux/rcupdate.h:41,
from include/linux/dcache.h:10,
from include/linux/fs.h:16,
from init/initramfs.c:2:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
init/initramfs.c: 在函数 ‘flush_window’ 中:
init/initramfs.c:402: 警告:传递参数 1 (属于 ‘flush_buffer’) 给指针时目标与指针有/无符号不一致
init/initramfs.c: 在函数 ‘unpack_to_rootfs’ 中:
init/initramfs.c:443: 警告:对指针赋值时目标与指针有/无符号不一致
In file included from include/asm/mpspec.h:5,
from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from arch/i386/kernel/process.c:17:
include/asm/mpspec_def.h:78: 警告:‘packed’ attribute ignored for field of type ‘unsigned char[5u]’
arch/i386/kernel/process.c: 在函数 ‘show_regs’ 中:
arch/i386/kernel/process.c:259: 警告:传递参数 2 (属于 ‘show_trace’) 给指针时目标与指针有/无符号不一致
{standard input}: Assembler messages:
{standard input}:764: Error: suffix or operands invalid for `mov'
{standard input}:765: Error: suffix or operands invalid for `mov'
{standard input}:963: Error: suffix or operands invalid for `mov'
{standard input}:964: Error: suffix or operands invalid for `mov'
{standard input}:1040: Error: suffix or operands invalid for `mov'
{standard input}:1041: Error: suffix or operands invalid for `mov'
{standard input}:1141: Error: suffix or operands invalid for `mov'
{standard input}:1142: Error: suffix or operands invalid for `mov'
{standard input}:1207: Error: suffix or operands invalid for `mov'
{standard input}:1219: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/process.o] 错误 1
make: *** [arch/i386/kernel] 错误 2
烦劳哪位大侠帮忙看看是怎么回事?
|
fc5下编译2.6.10内核的话,可能是gcc的版本太新
可以使用旧版的gcc如gcc3.4。我用这个gcc能够顺利编译
可以使用旧版的gcc如gcc3.4。我用这个gcc能够顺利编译