From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Austin S. Hemmelgarn" Subject: Re: Selectively turn on and off kernel configuration options Date: Fri, 07 Feb 2014 19:33:48 -0500 Message-ID: <52F57B6C.2080005@gmail.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=K3Nye5DI62XJq1UhIyHz5jTq1ICLJnukNU+Ib0Bd8yI=; b=HHavJfaJlK7Kb8CcqH04MfbatcwkUocOLclblTJqWQZknSRX8Fq2wzIiqH62gZW0gw P/rl/AteIao+ncJtHKt4wqqkmetrDqfHrVxgj3MdJZ9ugAagMuASSKsQB1Qe7YfPDv4/ w4j3RJxQLC+2PaE5cq0xCKIqjHTmehUwzs3nzMmKPyPAciSTuXAccJiF7O98CDWwp60B vyjxbf72pGMmmLR2RuIeOWyT4KXnpdDSvh4l13BoBT4Cze37EWEeVhEyyzdrYYBTvvbm Tq6otEjped6tI7BZju0La/Us3GQ5n02OEYbujGGabWw/phe1IIyiaF6BU8XzzhSyiRfz QrIQ== In-Reply-To: Sender: linux-config-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Winston Smith , "linux-config@vger.kernel.org" On 02/07/2014 08:47 AM, Winston Smith wrote: > Hello, > > My apologies it this has been answered before. > > I am looking for a way to specifically turn on or off a single configuration option from the command line. There is the 'config' make target, but this will go through each and every configuration item. I am looking for something like > > make V=2 O=../linux-3.6.3-build CONFIG_OPTION=y config > > whereby make (or a config program) would then go and switch on or off or modularise all dependent configuration options (or warn if the attempted setting requires another configuration to be changed). > > I see there is scripts/kconfig/merge_config.sh. Is this the right way to go? > > Thanks, > Winston -- I don't know of anything in the kernel itself, but a simple ex script should work, try something like: ex -s -c "%s/^.*CONFIG_OPTION.*$/CONFIG_OPTION=x/" -c "wq" .config Replace CONFIG_OPTION with the option you want to set, and x with the value. It should work for most of the options, but will have issues with ones that are found in the name of another option (for example, setting CONFIG_CMDLINE won't work because there are at least 2 other options that start with CONFIG_CMDLINE_). It also won't handle dependencies (you need to run make oldconfig to do that) or options in optional sub-menus (the sub-menu needs to be already selected in the config).