All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Ajay Garg <ajaygargnsit@gmail.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: Recommended way to do kernel-development for static modules
Date: Fri, 1 Oct 2021 21:33:05 -0700	[thread overview]
Message-ID: <a4471053-a4e3-42ac-6177-056bfe371c70@infradead.org> (raw)
In-Reply-To: <CAHP4M8V6b-su=bpM-qMg5pnDKfvh-Ks_3bFfeK7p4hA2RqQw+Q@mail.gmail.com>

On 10/1/21 8:31 PM, Ajay Garg wrote:
> Hello All,
> 
> Let's say, I want to make a simple printk change to drivers/pci/bus.c,
> compile it, load it, test it.
> 
> Now, since bus.o is built as a result of CONFIG_PCI=y in
> drivers/pci/Makefile, so this module is statically built, and as a
> result doing a "make M=drivers/pci" does-not-pick-up-the-change /
> have-any-effect.
> 
> Doing a simple "make" takes too long, everytime for even a trivial change.
> 
> 
> So, what is the recommended way to do kernel-development for static modules?
> 
> 
> Will be grateful for pointers.

Just to build drivers/pci/bus.o, you do
$ make drivers/pci/bus.o

That will tell you if you have any build errors/warnings.

For run-time testing, AFAIK you don't have any choice but to
build a full kernel and boot it.

-- 
~Randy

  reply	other threads:[~2021-10-02  4:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-02  3:31 Recommended way to do kernel-development for static modules Ajay Garg
2021-10-02  4:33 ` Randy Dunlap [this message]
2021-10-02  4:37   ` Ajay Garg

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=a4471053-a4e3-42ac-6177-056bfe371c70@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=ajaygargnsit@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.