Find the answer to your Linux question:
Results 1 to 3 of 3
I am compiling and installing the custom kernel based on the instructions provided in Building_a_custom_kernel on fedoraproject.org/wiki site. However, according to the instructions, anytime I change anything in the kernel ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    anp
    anp is offline
    Just Joined!
    Join Date
    Jun 2011
    Posts
    1

    Compiling and installing the custom kernel under Fedora


    I am compiling and installing the custom kernel based on the instructions provided in Building_a_custom_kernel on fedoraproject.org/wiki site.

    However, according to the instructions, anytime I change anything in the kernel source files(e.g /driver/ata/libata-core.c), I have to create a patch a rebuild the whole kernel and install this new kernel which takes 2 hours. Is there a simpler way of recompiling what has changed(without creating patch) and try that changed kernel?
    Since my changes are not in the drivers which can be dynamically loaded but is in the static code of the kernel, it is making life cumbersome.
    Are there any instructions for this? How does other kernel developers manage this?
    Thanks.
    ANP

  2. #2
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Hello and Welcome!

    I may be wrong, but to the best of my knowledge, when you make changes to the kernel source you have to re-compile.
    It's the only way to properly implement your changes.

    How does other kernel developers manage this?
    Time consuming, isn't it? You just have to take your time, compile... and compile... and compile again.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,639
    When you make a change to kernel code, you should not need to recompile the entire kernel. The normal Makefiles in the kernel should only incrementally build what is needed unless you cleaned the build directory after your last build/install cycle. As for creating a patch file, that is only necessary if you are going to push the code change back to the kernel maintainers, as far as I understand it. Anyway, the process to build/install a kernel in Fedora or Red Hat is:

    1. Configure kernel w/ make menuconfig or make xconfig.
    2. Build kernel - if you have a multi-core or multi-processor system, you can specify the number of jobs to speed up the build. My system has 8 cores, so I use the "-j8" option with make to run 8 simultaneous compilations at a time - it reduces a 2 hour kernel build down to 15-20 minutes. Do this as a regular user.
    3. Install the headers w/ make headers_install - do this as root
    4. Install the modules w/ make modules_install - do this as root
    5. Install the operating system w/ make install - do this as root
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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