Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1529771
  • 博文数量: 290
  • 博客积分: 3468
  • 博客等级: 中校
  • 技术积分: 3461
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-28 22:21
文章分类

全部博文(290)

文章存档

2016年(13)

2015年(3)

2014年(42)

2013年(67)

2012年(90)

2011年(75)

分类: LINUX

2013-01-04 09:31:43

如果只有一个内核映像文件,想要获取他的 .config 配置,有如下两个方法
前提是内核中选择了:
General setup  ---> 
 <*> Kernel .config support                                                 
   [*]   Enable access to .config through /proc/config.gz

─────────
────────Kernel .config support ────────────────
  │ CONFIG_IKCONFIG:                                                                      │ 
  │                                                                                       │ 
  │ This option enables the complete Linux kernel ".config" file                          │ 
  │ contents to be saved in the kernel. It provides documentation                         │ 
  │ of which kernel options are used in a running kernel or in an                         │ 
  │ on-disk kernel.  This information can be extracted from the kernel                    │ 
  │ image file with the script scripts/extract-ikconfig
and used as                       │ 
  │ input to rebuild the current kernel or to build another kernel.                       │ 
  │ It can also be extracted from a running kernel by reading                             │ 
  │ /proc/config.gz
if enabled (below). 
 


1. 运行此内核,在 /proc/config.gz 中的 config.gz 就是此内核的config了,将其copy 出来就可以了

2. 相比上一个方法,这个要方便许多,进入 内核源码目录:
# scripts/extract-ikconfig  zImage
会在终上端打印出此kenrel 的.config

阅读(1805) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~