kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* question about building a module
@ 2012-12-07 18:44 Kevin Wilson
  2012-12-08  8:03 ` Yann Droneaud
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Wilson @ 2012-12-07 18:44 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I am adding some code of my own **only** under
net/bluetooth in some file there.

There is only exactly one module which is changed by my addition,
This is net/bluetooth/bluetooth.ko

Now, when I run 'make -j2 modules' it takes quite a time, even If I
did one change in one line in a file under net/bluetooth.

I assume that it has to do with stage 2 of the build, which says something
about
...
  Building modules, stage 2.
  MODPOST 855 modules
...
see below full log.

Now my question is this:
Is there a way to make things more efficent when building a module, on the
assumption that I do not change anything anywhere except /net/bluetooth (in
this case)?

somehow telling the MODPOST  that only one module is changes ?

I remember I once saw (not sure) a suggestion to build only a specified
moule like:
make net/bluetooth
But in this case the result is the same.

any ideas?
rgs
Kevin


myhost> make modules
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CC [M]  net/bluetooth/hci_sock.o
  LD [M]  net/bluetooth/bluetooth.o
  Building modules, stage 2.
  MODPOST 855 modules
  CC      net/bluetooth/bluetooth.mod.o
  LD [M]  net/bluetooth/bluetooth.ko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121207/f5912f8e/attachment.html 

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

* question about building a module
  2012-12-07 18:44 question about building a module Kevin Wilson
@ 2012-12-08  8:03 ` Yann Droneaud
  2012-12-08  9:02   ` devendra.aaru
  0 siblings, 1 reply; 4+ messages in thread
From: Yann Droneaud @ 2012-12-08  8:03 UTC (permalink / raw)
  To: kernelnewbies

Le vendredi 07 d?cembre 2012 ? 20:44 +0200, Kevin Wilson a ?crit :
> Hi,
> 
> 
> I am adding some code of my own **only** under 
> net/bluetooth in some file there.
> 
> 
> There is only exactly one module which is changed by my addition,
> This is net/bluetooth/bluetooth.ko
> 
> 
> Now, when I run 'make -j2 modules' it takes quite a time, even If I 
> did one change in one line in a file under net/bluetooth.
> 
> 
> I assume that it has to do with stage 2 of the build, which says
> something about 
> ...
>   Building modules, stage 2.
>   MODPOST 855 modules
> ...
> see below full log.
> 
> 
> Now my question is this:
> Is there a way to make things more efficent when building a module, on
> the 
> assumption that I do not change anything anywhere
> except /net/bluetooth (in this case)?
> 
> 
> somehow telling the MODPOST  that only one module is changes ? 
> 
> 
> I remember I once saw (not sure) a suggestion to build only a
> specified moule like: 
> make net/bluetooth
> But in this case the result is the same.
> 

cd net/bluetooth
make -C $PWD/../../ M=$PWD modules

(But if you change a configuration parameter in .config,
you will need to do a full build)

Regards.

-- 
Yann Droneaud
OPTEYA

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

* question about building a module
  2012-12-08  8:03 ` Yann Droneaud
@ 2012-12-08  9:02   ` devendra.aaru
  2012-12-08 18:16     ` Yann Droneaud
  0 siblings, 1 reply; 4+ messages in thread
From: devendra.aaru @ 2012-12-08  9:02 UTC (permalink / raw)
  To: kernelnewbies

On Sat, Dec 8, 2012 at 3:03 AM, Yann Droneaud <ydroneaud@opteya.com> wrote:
> Le vendredi 07 d?cembre 2012 ? 20:44 +0200, Kevin Wilson a ?crit :
>> Hi,
>>
>>
>> I am adding some code of my own **only** under
>> net/bluetooth in some file there.
>>
>>
>> There is only exactly one module which is changed by my addition,
>> This is net/bluetooth/bluetooth.ko
>>
>>
>> Now, when I run 'make -j2 modules' it takes quite a time, even If I
>> did one change in one line in a file under net/bluetooth.
>>
>>
>> I assume that it has to do with stage 2 of the build, which says
>> something about
>> ...
>>   Building modules, stage 2.
>>   MODPOST 855 modules
>> ...
>> see below full log.
>>
>>
>> Now my question is this:
>> Is there a way to make things more efficent when building a module, on
>> the
>> assumption that I do not change anything anywhere
>> except /net/bluetooth (in this case)?
>>
>>
>> somehow telling the MODPOST  that only one module is changes ?
>>
>>
>> I remember I once saw (not sure) a suggestion to build only a
>> specified moule like:
>> make net/bluetooth
>> But in this case the result is the same.
>>
>
> cd net/bluetooth
> make -C $PWD/../../ M=$PWD modules
>
> (But if you change a configuration parameter in .config,
> you will need to do a full build)

why? is that creates a linker errs while your module uses some symbols
that are not exported?

>
> Regards.
>
> --
> Yann Droneaud
> OPTEYA
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* question about building a module
  2012-12-08  9:02   ` devendra.aaru
@ 2012-12-08 18:16     ` Yann Droneaud
  0 siblings, 0 replies; 4+ messages in thread
From: Yann Droneaud @ 2012-12-08 18:16 UTC (permalink / raw)
  To: kernelnewbies

Le samedi 08 d?cembre 2012 ? 04:02 -0500, devendra.aaru a ?crit :
> On Sat, Dec 8, 2012 at 3:03 AM, Yann Droneaud <ydroneaud@opteya.com> wrote:

> > cd net/bluetooth
> > make -C $PWD/../../ M=$PWD modules
> >
> > (But if you change a configuration parameter in .config,
> > you will need to do a full build)
> 
> why? is that creates a linker errs while your module uses some symbols
> that are not exported?
> 

It's to create the autogenerated files built from .config.
Especially include/generated/autoconf.h header.

It's probably doable using only "make prepare" or "make
modules_prepare".

Regards.

-- 
Yann Droneaud
OPTEYA

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

end of thread, other threads:[~2012-12-08 18:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-07 18:44 question about building a module Kevin Wilson
2012-12-08  8:03 ` Yann Droneaud
2012-12-08  9:02   ` devendra.aaru
2012-12-08 18:16     ` Yann Droneaud

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).