kernel compile debian way

1. prepare your system

verify you have sufficient diskspace. about 1g or so.
you do not need root. normal user can compile.
you do not need to compile on your own system. another system, with faster cpu, more memory, spare demand, etc can compile your kernel.

2. install pre-requisites

# apt-get install kernel-package fakeroot libncurses5-dev

3. download source

# apt-get install linux-source

4. config

$ zless /usr/share/doc/kernel-package/README.gz
$ mkdir ~/src
$ cd ~/src
$ tar xjf /usr/src/linux-source-{nn}
$ cd linux-source-{nn}
$ cp /boot/config-{nn} .config
$ make menuconfig

5. make

$ make-kpkg clean
$ fakeroot make-kpkg -j{n} --initrd --revision={3.2.63-2+deb7u1} --append-to-version={-4-686-pae} kernel_image

-j to use more than one core, eg -j2 or -j5

i list current debian values inside the {..}s, only as an example for you. *do not* use the same ones. use different values each time you compile. if you don't understand, don't use these two options, for now.

6. install

# dpkg -i ../linux-image-3.2.{your custom text}.deb

7. reboot

No comments:

Post a Comment

most popular posts