Feed on Posts or Comments

Debian Daantje on 21 Feb 2005 08:43 pm

How to build a debian kernel package

Here are the 10 steps to get drunk:

  1. Open a console and become root with the su command.
    su
  2. Than download the source in /usr/src:
    cd /usr/src/
    wget ftp://dl.xs4all.nl/pub/mirror/linux-kernel/v2.4/linux-2.4.29.tar.bz2
    
  3. Unpack the bziped file:
    tar -jxvf linux-2.4.29.tar.bz2
  4. Don’t forget to symlink /usr/src/linux to the linux-2.4.29 dir, or else the compiler will fale!!
    ln -s linux-2.4.29 linux
  5. Now you’ll need some packages so you’ll be able to configure the kerel with a GUI and beable to make the .deb packages.
    apt-get install libncurses5-dev kernel-package
  6. Now configure the kernel for your machine…
    cd /usr/src/linux
    make menuconfig
      
  7. Now comes the compiling of the packages.
    make-kpkg clean
    make-kpkg --revision=custom.myfisrttry.1.0 kernel_image
       
  8. This can take a while, make some coffee…

  9. When you have modules enabled and downloaded to /usr/src/modules you also should compile the modules.
    make-kpkg --revision=custom.myfisrttry.1.0 modules_image
  10. Now you should have your .deb kernel packages in /usr/src. If
    there was an error, you should do the last step again! We have them?
    Let’s install them…

    dpkg -i kernel-image-2.4.29_custom.myfirsttry.1.0_i386.deb

    And if you have some module deps you should install them too!

  11. Reboot the machine and pray…
    reboot
  12. Drink beer!

Trackback | Comments RSS Feed

Leave a Reply

You must be logged in to post a comment.