All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay Garg <ajaygargnsit@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: Recommended way to do kernel-development for static modules
Date: Sat, 2 Oct 2021 10:07:26 +0530	[thread overview]
Message-ID: <CAHP4M8XS423Rdv2mX9VadnJn3_0RRxPvpdJjQ=JkMJkpyC6HHA@mail.gmail.com> (raw)
In-Reply-To: <a4471053-a4e3-42ac-6177-056bfe371c70@infradead.org>

Thanks Randy.

On Sat, Oct 2, 2021 at 10:03 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> 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:37 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
2021-10-02  4:37   ` Ajay Garg [this message]

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='CAHP4M8XS423Rdv2mX9VadnJn3_0RRxPvpdJjQ=JkMJkpyC6HHA@mail.gmail.com' \
    --to=ajaygargnsit@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rdunlap@infradead.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.