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

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
54 sub dprint {
61 my $uname = `uname -r`;
74 "file" => "/boot/config-$uname",
78 "file" => "/boot/vmlinuz-$uname",
79 "exec" => "scripts/extract-ikconfig",
80 "test" => "scripts/extract-ikconfig",
84 "exec" => "scripts/extract-ikconfig",
85 "test" => "scripts/extract-ikconfig",
89 "exec" => "scripts/extract-ikconfig",
90 "test" => "scripts/extract-ikconfig",
94 "exec" => "scripts/extract-ikconfig",
95 "test" => "scripts/extract-ikconfig",
99 "exec" => "scripts/extract-ikconfig",
100 "test" => "scripts/extract-ikconfig",
104 sub read_config {
106 my $file = $conf->{"file"};
108 next if ( ! -f "$file");
110 if (defined($conf->{"test"})) {
111 `$conf->{"test"} $conf->{"file"} 2>/dev/null`;
115 my $exec = $conf->{"exec"};
119 open(my $infile, '-|', "$exec $file") || die "Failed to run $exec $file";
141 my @makefiles = `find $ksource -name Makefile -or -name Kbuild 2>/dev/null`;
155 sub read_kconfig {
249 $deps =~ s/^[^a-zA-Z0-9_]*//;
250 $deps =~ s/[^a-zA-Z0-9_]*$//;
252 my @deps = split /[^a-zA-Z0-9_]+/, $deps;
258 $iflevel-- if ($iflevel);
261 } elsif (/^\s*(---)?help(---)?\s*$/ || /^(comment|choice|menu)\b/) {
273 sub convert_vars {
319 # collect objects after obj-$(CONFIG_FOO_BAR)
320 if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
330 $obj =~ s/-/_/g;
356 if ( ! -f $lsmod_file) {
357 if ( -f $ENV{'objtree'}."/".$lsmod_file) {
364 my $otype = ( -x $lsmod_file) ? '-|' : '<';
373 if ( -x "$dir/lsmod" ) {
383 open($linfile, '-|', $lsmod) || die "Can not call lsmod with $lsmod";
387 next if (/^Module/); # Skip the first line.
395 # a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o
398 foreach my $module (keys(%modules)) {
399 if (defined($objects{$module})) {
400 my @arr = @{$objects{$module}};
402 $configs{$conf} = $module;
403 dprint "$conf added by direct ($module)\n";
415 # Most likely, someone has a custom (binary?) module loaded.
416 print STDERR "$module config not found!!\n";
424 my $valid = "A-Za-z_0-9";
446 sub parse_config_depends
457 # We only need to process if the depend config is a module
485 sub parse_config_selects
504 # Check if something other than a module selects this config
506 dprint "$conf (non module) selects config, we are good\n";
542 sub loop_depend {
551 # If this config is not a module, we do not need to process it
573 sub loop_select {
597 # Finally, read the .config file and turn off any module enabled that
604 # enable IKCONFIG at least as a module
624 } elsif ($orig_cert ne $default_cert && ! -f $orig_cert) {
625 print STDERR "Module signature verification enabled but ",
626 "module signing key \"$orig_cert\" not found. Resetting ",
638 if (! -f $orig_keys) {
668 foreach my $module (keys(%modules)) {
669 if (defined($objects{$module})) {
670 my @arr = @{$objects{$module}};
676 print STDERR "module $module did not have configs";