Lines Matching +full:sub +full:- +full:modules

2 # SPDX-License-Identifier: GPL-2.0
4 # Copyright 2005-2009 - Steven Rostedt
12 # that turns on way too many modules than you need, and
13 # you only want the modules you use, then this program
16 # It gives you the ability to turn off all the modules that are
25 # 4. Have all your devices that you need modules for connected and
26 # operational (make sure that their corresponding modules are loaded)
33 # Now your kernel is ready to be built with only the modules that
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",
86 "file" => "/lib/modules/$uname/kernel/kernel/configs.ko",
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`;
154 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;
352 my %modules;
356 if ( ! -f $lsmod_file) {
357 if ( -f $ENV{'objtree'}."/".$lsmod_file) {
364 my $otype = ( -x $lsmod_file) ? '-|' : '<';
369 # see what modules are loaded on this system
373 if ( -x "$dir/lsmod" ) {
383 open($linfile, '-|', $lsmod) || die "Can not call lsmod with $lsmod";
389 $modules{$1} = 1;
395 # a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o
398 foreach my $module (keys(%modules)) {
424 my $valid = "A-Za-z_0-9";
446 sub parse_config_depends
485 sub parse_config_selects
542 sub loop_depend {
573 sub loop_select {
601 sub in_preserved_kconfigs {
641 } elsif ($orig_cert ne $default_cert && ! -f $orig_cert) {
655 if (! -f $orig_keys) {
687 # Integrity check, make sure all modules that we want enabled do
690 foreach my $module (keys(%modules)) {