* Recommended way to do kernel-development for static modules
@ 2021-10-02 3:31 Ajay Garg
2021-10-02 4:33 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Ajay Garg @ 2021-10-02 3:31 UTC (permalink / raw)
To: linux-kernel, linux-pci
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.
Thanks and Regards,
Ajay
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Recommended way to do kernel-development for static modules
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
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2021-10-02 4:33 UTC (permalink / raw)
To: Ajay Garg, linux-kernel, linux-pci
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Recommended way to do kernel-development for static modules
2021-10-02 4:33 ` Randy Dunlap
@ 2021-10-02 4:37 ` Ajay Garg
0 siblings, 0 replies; 3+ messages in thread
From: Ajay Garg @ 2021-10-02 4:37 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kernel, linux-pci
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-02 4:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.