QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: 青铜镜

编译内核的可行性报告

[复制链接]
发表于 2006-7-8 21:33:54 | 显示全部楼层
一直都用的是intel的芯,不知具体会如何,但是感觉amd还是可以跑得 毕竟指令集相差不多,还跑着一样的OS
回复

使用道具 举报

发表于 2006-7-10 15:10:33 | 显示全部楼层
intel和amd的cpu只能说是“兼容”而已,内部结构肯定有不小的区别,相同的一个x86指令,内部执行的方式应该都有区别,因此高级语言的编译器对程序的执行效率影响还是有的。另外intel的mmx、sse指令集和amd的3d now指令集也是完全不同的,用这两种cpu处理特殊领域的东西,主要就靠这些指令集来加速。复杂指令集的cpu(cisc cpu)就是靠指令来吃饭的,不像精简指令集cpu(rsic cpu),指令只有那么很少的几十百吧条。
回复

使用道具 举报

 楼主| 发表于 2006-7-11 09:59:20 | 显示全部楼层
intel

AMD

那可是仇人见面,
分外眼红.

AMD老让intel不爽,
intel恨不得立刻捏死AMD,
应该不会让AMD沾自己的光,
占自己的便宜!
回复

使用道具 举报

发表于 2006-7-14 00:32:18 | 显示全部楼层
从gentoo的论坛来看,icc可以工作在amd系统上,不过可能有些问题,比如编译出的程序比gcc的大
回复

使用道具 举报

发表于 2006-7-26 13:36:10 | 显示全部楼层
对楼主的敬佩之至~
回复

使用道具 举报

发表于 2006-8-11 11:30:17 | 显示全部楼层
好贴,好贴,哇哈哈~~~~
回复

使用道具 举报

发表于 2006-8-18 15:11:41 | 显示全部楼层
回复

使用道具 举报

发表于 2006-10-9 23:14:16 | 显示全部楼层
顶,仔细看看。好人
回复

使用道具 举报

发表于 2006-10-12 12:34:41 | 显示全部楼层
ding  yi  ge      嘿嘿
回复

使用道具 举报

发表于 2006-10-26 11:04:18 | 显示全部楼层
小弟我在rh9.0下
编译内核时,输入命令
make  modules
总是编译通不过,
提示信息是

-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE
-DMODVERSIONS -include
/usr/src/linux-2.4.20-31.9/include/linux/modversions.h  -nostdinc
-iwithprefix include -DKBUILD_BASENAME=cpufreq  -DEXPORT_SYMTAB -c cpufreq.c
In file included from cpufreq.c:15:
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:60: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:60: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:60: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:61: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:61: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:62: panic_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:62: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:68: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:68:
simple_strtoul_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:68: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:69: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:69: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:69:
simple_strtol_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:69: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:70: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:70: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:70:
simple_strtoull_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:70: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:72: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:72: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:73: sprintf_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:73: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:74: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:74: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:74: vsprintf_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:74: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:75: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:75: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:76: snprintf_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:76: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:77: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:77: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:77: vsnprintf_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:77: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:79: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:79: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:80: sscanf_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:80: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:81: vsscanf_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:81: warning: parameter
names (without types) in function declaration
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:83: get_option_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:83: warning: parameter
names (without types) in function declaration
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:84: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:84: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:84: get_options_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:84: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:85: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:85: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:85: memparse_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:85: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:91: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:91: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:92: printk_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:92: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:108: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:108: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:109: warning: parameter
names (without types) in function declaration
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:114: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:114: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:114: dump_stack_R_ver_str'
declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:114: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:191: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:191: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:191:
__out_of_line_bug_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/kernel.h:191: warning: function
declaration isn't a prototype
In file included from /usr/src/linux-2.4.20-31.9/include/linux/prefetch.h:13,
                 from /usr/src/linux-2.4.20-31.9/include/linux/list.h:6,
                                  from /usr/src/linux-2.4.20-31.9/include/linux/module.h:12,
                                                   from cpufreq.c:16:

/usr/src/linux-2.4.20-31.9/include/asm/processor.h:60: warning: parameter
names (without types) in function declaration
/usr/src/linux-2.4.20-31.9/include/asm/processor.h:60: field
loops_per_jiffy_R_ver_str' declared as a function
/usr/src/linux-2.4.20-31.9/include/asm/processor.h:83: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/asm/processor.h:83: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/asm/processor.h:83: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/asm/processor.h:266: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/asm/processor.h:266: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/asm/processor.h:266: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/asm/processor.h:270: warning: parameter
names (without types) in function declaration
In file included from cpufreq.c:16:
/usr/src/linux-2.4.20-31.9/include/linux/module.h:183: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/module.h:183: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/module.h:183:
inter_module_register_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/module.h:183: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/module.h:184: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/module.h:184: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/module.h:184:
inter_module_unregister_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/module.h:184: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/module.h:185:
inter_module_get_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/module.h:185: warning: parameter
names (without types) in function declaration
/usr/src/linux-2.4.20-31.9/include/linux/module.h:186:
inter_module_get_request_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/module.h:186: warning: parameter
names (without types) in function declaration
/usr/src/linux-2.4.20-31.9/include/linux/module.h:187: invalid suffix on
integer constant
/usr/src/linux-2.4.20-31.9/include/linux/module.h:187: parse error before
numeric constant
/usr/src/linux-2.4.20-31.9/include/linux/module.h:187:
inter_module_put_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/module.h:187: warning: function
declaration isn't a prototype
/usr/src/linux-2.4.20-31.9/include/linux/module.h:196:
try_inc_mod_count_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.20-31.9/include/linux/module.h:196: warning: parameter
names (without types) in function declaration
In file included from /usr/src/linux-2.4.20-31.9/include/linux/fs.h:19,
                 from
/usr/src/linux-2.4.20-31.9/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.20-31.9/include/linux/binfmts.h:4,
                                  from /usr/src/linux-2.4.20-31.9/include/linux/sched.h:10,
                                                   from /usr/src/linux-2.4.20-31.9/include/linux/mm.h:22,
                                                                    from
/usr/src/linux-2.4.20-31.9/include/linux/slab.h:14,
                 from /usr/src/linux-2.4.20-31.9/include/linux/proc_fs.h:5,
                                  from cpufreq.c:24:

/usr/src/linux-2.4.20-31.9/include/linux/dcache.h: In function dget':
/usr/src/linux-2.4.20-31.9/include/linux/dcache.h:254: warning: implicit
declaration of function __out_of_line_bug_R8b0fd3c5'
cpufreq.c: In function cpufreq_parse_policy':
cpufreq.c:111: warning: implicit declaration of function sscanf_R859204af'
cpufreq.c: In function cpufreq_proc_read':
cpufreq.c:225: warning: implicit declaration of function sprintf_R1d26aa98'
cpufreq.c: In function cpufreq_proc_init':
cpufreq.c:327: warning: implicit declaration of function printk_R1b7d4074'
cpufreq.c: In function cpufreq_restore':
cpufreq.c:1109: warning: implicit declaration of function panic_R01075bf0'
cpufreq.c: At top level:
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-31.9/kernel'
make: *** [_mod_kernel] Error 2




这是什么原因?
请哪位高手帮帮我,不胜感激
回复

使用道具 举报

发表于 2006-10-26 11:24:48 | 显示全部楼层
好东西
回复

使用道具 举报

发表于 2006-10-29 13:44:38 | 显示全部楼层
文章很棒,笑话更棒!
回复

使用道具 举报

发表于 2006-11-7 09:26:37 | 显示全部楼层
[quote:787634caa1="cnhnln"][quote:787634caa1="青铜镜"][quote:787634caa1="cnhnln"]make.conf只对gentoo有用吧。其它的发行版直接改内核里的makefile,或者arch/i386/makefile

PS:楼主的文章真有风格阿[/quote]

偶试验过,
make.conf
这个文件,对编译内核,优化系统确实有相当好的效果!

我用播放HDTV来做试验,
有make.conf文件编译内核,
编译好了以后,
播放HDTV.
记录CPU的占用率和内存的使用率.

接着删除刚刚编译好的内核,
然后删除make.conf文件,
再重新编译内核,
编译好了以后,
再播放HDTV.
看看两种内核的CPU的占用率和内存使用率.
把这两者进行对比.

我编译内核共六次.
编译内核的.config文件是一样的,
带make.conf文件编译的内核明显要快一些!

以上是我个人的一点经验.
仅供大伙参考,
不足的地方,希望大伙批评指正,
我们大家一起共同学习,共同进步!

谢谢大伙回贴![/quote]
我的意思是除gentoo外的发行版应该不会读取/etc/make.conf文件[/quote]


还有些不明白,CentOS4.4是不是:
(1)如安装系统时的或是YUM的内核
/usr/src/kernels/2.6.9-42.0.3.EL-i686/arch/i386/Makefile

(2)如自己编译的
/home/xpcbs/download/linux-2.6.18/arch/i386/ Makefile

是在相应Makefile里直接编辑加入
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"

就可以吗??????
回复

使用道具 举报

发表于 2006-11-7 22:29:25 | 显示全部楼层
抱歉阿,没看明白楼上的意思,能详细些吗?
回复

使用道具 举报

发表于 2006-11-8 20:16:26 | 显示全部楼层
呵呵,说的太不清了
是说在优化时,如何修改makefile,来确定符合自己的CPU
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-2 02:24 , Processed in 0.059850 second(s), 13 queries .

© 2021 Powered by Discuz! X3.5.

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