Top / Installmemo / Linux / Kernel

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS

Kernel Download先

http://www.kernel.org/mirrors/countries/html/JP.html

CentOS関連情報

前提パッケージ

#  yum install kernel-devel gcc ncurses-devel
#  yum install patch make unzip zip bison flex gettext which

CentOS5におけるKernel2.6.3x系カーネル使用注意点

以下のOptionが有効になっていないとrootディレクトリをmountできず起動時にKernel Panicを起こす。

General Setup ---> enable deprecated sysfs features which may confuse old usersp

CentOSデフォルトの.config

# grep SYSFS .config
 # CONFIG_SYSFS_DEPRECATED_V2 is not set
 CONFIG_ACPI_SYSFS_POWER=y
 CONFIG_WIRELESS_EXT_SYSFS=y
 CONFIG_RTC_INTF_SYSFS=y
 CONFIG_SYSFS=y

オプションを有効にした.config。"CONFIG_SYSFS_DEPRECATED_V2=y"となる。

# grep SYSFS .config
 CONFIG_SYSFS_DEPRECATED=y
 CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_ACPI_SYSFS_POWER=y
 CONFIG_WIRELESS_EXT_SYSFS=y
 CONFIG_RTC_INTF_SYSFS=y
 CONFIG_SYSFS=y

https://www.centos.org/modules/newbb/viewtopic.php?topic_id=23627&forum=37&post_id=97305#forumpost97305
http://funky-dennis.livejournal.com/3290.html

Kernel compile

#make mrproper
 CLEAN   scripts/basic
 CLEAN   scripts/kconfig
 CLEAN   include/config

# cp old/.config 
# make bzImage
# make modules
# make modules_install
# make install

昨今はmake installで以下の作業を自動で行う。

# cat arch/i386/boot/bzImage > /boot/vmlinuz-2.6.20.1
# cp System.map /boot/System.map-2.6.20.1
# cd /boot
# mkinitrd initrd-2.6.20.1.img 2.6.20.1
# rm System.map
# ln -fs System.map-2.6.20.1 System.map

boot loaderへの組み込み

lilo

# cd /etc
# cp -ip lilo.conf lilo.conf.yyyymmddnn
# vi lilo.conf 
# /sbin/lilo

Warning:  LINEAR is deprecated in favor of LBA32:  LINEAR specifies 24-bit
  disk addresses below the 1024 cylinder limit; LBA32 specifies 32-bit disk
  addresses not subject to cylinder limits on systems with EDD bios extensions;
  use LINEAR only if you are aware of its limitations.

Added linux
Added linux2619 *
Added linux2620
# cat lilo.conf
prompt
timeout=20
default=linux2619
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
linear 

image=/boot/vmlinuz-2.6.16-0vl60
        label=linux
        initrd=/boot/initrd-2.6.16-0vl60.img
        read-only
        append="root=LABEL=/"

image=/boot/vmlinuz-2.6.19.1
        label=linux2619
        initrd=/boot/initrd-2.6.19.1.img
        read-only
        append="root=LABEL=/"

image=/boot/vmlinuz-2.6.20.1
        label=linux2620
        initrd=/boot/initrd-2.6.20.1.img
        read-only
        append="root=LABEL=/"

ThinkPad ACPI Driver

Kernelパッチ適用

[root@inasa03 linux-2.6.28.10]# patch -p1 < /tmp/smb/thinkpadacpi-0.24-20100220_v2.6.28.10.patch
patching file Documentation/laptops/thinkpad-acpi.txt
patching file Documentation/rfkill.txt
patching file drivers/Kconfig
patching file drivers/Makefile
patching file drivers/misc/Kconfig
patching file drivers/misc/Makefile
patching file drivers/misc/thinkpad_acpi.c
patching file drivers/platform/Kconfig
patching file drivers/platform/Makefile
patching file drivers/platform/x86/Kconfig
patching file drivers/platform/x86/Makefile
patching file drivers/platform/x86/thinkpad_acpi.c
patching file drivers/video/backlight/backlight.c
patching file include/linux/backlight.h
patching file include/linux/rfkill.h
patching file net/rfkill/rfkill-input.c
patching file net/rfkill/rfkill-input.h
patching file net/rfkill/rfkill.c
patching file sound/core/sound.c
patching file sound/sound_core.c

Kernel .config生成

If you are compiling this driver as included in the Linux kernel
sources, look for the CONFIG_THINKPAD_ACPI Kconfig option.
It is located on the menu path: "Device Drivers" -> "X86 Platform
Specific Device Drivers" -> "ThinkPad ACPI Laptop Extras".


Counter: 2362, today: 3, yesterday: 0