Lines Matching +full:sub +full:- +full:module

1 #!/usr/bin/perl -w
3 # Copyright 2005-2009 - Steven Rostedt
38 # cd /usr/src/linux-2.6.10
39 # cp /boot/config-2.6.10-1-686-smp .config
53 sub dprint {
60 my $uname = `uname -r`;
73 "file" => "/boot/config-$uname",
77 "file" => "/boot/vmlinuz-$uname",
78 "exec" => "scripts/extract-ikconfig",
79 "test" => "scripts/extract-ikconfig",
83 "exec" => "scripts/extract-ikconfig",
84 "test" => "scripts/extract-ikconfig",
88 "exec" => "scripts/extract-ikconfig",
89 "test" => "scripts/extract-ikconfig",
93 "exec" => "scripts/extract-ikconfig",
94 "test" => "scripts/extract-ikconfig",
98 "exec" => "scripts/extract-ikconfig",
99 "test" => "scripts/extract-ikconfig",
103 sub read_config {
105 my $file = $conf->{"file"};
107 next if ( ! -f "$file");
109 if (defined($conf->{"test"})) {
110 `$conf->{"test"} $conf->{"file"} 2>/dev/null`;
114 my $exec = $conf->{"exec"};
118 open(my $infile, '-|', "$exec $file") || die "Failed to run $exec $file";
140 my @makefiles = `find $ksource -name Makefile -or -name Kbuild 2>/dev/null`;
154 sub read_kconfig {
248 $deps =~ s/^[^a-zA-Z0-9_]*//;
249 $deps =~ s/[^a-zA-Z0-9_]*$//;
251 my @deps = split /[^a-zA-Z0-9_]+/, $deps;
257 $iflevel-- if ($iflevel);
260 } elsif (/^\s*(---)?help(---)?\s*$/ || /^(comment|choice|menu)\b/) {
272 sub convert_vars {
318 # collect objects after obj-$(CONFIG_FOO_BAR)
319 if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
329 $obj =~ s/-/_/g;
355 if ( ! -f $lsmod_file) {
356 if ( -f $ENV{'objtree'}."/".$lsmod_file) {
363 my $otype = ( -x $lsmod_file) ? '-|' : '<';
372 if ( -x "$dir/lsmod" ) {
382 open($linfile, '-|', $lsmod) || die "Can not call lsmod with $lsmod";
386 next if (/^Module/); # Skip the first line.
394 # a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o
397 foreach my $module (keys(%modules)) {
398 if (defined($objects{$module})) {
399 my @arr = @{$objects{$module}};
401 $configs{$conf} = $module;
402 dprint "$conf added by direct ($module)\n";
414 # Most likely, someone has a custom (binary?) module loaded.
415 print STDERR "$module config not found!!\n";
423 my $valid = "A-Za-z_0-9";
445 sub parse_config_depends
456 # We only need to process if the depend config is a module
484 sub parse_config_selects
503 # Check if something other than a module selects this config
505 dprint "$conf (non module) selects config, we are good\n";
541 sub loop_depend {
550 # If this config is not a module, we do not need to process it
572 sub loop_select {
596 # Finally, read the .config file and turn off any module enabled that
603 # enable IKCONFIG at least as a module
623 } elsif ($orig_cert ne $default_cert && ! -f $orig_cert) {
624 print STDERR "Module signature verification enabled but ",
625 "module signing key \"$orig_cert\" not found. Resetting ",
637 if (! -f $orig_keys) {
667 foreach my $module (keys(%modules)) {
668 if (defined($objects{$module})) {
669 my @arr = @{$objects{$module}};
675 print STDERR "module $module did not have configs";