What are the source code files associated to Kconfig symbol?

I needed a way to discover which Linux source code files are related to a Kconfig symbol. As there is at least one Kconfig symbol for each Linux device driver, how could I find out what files are part of a device driver based on a single, or a set, of Kconfig symbols? I made a Perl script for that. For example:

$ cd /src/linux/drivers/net/ethernet
$ Kconfig-files.pl ALX
atheros/alx/hw.h
atheros/alx/hw.c
atheros/alx/ethtool.c
atheros/alx/main.c
atheros/alx/alx.h
atheros/alx/reg.h

All source files associated to the ALX Kconfig symbol are listed. The script is at Github.

Popular posts from this blog

Adding a serial console to the Buffalo Air Station WZR-1750DHP

How to tell rpmbuild the number of simultaneous jobs? (make -j)

Buffalo WZR-1750DHP + OpenWRT