19

I currently run Angstrom Linux 2.6.32. I intend to upgrade the Linux kernel from 2.6.32 to 3.0.7. For this reason, I had to configure kernel 3.0.7 by running make menuconfig.

Now, I want to compare the new kernel configuration with the previous, but I can't find the kernel 3.0.7 configuration file. Any ideas?

2 Answers 2

20

Whenever you run make menuconfig, make xconfig, make XXX_defconfig, make oldconfig, make localmodconfig or any of the other make XXXconfig targets in the Linux kernel source tree, this creates (if successful) a file called .config. This file is used during the compilation of the kernel and is not erased unless you erase it manually or run make mrproper.

It's common to keep kernel source trees in /usr/src; if you did the compilation in /usr/src/linux-3.0.7 then your .config file is in /usr/src/linux-3.0.7/.config. (Since this is a dot file, the ls command doesn't show it unless run with the -a flag.)

Many distributions arrange to copy the .config file into the package containing the kernel, and install it next to the kernel, e.g. /boot/config-3.0.7 to match /boot/vmlinuz-3.0.7. Embedded distributions often don't do that; I don't know if Angstrom does, and anyway this doesn't apply if you compiled the kernel manually.

The kernel configuration can sometimes be available from the running kernel in /proc/config.gz. This requires the IKCONFIG compile-time option.

13

Your new one is .config at the top level of your kernel source tree. It may also get installed to /boot/config-3.0.7 or similar, depending.

7
  • Unfortunately, there is no .config file on /usr/src/linux-3.0.7 directory. On /boot there is only config-2.6.32 file.
    – dempap
    Commented Apr 3, 2014 at 22:10
  • @dempap /usr/src/linux-3.0.7 is where you ran make menuconfig? That should have generated a .config.
    – derobert
    Commented Apr 3, 2014 at 22:13
  • 1
    I suggest find -type f -name '.config' to find it, then. I definitely have one in my kernel source trees, through at least 3.13.
    – derobert
    Commented Apr 3, 2014 at 22:19
  • @dempap A .config is always generated in the directory where you ran make menuconfig (or any of the other make xxxconfig). If it isn't there, either you're looking in the wrong directory or you've deleted it. Commented Apr 3, 2014 at 22:23
  • 1
    @dempap try ls -A to see it. Files starting with . are treated as hidden (by convention).
    – derobert
    Commented Apr 3, 2014 at 22:31

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.