Am Thu, 28 Dec 2017 15:05:04 -0500 schrieb Jack:

> On 2017.12.28 14:52, Alan Mackenzie wrote:
>> Hello, Gentoo.
>> 
>> Having just built linux-4.14.7-gentoo, suddenly a new version of the
>> kernel, linux-4.14.8-gentoo-r1 has become stable.  Configuring a kernel
>> from scratch is a repetitive drudge.
>> 
>> There is some way of initialising a new kernel .config from an existing
>> one, I am sure, but I can't find it.  I've looked at the Gentoo wiki,
>> I've looked at (some of) the kernel's own documentation.  The nearest I
>> can find is make oldconfig, which supposedly does what I want, but it
>> just seems to start off with a default .config and go through the
>> hundreds of questions one at a time.
>> 
>> So, would some kind soul please tell me how to get my old .config into
>> a new one properly.  Thanks!
> 
> You need to copy your old .config into the new kernel source directory. 
> "make oldconfig" then uses those values, and only asks you about new
> items.  It sounds like it was asking about everything because it didn't
> have the old file as a starting point - so was starting from scratch.

You actually even don't have to copy the old config file as long as the 
currently running system provides the config you want to migrate.

You can just run

# make oldconfig

and it will figure out the config, looking at the current directory 
first. It will then interactively ask for each new config option. You can 
type "?" at each step to get a description. This is the way I do it.

I only copy a .config file if I want a specific known base configuration.

You can then run

# make menuconfig

to further fine-tune your decisions, or

# make localmodconfig

to disable modules not currently loaded. You should double-check it 
didn't disable important stuff. Take a backup of .config first, then run 
a diff. If in doubt, leave an option enabled as module.


# make olddefconfig

Doesn't ask questions but instead uses defaults. I wouldn't recommend 
this if you are already running optimized manual configs.


There are many more (and interesting ones), have a look at

# make help


You can also "emerge -a kergen" and let it build a .config based on and 
optimized for your hardware, tho it didn't work too well for me. You may 
want to double check what it does, and then manually change the config. 
You can also use it to migrate configs between kernel upgrades.


-- 
Regards,
Kai

Replies to list-only preferred.


Reply via email to