kernel packageを作る

よくわからん。oprofile用とかconfigかえた勝手パッケージを作る方法。

前にもやったけどやり方忘れたのでめも。

sudo apt-get install linux-patch-debian-2.6.32 linux-source-2.6 binutils-dev
cd /usr/src
tar jxvf linux-source-*

# パッチ適用? 効いてるのかわからん
/usr/src/kernel-patches/all/2.6.32/apply/debian

make clean
make mrproper

cp /boot/config-2.6.32-5-amd64 .config
make menuconfig

# oprofile用にvmlinux(非圧縮kernel img)を残す
echo "install_vmlinux=YES" >> /etc/kernel-pkg.conf
make-kpkg clean

CONCURRENCY_LEVEL=8 make-kpkg --append-to-version "-nyaxt" --initrd kernel_image modules_image kernel_headers

dpkg -i *.deb

# 再起動してgrubでvmlinuzの方を選択。vmlinuxは起動に失敗する???