4

I'm compiling a flavor of the Linux kernel based on the default configuration (for an ODROID system), with some additional features enabled.

I want to automate this process so that I don't have to reselect the features again if I want to build a newer version of the kernel.

I could have saved the whole .config file, but if the default configuration changes in the future release, then my .config file will get outdated.

Is there some alternative to make menuconfig that will just take a set of features and enable them in an unattended fashion?

1 Answers1

2

You can apply your current .config to a newer version of the kernel; they're tagged, and the make system will update it appropriately without changing what you have -- that's not a guarantee, of course; there may be some kind of incompatibility that requires a change. I can't recall noticing anything like this, however, but I usually go in short steps. You will probably be fine going from 2.6.x to 3.0 and any version of 3.x to any higher version.

However, you do have to run make menuconfig to perform this update -- if you keep a copy of the original, run make menuconfig, don't change anything and just save and exit, you will notice .config has changed.

You can also run make oldconfig, which will step you through a (possibly long) list of new choices. I'm not sure what the policy is with respect to make menuconfig's automation of this process, but what it seems to be is that at least some new choices which are possible with your existing config are ticked, as modules where possible (the new .config is often substantially bigger).

In any case, I recommend just running make menuconfig, again, you don't have to change anything. I've never had a problem this way, or at least not one serious enough for me to remember.

You may be interested in "Where to start with configuring, compiling and installing a custom Linux kernel?".

goldilocks
  • 87,661
  • 30
  • 204
  • 262
  • 4
    You can also use make olddefconfig which does what oldconfig does but automatically accepts the default for new options. – casey Mar 29 '14 at 19:36