mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesper Juhl <jj@chaosbits.net>
To: Dragoslav Zaric <dragoslav.zaric.kd@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Test some kernel feature without recompile
Date: Sun, 22 Mar 2009 21:29:51 +0100 (CET)	[thread overview]
Message-ID: <alpine.LNX.2.00.0903222124580.7175@swampdragon.chaosbits.net> (raw)
In-Reply-To: <2d05c4580903220343l4b1359fx79f18b56203bd463@mail.gmail.com>

On Sun, 22 Mar 2009, Dragoslav Zaric wrote:

> Hi,
> 
> I know when you work on some kernel module, you can change code and load
> module again and test it, but what if you change some built in kernel
> .c file, why
> would I need to recompile whole kernel just to see what happens if I change one
> .c file ??
> 
Depends on the nature of the change. Some changes will ripple through the 
whole kernel.
If, for example, you made a change to kmalloc() so that it takes an extra 
argument, then obviously all call sites would need changing and since 
kmalloc is used almose everywhere, then almost all files would need to be 
recompiled.
But if your change is entirely contained to a single file, then 'make' 
will already ensure that only that file is rebuilt when you run 'make' 
(you'll still have to re-link the kernel or module though and a reboot 
will still be needed).

> Why can I just compile one changed .c file and copy it where compiled version of
> that file reside inside kernel tree? 

'make' should already handle that for you. In what way does it not?

-- 
Jesper Juhl <jj@chaosbits.net>             http://www.chaosbits.net/
Plain text mails only, please      http://www.expita.com/nomime.html
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html


  parent reply	other threads:[~2009-03-22 20:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-22 10:43 Dragoslav Zaric
2009-03-22 11:04 ` Jaswinder Singh Rajput
2009-03-22 11:42 ` Willy Tarreau
2009-03-22 20:29 ` Jesper Juhl [this message]
2009-03-23  8:51   ` Dragoslav Zaric
2009-03-23  8:52     ` Dragoslav Zaric
2009-03-23  3:21 ` Bryan Donlan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.0903222124580.7175@swampdragon.chaosbits.net \
    --to=jj@chaosbits.net \
    --cc=dragoslav.zaric.kd@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®