Find the answer to your Linux question:
Results 1 to 3 of 3
hi , After modifying the kernel source code how i compile it and run it?? is compilation and execution is same for all distro? Thanks. Nazib...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2005
    Posts
    17

    how i compile a kernel source code?


    hi ,

    After modifying the kernel source code how i compile it and run it??
    is compilation and execution is same for all distro?

    Thanks.
    Nazib

  2. #2
    Linux Engineer Nerderello's Avatar
    Join Date
    Apr 2003
    Location
    North East England
    Posts
    1,190
    Nazib,
    try having a look at :- http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO.html#toc4

    the basic method is
    1. make menuconfig
    or make xconfig
    2. make clean
    3. make dep
    4. make bzImage
    5. amend your bootloader config file to pick up the new kernel.

    have fun
    Nerderello

    ps. don't be surprised if your first few attempts fail to compile, and that it takes a long time to compile when you do get it working.

    Use Suse 10.1 and occasionally play with Kubuntu
    Also have Windows 98SE and BeOS

  3. #3
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    With 2.6 and later we simply type:
    make xconfig (or make menuconfig)
    make -j2 && make -j2 modules_install && make -j2 install
    to compile it (and setting up the bootloader, might not work on all systems though)

    (-j2 makes make compile 2 files simultaniously, gives faster compiles on some systems, if you din't know what it is -j2 is good for most (the dafault is -j1 afaik))
    Regards Scienitca (registered user #335819 - http://counter.li.org )
    --
    A master is nothing more than a student who knows something of which he can teach to other students.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •