LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Faster way to run through building single modules
@ 2008-02-10 18:51 Jan Engelhardt
  2008-02-10 19:28 ` Sam Ravnborg
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2008-02-10 18:51 UTC (permalink / raw)
  To: sam; +Cc: Linux Kernel Mailing List

Hi,


I was wondering whether there is a shortcut in kbuild I can take if I 
just want to rebuild one module. Currently, I have:

make net/bridge/netfilter/ebtables.ko

the modpost stage ("MODPOST 2018 modules") does quite a lot of disk I/O, 
most of which I probably do not need anyway. Can this task be sped up?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Faster way to run through building single modules
  2008-02-10 18:51 Faster way to run through building single modules Jan Engelhardt
@ 2008-02-10 19:28 ` Sam Ravnborg
  2008-02-10 19:38   ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2008-02-10 19:28 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Linux Kernel Mailing List

On Sun, Feb 10, 2008 at 07:51:29PM +0100, Jan Engelhardt wrote:
> Hi,
> 
> 
> I was wondering whether there is a shortcut in kbuild I can take if I 
> just want to rebuild one module. Currently, I have:
> 
> make net/bridge/netfilter/ebtables.ko

Fool kbuild to think this is an external module using:
make M=`pwd` net/bridge/netfilter/ebtables.ko

That should do the trick.

	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Faster way to run through building single modules
  2008-02-10 19:28 ` Sam Ravnborg
@ 2008-02-10 19:38   ` Jan Engelhardt
  2008-02-10 19:55     ` Sam Ravnborg
  2008-03-11 19:39     ` Jan Engelhardt
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Engelhardt @ 2008-02-10 19:38 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux Kernel Mailing List


On Feb 10 2008 20:28, Sam Ravnborg wrote:
>On Sun, Feb 10, 2008 at 07:51:29PM +0100, Jan Engelhardt wrote:
>> 
>> I was wondering whether there is a shortcut in kbuild I can take if I 
>> just want to rebuild one module. Currently, I have:
>> 
>> make net/bridge/netfilter/ebtables.ko
>
>Fool kbuild to think this is an external module using:
>make M=`pwd` net/bridge/netfilter/ebtables.ko
>
>That should do the trick.

How would I combine that with O=? Not quite doing the right thing yet.

linux$ touch net/bridge/netfilter/ebtables.c 
linux$ make O=/home/jengelh/Coding/linux-obj M=$PWD
       net/bridge/netfilter/ebtables.ko

make[2]: Nothing to be done for `net/bridge/netfilter/ebtables.o'.
  MODPOST 0 modules
  CC      arch/x86/kernel/asm-offsets.s
  GEN     /home/jengelh/Coding/linux_nosov/include/asm-x86/asm-offsets.h
  Building modules, stage 2.
  MODPOST 0 modules


And:

$ touch net/bridge/netfilter/ebtables.c 
$ make O=... M=$PWD net/bridge/netfilter/ebtables.o
  CC [M]  /home/jengelh/Coding/linux_nosov/net/bridge/netfilter/ebtables.o
$ make O=... M=$PWD net/bridge/netfilter/ebtables.ko
make[2]: Nothing to be done for `net/bridge/netfilter/ebtables.o'.
  MODPOST 0 modules

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Faster way to run through building single modules
  2008-02-10 19:38   ` Jan Engelhardt
@ 2008-02-10 19:55     ` Sam Ravnborg
  2008-03-11 19:39     ` Jan Engelhardt
  1 sibling, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2008-02-10 19:55 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Linux Kernel Mailing List

On Sun, Feb 10, 2008 at 08:38:19PM +0100, Jan Engelhardt wrote:
> 
> On Feb 10 2008 20:28, Sam Ravnborg wrote:
> >On Sun, Feb 10, 2008 at 07:51:29PM +0100, Jan Engelhardt wrote:
> >> 
> >> I was wondering whether there is a shortcut in kbuild I can take if I 
> >> just want to rebuild one module. Currently, I have:
> >> 
> >> make net/bridge/netfilter/ebtables.ko
> >
> >Fool kbuild to think this is an external module using:
> >make M=`pwd` net/bridge/netfilter/ebtables.ko
> >
> >That should do the trick.
> 
> How would I combine that with O=? Not quite doing the right thing yet.

O=tells where to find the kernel output files.
We do not have a possibility to do so for external
modules - so they will alwys build in same dir as the source.

Bad luck :-(

	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Faster way to run through building single modules
  2008-02-10 19:38   ` Jan Engelhardt
  2008-02-10 19:55     ` Sam Ravnborg
@ 2008-03-11 19:39     ` Jan Engelhardt
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2008-03-11 19:39 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux Kernel Mailing List


On Feb 10 2008, Sam Ravnborg and Jan Engelhardt wrote:

>>>> I was wondering whether there is a shortcut in kbuild I can take if I 
>>>> just want to rebuild one module. Currently, I have:
>>>> 
>>>> make net/bridge/netfilter/ebtables.ko
>>>
>>>Fool kbuild to think this is an external module using:
>>>make M=`pwd` net/bridge/netfilter/ebtables.ko
>>>
>>>That should do the trick.
>>
>>How would I combine that with O=? Not quite doing the right thing yet.
>>
>>linux$ touch net/bridge/netfilter/ebtables.c 
>>linux$ make O=/home/jengelh/Coding/linux-obj M=$PWD
>>       net/bridge/netfilter/ebtables.ko
>
>O=tells where to find the kernel output files.
>We do not have a possibility to do so for external
>modules - so they will alwys build in same dir as the source.
>
>Bad luck :-(

I just noticed that with v2.6.25-rc3-302-g03923eb, running
make builds the final .ko really quick. Maybe there has been
some magic added that skips a lot of directories, but the
process certainly takes less than 120 seconds, so I am happy.

Previously, it seemed to have visited lots of directories
(even though we know make is not called recursively in 2.6)
before it printed "Building modules stage 2" for the first time.

Nice :)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-11 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-10 18:51 Faster way to run through building single modules Jan Engelhardt
2008-02-10 19:28 ` Sam Ravnborg
2008-02-10 19:38   ` Jan Engelhardt
2008-02-10 19:55     ` Sam Ravnborg
2008-03-11 19:39     ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).