1 |
Am Thu, 28 Dec 2017 15:05:04 -0500 schrieb Jack: |
2 |
|
3 |
> On 2017.12.28 14:52, Alan Mackenzie wrote: |
4 |
>> Hello, Gentoo. |
5 |
>> |
6 |
>> Having just built linux-4.14.7-gentoo, suddenly a new version of the |
7 |
>> kernel, linux-4.14.8-gentoo-r1 has become stable. Configuring a kernel |
8 |
>> from scratch is a repetitive drudge. |
9 |
>> |
10 |
>> There is some way of initialising a new kernel .config from an existing |
11 |
>> one, I am sure, but I can't find it. I've looked at the Gentoo wiki, |
12 |
>> I've looked at (some of) the kernel's own documentation. The nearest I |
13 |
>> can find is make oldconfig, which supposedly does what I want, but it |
14 |
>> just seems to start off with a default .config and go through the |
15 |
>> hundreds of questions one at a time. |
16 |
>> |
17 |
>> So, would some kind soul please tell me how to get my old .config into |
18 |
>> a new one properly. Thanks! |
19 |
> |
20 |
> You need to copy your old .config into the new kernel source directory. |
21 |
> "make oldconfig" then uses those values, and only asks you about new |
22 |
> items. It sounds like it was asking about everything because it didn't |
23 |
> have the old file as a starting point - so was starting from scratch. |
24 |
|
25 |
You actually even don't have to copy the old config file as long as the |
26 |
currently running system provides the config you want to migrate. |
27 |
|
28 |
You can just run |
29 |
|
30 |
# make oldconfig |
31 |
|
32 |
and it will figure out the config, looking at the current directory |
33 |
first. It will then interactively ask for each new config option. You can |
34 |
type "?" at each step to get a description. This is the way I do it. |
35 |
|
36 |
I only copy a .config file if I want a specific known base configuration. |
37 |
|
38 |
You can then run |
39 |
|
40 |
# make menuconfig |
41 |
|
42 |
to further fine-tune your decisions, or |
43 |
|
44 |
# make localmodconfig |
45 |
|
46 |
to disable modules not currently loaded. You should double-check it |
47 |
didn't disable important stuff. Take a backup of .config first, then run |
48 |
a diff. If in doubt, leave an option enabled as module. |
49 |
|
50 |
|
51 |
# make olddefconfig |
52 |
|
53 |
Doesn't ask questions but instead uses defaults. I wouldn't recommend |
54 |
this if you are already running optimized manual configs. |
55 |
|
56 |
|
57 |
There are many more (and interesting ones), have a look at |
58 |
|
59 |
# make help |
60 |
|
61 |
|
62 |
You can also "emerge -a kergen" and let it build a .config based on and |
63 |
optimized for your hardware, tho it didn't work too well for me. You may |
64 |
want to double check what it does, and then manually change the config. |
65 |
You can also use it to migrate configs between kernel upgrades. |
66 |
|
67 |
|
68 |
-- |
69 |
Regards, |
70 |
Kai |
71 |
|
72 |
Replies to list-only preferred. |