iceblood 发表于 2004-5-29 16:39:31

奇怪,自己编译的 2.6.x内核怎么就这么大?

看了Fedora core 2的内核模块才几十M,而自己编译的不管怎么弄都几百M,对比了一下,同样是ext3.ko,自己编译的要比自带的大十几倍大小的字节。你们呢?也是这样吗?如果不是,你们怎么编译的?
http://218.204.53.8/~liuhg/linux/Screenshot-Gnome-terminal.png

cnhnln 发表于 2004-5-29 22:23:19

呵呵,是不是编译的模块太多了。如果不是的话,用-Os参数编译试试

iceblood 发表于 2004-5-29 23:35:06

同样是ext3.ko,自己编译的要比自带的大十几倍大小的字节。怎么可能是modules过多的问题。
不过你说的-Os是个什么参数?能否详细解释一下?

cnhnln 发表于 2004-5-30 00:01:52

-Os
Optimize for size. -Os enables all -O2 optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size.
If you use multiple -O options, with or without level numbers, the last such option is the one that is effective.
改源码根目录下的Makefile
CFLAGS_KERNEL        =-Os

CFLAGS                 := -Wall -Wstrict-prototypes -Wno-trigraphs \
                     -fno-strict-aliasing -fno-common -Os

make config的时候也可以看到,设置处理器参数那里
页: [1]
查看完整版本: 奇怪,自己编译的 2.6.x内核怎么就这么大?