- Download and install the
following required packages: fakeroot, kernel-wedge, build-essential,
makedumpfile, kernel-package, libncurses5-dev.
- Download the kernel source:
apt-get build-dep –no-install-recommends linux-image-$(uname
-r)
apt-get source linux-image-$(uname -r)
This will install the kernel source in
the current working directory.
- Enter into the kernel source
directory:
cd linux-source-2.6.xx
- copy config file from current
installation
cp /boot/config-x .config
- make oldconfig
- make menuconfig, and modify
kernel config options according to need.
- Also make sure to disable
CONFIG_DEBUG_INFO under “Kernel Hacking” in step 6 above. This ensures
smaller size of resulting kernel package.
- Make necessary changes to the
source code.
- export
CONCURRENCY_LEVEL=, where X is the number of CPU cores in the
system. This will ensure faster compilation.
- make-kpkg clean
- make-kpkg -initrd -append-to-version= kernel-image
kernel-headers
- This will create kernel-image-*.deb
and kernel-headers-*.deb in the .. directory.
- Install the
kernel-image-*.deb and kernel-headers-*.deb using dpkg command:
dpkg –i kernel-image-*.deb
dpkg –I kernel-headers-*.deb
- Boot into the newly installed
kernel
阅读(627) | 评论(0) | 转发(0) |