Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2010
    pune ,india

    Question edit kernel source file

    is it nesscary to recompile the complete kernel if i simply want to add one printk statement in some C file in the kernel source code ?

    example in noop scheduler C file if i add one printk statement ?

    and also i am not allowed to edit the file why is it read only ??

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Harrow, UK
    Well, if you have your kernel code in the usual place (/usr/src/), you can't edit it because everything in that directory belongs to root and not to you. Copy the kernel tree into your home directory and then you can edit the copy.

    If your modification is in the main kernel, not in a module, then you can save time by recompiling it with make bzImage. It's the compiling of all the modules that takes up so much time.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    To add to Hazel's answer, yes you will have to at least recompile the changed component. If your kernel source has been recently rebuilt, then it will go very fast. Otherwise, it will take a bit of time (about 5 minutes on my dual-core 2.5GHz laptop running Ubuntu 9.04).
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open

Posting Permissions

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