Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/examples/depmod.pl
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/examples/depmod.pl
r821 r1770 1 1 #!/usr/bin/perl -w 2 # vi: set ts=4:2 # vi: set sw=4 ts=4: 3 3 # Copyright (c) 2001 David Schleef <ds@schleef.org> 4 4 # Copyright (c) 2001 Erik Andersen <andersen@codepoet.org> … … 23 23 my $kernel=""; 24 24 my $kernelsyms=""; 25 my $symprefix=""; 25 26 my $stdout=0; 26 27 my $verbose=0; … … 35 36 36 37 my $usage = <<TXT; 37 $0 -b basedir { -k <vmlinux> | -F <System.map> } [options]... 38 $0 -b basedir { -k <vmlinux> | -F <System.map> } [options]... 38 39 Where: 39 -h --help : Show this help screen 40 -b --basedir : Modules base directory (e.g /lib/modules/<2.x.y>) 41 -k --kernel : Kernel binary for the target (e.g. vmlinux) 42 -F --kernelsyms : Kernel symbol file (e.g. System.map) 43 -n --stdout : Write to stdout instead of <basedir>/modules.dep 44 -v --verbose : Print out lots of debugging stuff 40 -h --help : Show this help screen 41 -b --basedir : Modules base directory (e.g /lib/modules/<2.x.y>) 42 -k --kernel : Kernel binary for the target (e.g. vmlinux) 43 -F --kernelsyms : Kernel symbol file (e.g. System.map) 44 -n --stdout : Write to stdout instead of <basedir>/modules.dep 45 -v --verbose : Print out lots of debugging stuff 46 -P --symbol-prefix : Symbol prefix 45 47 TXT 46 48 47 49 # get command-line options 48 50 GetOptions( 49 "help|h" => \$help, 50 "basedir|b=s" => \$basedir, 51 "kernel|k=s" => \$kernel, 52 "kernelsyms|F=s" => \$kernelsyms, 53 "stdout|n" => \$stdout, 54 "verbose|v" => \$verbose, 51 "help|h" => \$help, 52 "basedir|b=s" => \$basedir, 53 "kernel|k=s" => \$kernel, 54 "kernelsyms|F=s" => \$kernelsyms, 55 "stdout|n" => \$stdout, 56 "verbose|v" => \$verbose, 57 "symbol-prefix|P=s" => \$symprefix, 55 58 ); 56 59 … … 183 186 184 187 # this takes makes sure modules with no dependencies get listed 185 push @{$dep->{$name}}, 'printk' unless $name eq 'vmlinux';188 push @{$dep->{$name}}, $symprefix . 'printk' unless $name eq 'vmlinux'; 186 189 187 190 # gather the unresolved symbols … … 212 215 depmod.pl - a cross platform script to generate kernel module 213 216 dependency lists (modules.conf) which can then be used by modprobe 214 on the target platform. 217 on the target platform. 215 218 216 219 It supports Linux 2.4 and 2.6 styles of modules.conf (auto-detected) … … 246 249 247 250 The base directory uner which the target's modules will be found. This 248 defaults to the /lib/modules directory. 251 defaults to the /lib/modules directory. 249 252 250 253 If you don't specify the kernel version, this script will search for
Note:
See TracChangeset
for help on using the changeset viewer.