kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Finding all modules which consume kernel lib?
@ 2019-03-09  8:07 Andy Nicholas
  2019-03-09  8:29 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Nicholas @ 2019-03-09  8:07 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 970 bytes --]

Hello,

Is there a website or service or tool or package or script or something
which allows me to determine which pieces of the compiled kernel
(especially modules) contained the source-code changes I might make to any
given directory? Like a kernel-code dependency graph website?

For instance, assume I made a change to code in net/wireless/. How do I
figure out which pieces of the kernel or modules get linked against the
library built from this directory?

I could attempt to trace the kernel's build output line-by-line and then
grep through the output looking for which other code is linking against
cfg80211. That is way too tedious. In this case I would like to know which
kernel modules I would need to, potentially, re-test because I apply a
patch to this directory.... without examining the build logs.

In my case I'm applying some patches and I'd like to make sure I am
installing and testing the correct set of related atheros modules.

Thank you,

andy

[-- Attachment #1.2: Type: text/html, Size: 1132 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* Re: Finding all modules which consume kernel lib?
  2019-03-09  8:07 Finding all modules which consume kernel lib? Andy Nicholas
@ 2019-03-09  8:29 ` Greg KH
  2019-03-09 10:04   ` Lev Olshvang
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2019-03-09  8:29 UTC (permalink / raw)
  To: Andy Nicholas; +Cc: kernelnewbies

On Sat, Mar 09, 2019 at 12:07:00AM -0800, Andy Nicholas wrote:
> Hello,
> 
> Is there a website or service or tool or package or script or something
> which allows me to determine which pieces of the compiled kernel
> (especially modules) contained the source-code changes I might make to any
> given directory? Like a kernel-code dependency graph website?
> 
> For instance, assume I made a change to code in net/wireless/. How do I
> figure out which pieces of the kernel or modules get linked against the
> library built from this directory?
> 
> I could attempt to trace the kernel's build output line-by-line and then
> grep through the output looking for which other code is linking against
> cfg80211. That is way too tedious. In this case I would like to know which
> kernel modules I would need to, potentially, re-test because I apply a
> patch to this directory.... without examining the build logs.

Just look at the build logs, it will show you exactly what gets rebuilt
when you touch a single file (or multiple files.)  That's the simplest
way to do what you want here.

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* Re: Finding all modules which consume kernel lib?
  2019-03-09  8:29 ` Greg KH
@ 2019-03-09 10:04   ` Lev Olshvang
  2019-03-09 17:00     ` valdis.kletnieks
  0 siblings, 1 reply; 4+ messages in thread
From: Lev Olshvang @ 2019-03-09 10:04 UTC (permalink / raw)
  To: Andy Nicholas, Greg KH; +Cc: kernelnewbies

[-- Attachment #1: Type: text/html, Size: 1843 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* Re: Finding all modules which consume kernel lib?
  2019-03-09 10:04   ` Lev Olshvang
@ 2019-03-09 17:00     ` valdis.kletnieks
  0 siblings, 0 replies; 4+ messages in thread
From: valdis.kletnieks @ 2019-03-09 17:00 UTC (permalink / raw)
  To: Lev Olshvang; +Cc: Greg KH, Andy Nicholas, kernelnewbies

On Sat, 09 Mar 2019 13:04:44 +0300, Lev Olshvang said:

> There is also modulus.dep file which depmod builds. You can just grep to find
> which modulus depends.

Note that the modules.dep file only tells modprobe "If you're loading module A,
you need to load B first to get some symbols registered". If B is built-in to
the kernel, its EXPORT_SYMBOLS are already available, so it doesn't need to be
listed in modules.dep.

Also, it doesn't record build-time dependencies - it totally assumes that A and B
were built against the same source tree and that Kbuild took care of making sure
that any source code changes to B that affect A caused a rebuild of A to happen.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2019-03-09 17:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-09  8:07 Finding all modules which consume kernel lib? Andy Nicholas
2019-03-09  8:29 ` Greg KH
2019-03-09 10:04   ` Lev Olshvang
2019-03-09 17:00     ` valdis.kletnieks

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