streamline_config.pl (f597a718296eef9622ebc1d13f4f8324fa169cef) | streamline_config.pl (22d550ae83603aa8d64d72dd1e2309cd7a96ac89) |
---|---|
1#!/usr/bin/perl -w 2# 3# Copyright 2005-2009 - Steven Rostedt 4# Licensed under the terms of the GNU GPL License version 2 5# 6# It's simple enough to figure out how this works. 7# If not, then you can ask me at stripconfig@goodmis.org 8# --- 29 unchanged lines hidden (view full) --- 38# cd /usr/src/linux-2.6.10 39# cp /boot/config-2.6.10-1-686-smp .config 40# ~/bin/streamline_config > config_strip 41# mv .config config_sav 42# mv config_strip .config 43# make oldconfig 44# 45use strict; | 1#!/usr/bin/perl -w 2# 3# Copyright 2005-2009 - Steven Rostedt 4# Licensed under the terms of the GNU GPL License version 2 5# 6# It's simple enough to figure out how this works. 7# If not, then you can ask me at stripconfig@goodmis.org 8# --- 29 unchanged lines hidden (view full) --- 38# cd /usr/src/linux-2.6.10 39# cp /boot/config-2.6.10-1-686-smp .config 40# ~/bin/streamline_config > config_strip 41# mv .config config_sav 42# mv config_strip .config 43# make oldconfig 44# 45use strict; |
46use Getopt::Long; |
|
46 47my $config = ".config"; 48 49my $uname = `uname -r`; 50chomp $uname; 51 52my @searchconfigs = ( 53 { --- 53 unchanged lines hidden (view full) --- 107 open(CIN, "$exec $file |") || die "Failed to run $exec $file"; 108 return; 109 } 110 die "No config file found"; 111} 112 113find_config; 114 | 47 48my $config = ".config"; 49 50my $uname = `uname -r`; 51chomp $uname; 52 53my @searchconfigs = ( 54 { --- 53 unchanged lines hidden (view full) --- 108 open(CIN, "$exec $file |") || die "Failed to run $exec $file"; 109 return; 110 } 111 die "No config file found"; 112} 113 114find_config; 115 |
116# Parse options 117my $localmodconfig = 0; 118my $localyesconfig = 0; 119 120GetOptions("localmodconfig" => \$localmodconfig, 121 "localyesconfig" => \$localyesconfig); 122 |
|
115# Get the build source and top level Kconfig file (passed in) 116my $ksource = $ARGV[0]; 117my $kconfig = $ARGV[1]; 118my $lsmod_file = $ENV{'LSMOD'}; 119 120my @makefiles = `find $ksource -name Makefile 2>/dev/null`; 121chomp @makefiles; 122 --- 297 unchanged lines hidden (view full) --- 420 } else { 421 print; 422 } 423 next; 424 } 425 426 if (/^(CONFIG.*)=(m|y)/) { 427 if (defined($configs{$1})) { | 123# Get the build source and top level Kconfig file (passed in) 124my $ksource = $ARGV[0]; 125my $kconfig = $ARGV[1]; 126my $lsmod_file = $ENV{'LSMOD'}; 127 128my @makefiles = `find $ksource -name Makefile 2>/dev/null`; 129chomp @makefiles; 130 --- 297 unchanged lines hidden (view full) --- 428 } else { 429 print; 430 } 431 next; 432 } 433 434 if (/^(CONFIG.*)=(m|y)/) { 435 if (defined($configs{$1})) { |
428 $setconfigs{$1} = $2; | 436 if ($localyesconfig) { 437 $setconfigs{$1} = 'y'; 438 } else { 439 $setconfigs{$1} = $2; 440 } |
429 } elsif ($2 eq "m") { 430 print "# $1 is not set\n"; 431 next; 432 } 433 } 434 print; 435} 436close(CIN); --- 19 unchanged lines hidden --- | 441 } elsif ($2 eq "m") { 442 print "# $1 is not set\n"; 443 next; 444 } 445 } 446 print; 447} 448close(CIN); --- 19 unchanged lines hidden --- |