Chinaunix首页 | 论坛 | 博客
  • 博客访问: 26594
  • 博文数量: 22
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 125
  • 用 户 组: 普通用户
  • 注册时间: 2012-09-24 12:40
文章分类

全部博文(22)

文章存档

2012年(22)

我的朋友
最近访客

分类:

2012-09-24 12:44:44

下面我们进入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

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