From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 89187138AE9 for ; Fri, 29 Dec 2017 00:58:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 82555E0E72; Fri, 29 Dec 2017 00:58:53 +0000 (UTC) Received: from blaine.gmane.org (unknown [195.159.176.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1AE66E0E00 for ; Fri, 29 Dec 2017 00:58:52 +0000 (UTC) Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eUiya-0001uj-Hk for gentoo-user@lists.gentoo.org; Fri, 29 Dec 2017 01:56:44 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Kai Krakow Subject: [gentoo-user] Re: Using an old kernel .config as the basis for a new .config Date: Fri, 29 Dec 2017 01:58:38 +0100 Message-ID: References: <20171228195236.GA17094@ACM> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Pan/0.142 (He slipped to Sam a double gin; 01b5bf4 git.gnome.org/pan2) X-Archives-Salt: 4d47cf21-0a16-4c8b-bcd4-6c7b2939e4c0 X-Archives-Hash: 4a61d506ee5242014e3cdd2fd272a6e3 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.