Chinaunix首页 | 论坛 | 博客
  • 博客访问: 202985
  • 博文数量: 47
  • 博客积分: 2000
  • 博客等级: 大尉
  • 技术积分: 455
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-04 13:34
文章分类

全部博文(47)

文章存档

2011年(1)

2009年(5)

2008年(41)

我的朋友

分类: LINUX

2008-06-13 19:39:52

下面我们进入config.in,如下图所示,config.in包含了可配置的所有选项,在config.in中的重要函数有:
mainmenu_name
mainmenu_option
comment
choice
bool
int
在上面的scrīpts/Configure中,执行config.in脚本,实际上就是从上到下,执行这些命令。
mainmenu_name,mainmenu_option和menuconfig有关,暂不解释。
comment用于作注释。
choice,bool,int用于实现选项的赋值,也就是给CONFIG_的宏赋值,下面以bool为例详细讲解,另外的两个命令原理相同。
# For a descrīption of the syntax of this configuration file,
# see Documentation/kbuild/config-language.txt.
#
mainmenu_name "Linux Kernel Configuration"

mainmenu_option next_comment
comment 'System Type'

choice 'ARM system type' \
  "SA1100-based         CONFIG_ARCH_SA1100 \
   PXA250/210-based     CONFIG_ARCH_PXA250 \
   S3C2400-based        CONFIG_ARCH_S3C2400 \
   S3C2410-based        CONFIG_ARCH_S3C2410 \
   S3C2440-based        CONFIG_ARCH_S3C2440 "

mainmenu_option next_comment
comment 'Implementations'
if [ "$CONFIG_ARCH_S3C2400" = "y" ]; then
  choice 'Platform' \
    "SMDK       CONFIG_S3C2400_SMDK \
     GAMEPARK   CONFIG_S3C2400_GAMEPARK"
  if [ "$CONFIG_S3C2400_GAMEPARK" = "y" ]; then
    bool '    Support OS Switching' CONFIG_S3C2400_GAMEPARK_OSSWITCH
    bool '    Run in the RAM' CONFIG_S3C2400_GAMEPARK_ON_RAM
  fi
fi

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