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

2 # SPDX-License-Identifier: GPL-2.0
4 # 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 {
59 my $uname = `uname -r`;
72 "file" => "/boot/config-$uname",
76 "file" => "/boot/vmlinuz-$uname",
77 "exec" => "scripts/extract-ikconfig",
78 "test" => "scripts/extract-ikconfig",
82 "exec" => "scripts/extract-ikconfig",
83 "test" => "scripts/extract-ikconfig",
87 "exec" => "scripts/extract-ikconfig",
88 "test" => "scripts/extract-ikconfig",
92 "exec" => "scripts/extract-ikconfig",
93 "test" => "scripts/extract-ikconfig",
97 "exec" => "scripts/extract-ikconfig",
98 "test" => "scripts/extract-ikconfig",
102 sub read_config {
104 my $file = $conf->{"file"};
106 next if ( ! -f "$file");
108 if (defined($conf->{"test"})) {
109 `$conf->{"test"} $conf->{"file"} 2>/dev/null`;
113 my $exec = $conf->{"exec"};
117 open(my $infile, '-|', "$exec $file") || die "Failed to run $exec $file";
139 my @makefiles = `find $ksource -name Makefile -or -name Kbuild 2>/dev/null`;
155 sub read_kconfig {
251 $deps =~ s/^[^a-zA-Z0-9_]*//;
252 $deps =~ s/[^a-zA-Z0-9_]*$//;
254 my @deps = split /[^a-zA-Z0-9_]+/, $deps;
260 $iflevel-- if ($iflevel);
263 } elsif (/^\s*(---)?help(---)?\s*$/ || /^(comment|choice|menu)\b/) {
275 sub convert_vars {
321 # collect objects after obj-$(CONFIG_FOO_BAR)
322 if (/obj-\$[({](CONFIG_[^})]*)[)}]\s*[+:]?=\s*(.*)/) {
332 $obj =~ s/-/_/g;
358 if ( ! -f $lsmod_file) {
359 if ( -f $ENV{'objtree'}."/".$lsmod_file) {
366 my $otype = ( -x $lsmod_file) ? '-|' : '<';
375 if ( -x "$dir/lsmod" ) {
385 open($linfile, '-|', $lsmod) || die "Can not call lsmod with $lsmod";
389 next if (/^Module/); # Skip the first line.
397 # a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o
400 foreach my $module (keys(%modules)) {
401 if (defined($objects{$module})) {
402 my @arr = @{$objects{$module}};
404 $configs{$conf} = $module;
405 dprint "$conf added by direct ($module)\n";
417 # Most likely, someone has a custom (binary?) module loaded.
418 print STDERR "$module config not found!!\n";
426 my $valid = "A-Za-z_0-9";
448 sub parse_config_depends
459 # We only need to process if the depend config is a module
487 sub parse_config_selects
506 # Check if something other than a module selects this config
508 dprint "$conf (non module) selects $config, we are good\n";
552 sub loop_depend {
561 # If this config is not a module, we do not need to process it
583 sub loop_select {
611 sub in_preserved_kconfigs {
624 # Finally, read the .config file and turn off any module enabled that
631 # enable IKCONFIG at least as a module
651 } elsif ($orig_cert ne $default_cert && ! -f $orig_cert) {
652 print STDERR "Module signature verification enabled but ",
653 "module signing key \"$orig_cert\" not found. Resetting ",
665 if (! -f $orig_keys) {
700 foreach my $module (keys(%modules)) {
701 if (defined($objects{$module})) {
702 my @arr = @{$objects{$module}};
708 print STDERR "module $module did not have configs";