Chinaunix

标题: 编内核出错 [打印本页]

作者: sswqzx    时间: 2012-01-18 23:12
标题: 编内核出错
fs/proc/meminfo.o
fs/proc/meminfo.c:135:1: directives may not be used inside a macro argument

fs/proc/meminfo.c:134:50: unterminated argument list invoking macro "K"

fs/proc/meminfo.c: In function `meminfo_proc_show':

fs/proc/meminfo.c:139: `K' undeclared (first use in this function)

fs/proc/meminfo.c:139: (Each undeclared identifier is reported only once
fs/proc/meminfo.c:139: for each function it appears in.)

fs/proc/meminfo.c:139: warning: too few arguments for format

fs/proc/meminfo.c:166: warning: left-hand operand of comma expression has no effect

fs/proc/meminfo.c:166: warning: left-hand operand of comma expression has no effect

fs/proc/meminfo.c:166:warning: left-hand operand of comma expression has no effect
fs/proc/meminfo.c:166: warning: left-hand operand of comma expression has no effect

fs/proc/meminfo.c:166: parse error before ')' toke
n
make[2]: *** [fs/proc/meminfo.o] Error 1

make[1]: *** [fs/proc] Error 2

make: *** [fs] Error 2

出现上面的错误。有知道我大神帮忙回下。谢了!
作者: sswqzx    时间: 2012-01-18 23:28
这问解决了,下载一个meminfo.c文件放到要编译的内核目录里/usr/src/linux-3.0/fs/proc 然后make就可以了,可是现在问题又有了。出现这个错误Last login: Tue Jan  3 17:46:19 2012
[root@localhost root]# cd /usr/src/linux-3.1.1/
[root@localhost linux-3.1.1]# make
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-syms.lds
  LD      arch/x86/vdso/built-in.o
  LD      arch/x86/built-in.o
  CHK     kernel/config_data.h
  CC [M]  drivers/gpu/drm/radeon/r600_cp.o
drivers/gpu/drm/radeon/r600_cp.c:399:1: directives may not be used inside a macro argument
drivers/gpu/drm/radeon/r600_cp.c:398:37: unterminated argument list invoking macro "RADEON_WRITE"
drivers/gpu/drm/radeon/r600_cp.c: In function `r600_cp_load_microcode':
drivers/gpu/drm/radeon/r600_cp.c:402: implicit declaration of function `RADEON_WRITE'
drivers/gpu/drm/radeon/r600_cp.c:404: parse error before ')' token
drivers/gpu/drm/radeon/r600_cp.c:492:1: directives may not be used inside a macro argument
drivers/gpu/drm/radeon/r600_cp.c:491:37: unterminated argument list invoking macro "RADEON_WRITE"
drivers/gpu/drm/radeon/r600_cp.c: In function `r700_cp_load_microcode':
drivers/gpu/drm/radeon/r600_cp.c:497: parse error before ')' token
drivers/gpu/drm/radeon/r600_cp.c:560:1: directives may not be used inside a macro argument
drivers/gpu/drm/radeon/r600_cp.c:559:45: unterminated argument list invoking macro "RADEON_WRITE"
drivers/gpu/drm/radeon/r600_cp.c: In function `r600_test_writeback':
drivers/gpu/drm/radeon/r600_cp.c:563: `RADEON_WRITE' undeclared (first use in this function)
drivers/gpu/drm/radeon/r600_cp.c:563: (Each undeclared identifier is reported only once
drivers/gpu/drm/radeon/r600_cp.c:563: for each function it appears in.)
drivers/gpu/drm/radeon/r600_cp.c:563: parse error before "readl"
drivers/gpu/drm/radeon/r600_cp.c:589:1: directives may not be used inside a macro argument
drivers/gpu/drm/radeon/r600_cp.c:588:37: unterminated argument list invoking macro "RADEON_WRITE"
drivers/gpu/drm/radeon/r600_cp.c: In function `r600_do_engine_reset':
drivers/gpu/drm/radeon/r600_cp.c:592: `RADEON_WRITE' used prior to declaration
drivers/gpu/drm/radeon/r600_cp.c:592: parse error before ')' token
make[4]: *** [drivers/gpu/drm/radeon/r600_cp.o] Error 1
make[3]: *** [drivers/gpu/drm/radeon] Error 2
make[2]: *** [drivers/gpu/drm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2

作者: dooros    时间: 2012-01-19 00:13
.config贴出来看看
作者: snow888    时间: 2012-01-19 00:32
回复 3# dooros


    这方面你是高手,俺就不说了,纯观摩。
作者: sswqzx    时间: 2012-01-19 20:18
我的RedHat9.0内核升级从2.4.到2.6
作者: sswqzx    时间: 2012-01-19 20:25




我用的是虚拟机做的实验。内核是2.4升到2.6
内核升级中用到下面几个软件都已安装 gcc等软件也安装
device-mapper.1.01.04
LVM2.2.01.14
mkinitrd-4.1.18-2
modutils-2.4.27
module-init-tools-3.2.2
linux-2.6.35.14.tar.bz2

#tar -xvjf linux-2.6.18.tar.bz2  -C /usr/src
#make mrproper
#make menuconfig
#make
#make modules_install
#make install


#make menuconfig
这里选 择的我不是很清楚。到低要选 什么。最容易出错。麻烦大神帖出来选项看一看。多谢了!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2