QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 801|回复: 3

内核编译时的问题

[复制链接]
发表于 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[3]: *** [base.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.20-8/fs/devfs'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-8/fs/devfs'
make[1]: *** [_subdir_devfs] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-8/fs'
make: *** [_dir_fs] 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[1]: *** [cpufreq.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.20-8/kernel'
make: *** [_mod_kernel] Error 2”


我的是RH 9.0完全安装。
发表于 2003-10-18 12:40:53 | 显示全部楼层
完全安装之后的kernel source 不能直接编译kernel,必须执行[code:1]make mrproper[/code:1]把旧的配置文件完全清除,重新[code:1]make menuconfig[/code:1]配置,再[code:1]make bzImage && make modules && make modules_install [/code:1]
回复

使用道具 举报

 楼主| 发表于 2003-10-21 19:51:27 | 显示全部楼层
必须用:
make bzImage && make modules && make modules_install  吗?
谢谢
回复

使用道具 举报

发表于 2003-10-22 05:19:52 | 显示全部楼层

Yes

[quote:b04bc850d8="sccdyuebo"]必须用:
make bzImage && make modules && make modules_install  吗?
谢谢[/quote]

Pretty much right!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 10:20 , Processed in 0.045245 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表