2

How can I find out with which settings my kernel was compiled?

I would like to understand the concept behind this. I wonder how I can find out which device uses which module.

For example: right now, I want to find out which which wifi module my kernel is running because it is my Intel Corporation Wireless-N 7260 card dies randomly

I tried: make menuconfig but this just shows:

make: *** No rule to make target `menuconfig'.  Stop.

Or can I find out the module with sysctl? This is the output of sysctl -a

rubo77
  • 31,573
  • 49
  • 159
  • 281
  • Notice that the kernel was probably compiled with *gazillion* wifi modules. You should check which wifi module is loaded, with `lsmod`. – Rmano Sep 08 '14 at 09:45

2 Answers2

1

You can quickly list all flags that were used during kernel compilation using:

cat /boot/config-`uname -r`

On a 14.04 system, the Intel 7260 firmware is provided by the linux-firmware package, you can check its filelist.

Sylvain Pineau
  • 61,564
  • 18
  • 149
  • 183
  • And how do I find out, which [wireless firmware](http://wireless.kernel.org/en/users/Drivers/iwlwifi#Firmware) is installed? I have an Intel 7260 – rubo77 Sep 08 '14 at 08:26
  • @rubo77: I've updated my answer. You should have the firmware installed in `/lib/firmware/iwlwifi-7260*` – Sylvain Pineau Sep 08 '14 at 09:11
  • If you didn't have the firmware installed, your 7260 wouldn't work _at all_. – chili555 Sep 08 '14 at 11:38
  • @rubo77: Could you please consider accepting this answer? I think it covers your question. Thanks. – Sylvain Pineau Sep 10 '14 at 10:11
  • It is correct that my kernel uses linux-firmware, But can you please explain, How you come to the conclusion? I would like to understand the concept behind this, so next time I wonder which device uses which module – rubo77 Sep 14 '14 at 08:41
  • @rubo77 Many firmware images are provided by the `linux-firmware` package which is installed by default (See the 14.04 [Manifest](http://releases.ubuntu.com/14.04/ubuntu-14.04-desktop-amd64.manifest)) – Sylvain Pineau Sep 14 '14 at 15:37
  • I checked... Now i wonder why my card uses the -8 version although there is provided a -9 version already for my wireless card – rubo77 Sep 15 '14 at 13:02
0

It doesn't really help to understand the concept to look at the kernel settings:

cat /boot/config-`uname -r`

This only shows which settings were used, while the kernel was compiled and unless you want to compile your own kernel, there is now use to change this.

You want to look at the output of lsmod, which shows all loaded modules. There you can guess, which module could be used for which device, In this example it is something with "iw:

$ lsmod|grep iw
iwlmvm                184162  0 
mac80211              582807  1 iwlmvm
iwlwifi               161370  1 iwlmvm
cfg80211              447796  3 iwlwifi,mac80211,iwlmvm

for each module you can see details with modinfo <modulename>

You find your device name and ID with lspci (or lsusb) for example:

$ lspci|grep -i wireless
01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)

then search for the device-id string 7260 in the details of the loaded modules, in this case you succeed with:

$ modinfo iwlwifi|grep 7260
firmware:       iwlwifi-7260-7.ucode

then locate the firmware-file with

$ locate  iwlwifi-7260-7.ucode
/lib/firmware/iwlwifi-7260-7.ucode
rubo77
  • 31,573
  • 49
  • 159
  • 281
  • If you only look for the driver of your wireless-card, you can also use `nm-tool |grep Driver` to get the module – rubo77 Sep 17 '14 at 06:20