sccdyuebo 发表于 2003-10-18 11:04:13

内核编译时的问题

各位大虾:小弟在编译kernel时出现如下错误,请指教。
make menuconfig ->make dep -> make bzImage后出现
“gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-8/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=base -DEXPORT_SYMTAB -c base.c
base.c: In function `is_devfsd_or_child':
base.c:1417: structure has no member named `p_opptr'
base.c:1417: structure has no member named `p_opptr'
base.c: In function `devfsd_ioctl':
base.c:3433: warning: unused variable `lock'
make: *** Error 1
make: Leaving directory `/usr/src/linux-2.4.20-8/fs/devfs'
make: *** Error 2
make: Leaving directory `/usr/src/linux-2.4.20-8/fs/devfs'
make: *** Error 2
make: Leaving directory `/usr/src/linux-2.4.20-8/fs'
make: *** Error 2”的错误,后用make domules后出现
“cpufreq.c:1209: warning: function declaration isn't a prototype
cpufreq.c: In function `cpufreq_frequency_table_setpolicy_R_ver_str':
cpufreq.c:1213: `policy' undeclared (first use in this function)
cpufreq.c:1225: `table' undeclared (first use in this function)
cpufreq.c:1249: `index' undeclared (first use in this function)
cpufreq.c: At top level:
cpufreq.c:1253: `__kstrtab_cpufreq_frequency_table_setpolicy_R_ver_str' declared as function returning an array
cpufreq.c:1253: warning: parameter names (without types) in function declarationcpufreq.c:1253: function `__kstrtab_cpufreq_frequency_table_setpolicy_R_ver_str' is initialized like a variable
cpufreq.c:1253: warning: parameter names (without types) in function declarationcpufreq.c:1253: function `__ksymtab_cpufreq_frequency_table_setpolicy_R_ver_str' is initialized like a variable
cpufreq.c:1253: `b7abddd1' undeclared here (not in a function)
cpufreq.c:1253: invalid lvalue in unary `&'
cpufreq.c:1253: `b7abddd1' undeclared here (not in a function)
cpufreq.c:1253: warning: excess elements in scalar initializer
cpufreq.c:1253: warning: (near initialization for `__ksymtab_cpufreq_frequency_table_setpolicy_R_ver_str')
cpufreq.c:192: warning: `cpufreq_setup' defined but not used
make: *** Error 1
make: Leaving directory `/usr/src/linux-2.4.20-8/kernel'
make: *** Error 2”


我的是RH 9.0完全安装。

FH 发表于 2003-10-18 12:40:53

完全安装之后的kernel source 不能直接编译kernel,必须执行make mrproper把旧的配置文件完全清除,重新make menuconfig配置,再make bzImage && make modules && make modules_install

sccdyuebo 发表于 2003-10-21 19:51:27

必须用:
make bzImage && make modules && make modules_install吗?
谢谢

ottawa 发表于 2003-10-22 05:19:52

Yes

必须用:
make bzImage && make modules && make modules_install吗?
谢谢

Pretty much right!
页: [1]
查看完整版本: 内核编译时的问题