vine linux 3.1 make menuconfig
sorry Japanese only
PAGE作成日 2005/08/19
最終更新日 2007/01/05
page size = Mbyte

make mrproper <= 前のページ


kernelをコンパイルするときの各種設定を行うのが make menuconfigです。

純粋なテキストベース make config
X上で行うグラフィックベース make xconfig
テキストベースだけどお気楽メニュー形式な make menuconfig

となってます。

初期の確認

.configが無いこと
configsディレクトリーに、ディストリビューションのデフォルト(って言い方で ok?)の .configがあること。
を確認します。

[root]# cd /usr/src/linux-2.4.27/
[root]# ls -a
./       CREDITS         Makefile               REPORTING-BUGS  configs/  fs/       ipc/     mm/
../      Documentation/  README                 Rules.make      crypto/   include/  kernel/  net/
COPYING  MAINTAINERS     README.kernel-sources  arch/           drivers/  init/     lib/     scripts/
.configは存在しません。

[root]# cd /usr/src/linux-2.4.27/configs
[root]# ls
kernel-2.4.27-athlon-smp.config  kernel-2.4.27-i386-smp.config  kernel-2.4.27-i586.config
kernel-2.4.27-athlon.config      kernel-2.4.27-i386.config      kernel-2.4.27-i686-smp.config
kernel-2.4.27-i386-BOOT.config   kernel-2.4.27-i586-smp.config  kernel-2.4.27-i686.config
各種 configファイルがあります。
この中の kernel-2.4.27-i686.configを make menuconfig立ち上げた後に loadします。
その前に Makefileの書き換えを行います

Makefileの書き換え

makeの作業中、出来上がるファイルが自分の好きなファイル名で展開されるよう
/usr/src/linux-2.4.27/Makefileを変更します。
以下の部分に自分バージョンだと分かるよう、何か文字列を追加しておきます。
これを行わないと、標準的なディレクトリー名でファイルが作られ、今までの環境が破壊します。

/usr/src/linux-2.4.27/Makefileの最初の部分
PATCHLEVEL = 4
SUBLEVEL = 27
EXTRAVERSION = -0vl7.6-20050819

KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
私は緑色の日付を追加しました。
make modules_install時に、ここへ記述した文字列で /lib以下にディレクトリーが作成されます。

あと出来上がったファイルを installするディレクトリーの指定も
export  INSTALL_PATH=/boot
の様にコメントアウトの # マークを削除しておきます。

make menuconfig

/usr/src/linux-2.4.27ディレクトリーにて make menuconfigを実行します。
[root]# cd /usr/src/linux-2.4.27
[root]# make menuconfig

これが立ち上がったところです。
 Linux Kernel v2.4.27-0vl7.6-20050819 Configuration
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq Main Menu qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
  x  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted letters are hotkeys.  Pressing <Y>  x
  x  includes, <N> excludes, <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help.  Legend: [*]        x
  x  built-in  [ ] excluded  <M> module  < > module capable                                                         x
  x                                                                                                                 x
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x                               Code maturity level options  --->                                             x x
  x x                               Loadable module support  --->                                                 x x
  x x                               Processor type and features  --->                                             x x
  x x                               General setup  --->                                                           x x
  x x                               Memory Technology Devices (MTD)  --->                                         x x
  x x                               Parallel port support  --->                                                   x x
  x x                               Plug and Play configuration  --->                                             x x
  x x                               Block devices  --->                                                           x x
  x x                               Multi-device support (RAID and LVM)  --->                                     x x
  x x                               Networking options  --->                                                      x x
  x x                               Telephony Support  --->                                                       x x
  x x                               ATA/IDE/MFM/RLL support  --->                                                 x x
  x x                               SCSI support  --->                                                            x x
  x x                               Fusion MPT device support  --->                                               x x
  x x                               I2O device support  --->                                                      x x
  x x                               Network device support  --->                                                  x x
  x x                               Amateur Radio support  --->                                                   x x
  x x                               IrDA (infrared) support  --->                                                 x x
  x x                               ISDN subsystem  --->                                                          x x
  x x                               Old CD-ROM drivers (not SCSI, not IDE)  --->                                  x x
  x x                               Input core support  --->                                                      x x
  x x                               Character devices  --->                                                       x x
  x x                               Multimedia devices  --->                                                      x x
  x x                               Crypto Hardware support  --->                                                 x x
  x x                               File systems  --->                                                            x x
  x x                               Console drivers  --->                                                         x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqv(+)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
  x                                        <Select>    < Exit >    < Help >                                         x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

ディストリビューションデフォルトのロード

本当に、ディストリビューション(私の場合だったら vine3.1)のデフォルトなのかどうかは分かりませんが、
これを読み込むと、それなりな設定が読み込まれます。
まるきりゼロから設定していくよりも簡単です。

読み込み方法
Load an Alternate Configuration File を選択 => Enter
こんな画面に変わるので
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x  Enter the name of the configuration file you wish  x
x  to load.  Accept the name shown to restore the     x
x  configuration you last retrieved.  Leave blank to  x
x  abort.                                             x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x xarch/i386/defconfig                              x x
x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
x               <  Ok  >      < Help >                x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
arch/i386/defconfigから configs/kernel-2.4.27-i686.configへ書き換え Enter
一瞬でロードされます。ロードしましたとかの表示は出ないようです。

設定変更

設定変更は
Enter => 個別メニューに入る
ESC => 1個戻る
SPACE => 設定の変更
にて全ページを設定するだけです。

< > は Disable 使わない いらない 選ばない .oはコピーもされない。って意味。
<M> は、/lib/modules以下へ .oで組み込む。kernelには組み込まない。
<*> は、kernelに組み込む。
って意味なんだと思います。

設定の保存

ESCで抜けていくと、以下のメニューが出ます。
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x   Do you wish to save your new kernel configuration?     x
tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
x                   < Yes >      <  No  >                  x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
Yesに合わせて Returnすると

Saving your kernel configuration...

*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you must run 'make dep'.
と表示が出て /usr/src/linux-2.4.27/.config が作成されました。

次回から make menuconfigを実行すると、今作成された .configをロードして立ち上がるようになります。
えーい間違えた!って時は rm .configを実行した後、ディストリビューションデフォルトを loadすればいいと思います。


ちなみに、私が設定してみた .configはこちら => dot-config.html
以下の構成用の .configファイルです
CPU AthlonXP2500+ (K7用)
マザー nForce2
SCSI ASC29160N(AIC7x用)
USB,FLOPPYなど余計な物無し

続く => make dep

15135
戻る