才知道有个make localmodconfig
时间:2009-11-27
来源:互联网
大体试了试,确实精简了不少,并且挺智能,比如:我只有ext4文件系统,它就只选了ext4,我是AMD的780G主板,它连Radeon KMS都给我选上了,网卡啥的选的也都正确,虽然貌似稍微选上了一些“垃圾”选项?
[root@HomeServer ~]# cd /lib/modules/
[root@HomeServer modules]# du --max-depth=1 -h
94M ./2.6.31-ARCH
15M ./2.6.32-rc8-rc
内核模块由100M左右减到了10几M
作者: yafeng 发布时间: 2009-11-27
作者: alpha.gu 发布时间: 2009-11-27
作者: ch_fb 发布时间: 2009-11-27
作者: Havanna 发布时间: 2009-11-27
作者: unicon 发布时间: 2009-11-28
作者: jobinson99 发布时间: 2009-11-28
作者: jarryson 发布时间: 2009-11-28
作者: 独钓寒江雪 发布时间: 2009-11-28
作者: digwtx 发布时间: 2009-11-28
作者: xsam 发布时间: 2009-11-29
作者: xsam
强烈关注!希望测试过的兄弟来反馈!
|
作者: 独钓寒江雪 发布时间: 2009-11-29
@echo ' oldconfig - Update current config utilising a provided .config as base'
@echo ' localmodconfig - Update current config disabling modules not loaded'
@echo ' localyesconfig - Update current config converting local mods to core'
@echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
@echo ' randconfig - New config with random answer to all options'
@echo ' defconfig - New config with default answer to all options'
作者: yafeng 发布时间: 2009-11-29
To: [email protected]
Subject: [PATCH 00/15] [GIT PULL] kconfig: localmodconfig for v2.6.32
Date: Fri, 11 Sep 2009 15:58:49 -0400
Message-ID: <[email protected]>
Cc: Linus Torvalds <[email protected]>, Andrew Morton <[email protected]>, Ingo Molnar <[email protected]>, Thomas Gleixner <[email protected]>, Theodore Tso <[email protected]>, Arnaldo Carvalho de Melo <[email protected]>, [email protected], [email protected], Sam Ravnborg <[email protected]>, Dick Streefland <[email protected]>, Stephen Rothwell <[email protected]>
Archive-link: Article, Thread
Linus,
This is the patch set that creates localmodconfig and localyesconfig.
This will facilitate testers by removing the thousand modules that
distributions enable with only the ones that they have loaded.
Yes it may miss usb devices that you don't have plugged in, but it will
save a lot of time in compiling by only compiling the code that you
have loaded.
The usage is quite simple. Just download the latest kernel.org kernel
(with this changeset in), cd to that directory and then do:
make localmodconfig
It will search for a .config locally first, then will look for
/proc/config.gz, then it will search the /boot directory for configs
matching the local kernel (uname -r). If it still does not find one
It search for configurations in the local binarys (vmlinux, /lib/modules..,
kernel/configs.ko, etc).
Once it finds a config to use, it will then read all the Kconfigs
and Makefiles to find out what config compiles what module. Then lsmod
is used to see what modules are loaded, and it will keep enabled all
the configs (including dependencies) that those modules require to
build. It disables all modules not needed.
Note, it only disables it does not enable, because a lot of modules
can be enabled by more than one config, and I don't want to guess.
I could someday enable easy configs (1 to 1 matches of config to module).
It also does nothing with built in code (=y). It does not enable or
disable them.
I've been using this code (various versions of) since 2005, and
so have others. When I get a new box, the first thing I do is
boot up the distribution kernel, download kernel.org kernel, and run
this script to get the modules needed to boot the kernel.
** CONFLICTS **
linux-next has proven that there is a conflict between these patches
and Sam Ravnborg's tree. I've tried to get in contact with Sam, but
he seems to be out. I don't want to hold up this push on that account.
But if you want, I could wait to fix the conflicts, or you can pull
this and he can fix it on his end. I'm fine with it. I just think
that this tool is important enough to get into mainline, especially
early in the merge window since it will help others test it. ;-)
作者: yafeng 发布时间: 2009-11-29
@echo ' localyesconfig
这两个貌似都是2.6.32的新选项,其中从上贴可以看出,这个是通过当前内核配置选项:
It will search for a .config locally first, then will look for /proc/config.gz, then it will search the /boot directory for configs matching the local kernel (uname -r). If it still does not find one It search for configurations in the local binarys (vmlinux, /lib/modules.., kernel/configs.ko, etc).
localyesconfig
则是把m改成y,搞成一个不依赖模块的单一内核
This adds the option localyesconfig to make. This is similar to localmodconfig, but after it removes unnecessary modules it runs sed -i s/=m/=y/ on the .config file. It then runs "make silentoldconfig" to fix any wholes that were created by the conversion of modules to core.
作者: yafeng 发布时间: 2009-11-29
作者: contrl 发布时间: 2009-11-29
作者: huntxu 发布时间: 2009-11-29
作者: huntxu
看14楼介绍,好像就是根据当前的config.gz来生成配置的,这在arch上如果用官方那PKGBUILD不也用的是一个固定的config...
|
作者: yafeng 发布时间: 2009-11-29
作者: 独钓寒江雪 发布时间: 2009-11-30
作者: xsam 发布时间: 2009-11-30
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28