Linux カーネルの更新(2.2.20 → 2.4.20)
Linux カーネルを 2.2.20 から 2.4.20 に更新したときの作業内容をまとめたものです。以下の内容は私の環境での話なので、これ以外の環境での動作保証はしません。
現在私が使っているマシンのスペックのうち、Kernel Configuration に関係ありそうな部分だけ抜き出してみた。
項目 | 型番など |
CPU | Pentium III 800MHz |
BIOS | Advanced Power Management 対応 |
Chipset | Intel 82815 HOST/AGP/SDRAM Controller(I815) 82801BA I/O Controller Hub(ICH2) |
Video Card | ATI All in Wonder 128 PRO |
Audio Card | AC'97 CODEC(On board) |
Mouse | PS/2 Mouse |
Network device | Realtek RTL-8139 |
IDE/ATAPI devices | 3(HDD, DVD-ROM Drive, CD-R/RW Drive) |
Others | USB*2, Printer(Parallel)*1, UART*1, etc. |
以下、私の環境(Debian GNU/Linux 3.0)における作業を記す。
まずは 2.4.20 カーネルのソースパッケージ "kernel-source-2.4.20.deb" をインストールする。
# apt-get install kernel-source-2.4.20
# cd /usr/src
# tar jxvf /usr/src/kernel-source-2.4.20.tar.bz2
ここまで終えると、/usr/src/kernel-source-2.4.20/ というディレクトリにカーネルソースが展開されている。
ソースのインストールができたら、
# cd /usr/src/kernel-source-2.4.20
# make xconfig
とすると、GUI方式の Configuration Program が起動する。ここから自分の環境に合わせてカーネルの機能設定(コンフィグレーション)をしていくことになる。主に参考となるのは現在動作中のカーネルの設定ファイルだが、他にJF:Configuration.helpも挙げておく。
今回私が有効(Yes / Module) にしたもの、並びに何らかの設定をした項目は次の通り。
Code maturity level options
- Prompt for development and/or incomplete code/drivers: Yes
開発中のコード/ドライバのサポートの有無。一部のドライバはここを有効にしないと使えなかったりする。
Loadable module support
- Enable loadable module support: Yes
- Set version information on all module symbols: Yes
- Kernel module loader: Yes
Processor type and features
- Processor Family: Pentium-III/Celeron(Coppermine)
- MTRR(Memory Type Range Register): Yes
PCI または AGP バス上にある Video Cardへのアクセスが速くなるらしい。
- LOCAL APIC support on uniprocessors: Yes
CPU 内の Advanced Programmable Interrupt Controller が働く。 CPU に搭載されてなくても害はないみたい。
- IO-APIC support on uniprocessors: Yes
CPU 内の IO-APIC が働く。CPU に搭載されてなくても害はないみたい。
General Setup
- Networking support: Yes
- PCI support: Yes
- PCI access mode: Any
- PCI device name database: Yes
- Support for hot-pluggable device: Yes
電源入れっぱなしで USB など抜き差しする場合に必要。
- System V IPC: Yes
- BSD Process Accounting: Yes
- Sysctl support: Yes
- Kernel core (/proc/kcore) format: ELF
- Kernel support for a.out binaries: Module
- Kernel support for ELF binaries: Yes
- Kernel support for MISC binaries: Module
- Power Management support: Yes
- Advanced Power Management BIOS support: Yes
Shutdown 時自動電源 OFF をさせるのに必要。
Parallel port support
パラレルポートでプリンタを使うために以下の項目をとりあえず有効化。
- Parallel port support: Yes
- PC-style hardware: Yes
Plug and Play support
- Plug and Play support: Yes
Block devices
- Normal floppy disk support: Yes
Networking Options
- Packet Socket: Yes
- Unix domain sockets: Yes
- TCP/IP networking: Yes
ATA/IDE/MFM/RLL support
- ATA/IDE/MFM/RLL support: Yes
- IDE, ATA and ATAPI Block devices
- Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support: Yes
- Include IDE/ATA-2 disk support: Yes
- Use multi-mode by default: Yes
"DriveReady SeekComplete Error" を無視。
- Include IDE/ATAPI CDROM support: Yes
- SCSI emulation support: Module
CD-R/RW 書き込み用にモジュールにしておく。
- Generic PCI IDE chip set support: Yes
- Sharing PCI IDE interrupts support: Yes
- Generic PCI bus-master DMA support: Yes
- Use PCI DMA by default available: Yes
- Intel PIIXn chipsets support: Yes
ICH2 がこれに該当するので有効化。
- PIIXn tuning support: Yes
SCSI support
USB Mass Storage(カードリーダーとか?)を使うにはサポートする必要がある。
- SCSI support: Module
- SCSI disk support: Module
- Verbose SCSI error reporting (kernel size +=12K): Yes
Network device support
- Network device support: Yes
- Ethernet(10 or 100Mbit)
- Ethernet(10 or 100Mbit): Yes
- EISA, VLB, PCI and on board controllers: Yes
- Realtek RTL-8139 PCI Fast Ethernet Adapter support: Yes
Input core support
USB の入力機器(マウス、キーボード、ジョイスティック)を使用する場合は設定が必要らしい。私の場合はジョイスティックだけ設定。
- Input core support: Module
- Joystick support: Module
Character devices
- Virtual Terminal: Yes
- Support for console on virtual terminal: Yes
- Standard/generic (8250/16550 and compatible UARTs) serial support: Module
- Unix 98 PTY support: Yes
- Parallel Printer support: Yes
- Mice
- Mouse Support(not serial and bus mice): Yes
- PS/2 mouse (aka "auxiliary device") support: Yes
- /dev/nvram support: Module
- Enhanced Real Time Clock Support: Module
起動時の "Can't locate module char-major-10-135" 対策。
- /dev/agpgart (AGP Support): Yes
- Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support: Yes
I815なので必須。
- Intel I810/I815/I830M/(on-board) support: Yes
I815なので必須。
- Direct Rendering Manager (XFree86 DRI support): Yes
- DRM 4.1 drivers - ATI Rage 128: Yes
All in wonder 128 PRO はこれに該当。
File Systems
- Kernel automounter version 4 support: Yes
- DOS FAT fs support: Module
DOS 用。
- VFAT(Windows-95) fs support: Module
Windows98用。
- Virtual memory file system support: Yes
- ISO 9660 CDROM file system support: Yes
- Microsoft Joliet CDROM extensions: Yes
Windows で作成した CD-R/RW 用。
- /proc file system support: Yes
- /dev/pts file system for Unix98 PTYs: Yes
- Second extended fs support: Yes
- Network File Systems
- NFS file system support: Yes
- NFS server support: Module
- Native Language Support
- Default NLS Option: iso8859-1
- Codepage 437(United States, Canada): Yes
- Japanese Charsets: Module
- NLS ISO 8859-1 (Latin 1;Western European Languages): Yes
Console Drivers
Sound
- Sound Card support: Yes
ALSAを使う場合、ここだけ有効にする。
USB Support
- Support for USB: Yes
- Preliminary USB device filesystem: Yes
- UHCI Alternate Driver(JE) support: Yes
- USB Mass Storage support: Module
- USB Human Interface Device (Full HID) support: Module
USBの入力機器(Joystickなど)を使うのに必要。
- HID input layer support: Yes
- /dev/hiddev raw HID device support: Yes
- USB Scanner support: Yes
カーネルの設定が終わったらカーネルパッケージを作成する。ここでは、kernel-package パッケージがインストールされていることを前提とする。revision を "tenpoint.2003.02.10" とする場合、
# make-kpkg clean
# make-kpkg --revision tenpoint.2003.02.10 kernel-image
と実行する。これで、/usr/src/ に kernel-image-2.4.20_tenpoint.2003.02.10_i386.deb というパッケージができている。インストールは
# cd ../
# dpkg -i kernel-image-2.4.20_tenpoint.2003.02.10_i386.deb
とすればOK。
2.2.20 カーネルで使っていた ALSA の設定をそのまま流用する。私の /etc/alsa/alsa-source.conf の中身(部分抜粋)は、
ALSA_NOPNP="y"
ALSA_DEBUG=""
ALSA_CARDS="intel8x0"
となっている(intel8x0 は AC'97 CODEC 用設定)。設定ができているので 2.4.20 用 ALSA Package を作成する。
# cd /usr/src/kernel-source-2.4.20
# make-kpkg modules_image
これで、/usr/src/ に alsa-modules-2.4.20_0.9.0rc1+2+p0+tenpoint.2003.02.10_i386.deb というパッケージができている。インストールは
# cd ../
# dpkg -i alsa-modules-2.4.20_0.9.0rc1+2+p0+tenpoint.2003.02.10_i386.deb
のように行う。これで音が出るようになる。
ちなみに、私の /etc/alsa/modutils/0.9 の中身は以下の通り。(この内容は update-modules コマンドで /etc/modules.conf に反映される)
# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF verion 0.4.3b ---
alias char-major-116 snd
alias snd-card-0 snd-intel8x0
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
options snd snd_major=116 snd_cards_limit=1 snd_device_mode=0660 snd_device_gid=
29 snd_device_uid=0
# --- END: Generated by ALSACONF, do not edit. ---
※alsaconf 0.4.3b で Configuration ファイルを作ると、"snd-intel8x0" の部分が snd-card-intel8x0 という名前になっている。そのままだとドライバを見つけられず組み込みに失敗するので注意(上は手で修正したもの)。
起動時に以下のメッセージが出てます。
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 203M
agpgart: agpgart: Detected an Intel i815, but could not find the secondary device. Assuming a non-integrated video card.
agpgart: Detected Intel i815 chipset
agpgart: AGP aperture is 64M @ 0xd0000000
現時点で特に不具合らしきものはないのですが…。Google で検索したけど、ちょっと対処法がわかりません。
Topに戻る
mcquen@nnn.ac