编译内核的第一步就是配置内核,这是增加或是减少对一些内核特性支持的必要步骤。
为完成内核的配置必须切换到root 用户,然后转入内核源码目录:
#cd /usr/src/linux
#make config
make 后面跟上什么样的config 可以查看一下帮助信息:
root@ubuntu:/usr/src/linux-headers-3.2.0-32# make config
scripts/kconfig/conf --oldaskconfig Kconfig
*
* Linux/i386 3.2.30 Kernel Configuration
*
DMA memory allocation support (ZONE_DMA) [Y/n/?]
从上面执行make config 输入的log 可以看出是执行的script/kconfig/conf 可执行文件,然后跟上选项参数。
因此可以,
#cd scripts/kconfig/
#./conf --help
root@ubuntu:/usr/src/linux-headers-3.2.0-32/scripts/kconfig# ./conf --help
./conf:无法识别的选项“--help”
Usage: ./conf [option] <kconfig-file>
[option] is _one_ of the following:
--listnewconfig List new options
--oldaskconfig Start a new configuration using a line-oriented program
--oldconfig Update a configuration using a provided .config as base
--silentoldconfig Same as oldconfig, but quietly, additionally update deps
--oldnoconfig Same as silentoldconfig but set new symbols to no
--defconfig <file> New config with default defined in <file>
--savedefconfig <file> Save the minimal current configuration to <file>
--allnoconfig New config where all options are answered with no
--allyesconfig New config where all options are answered with yes
--allmodconfig New config where all options are answered with mod
--alldefconfig New config with all symbols set to default
--randconfig New config with random answer to all options
root@ubuntu:/usr/src/linux-headers-3.2.0-32/scripts/kconfig#
administrator@ubuntu:~/project/omap$ make menuconfig