Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 1 | #!/usr/bin/perl -w |
"Robert P. J. Day" | 63fc1a9 | 2006-07-02 19:47:05 +0000 | [diff] [blame] | 2 | # vi: set sw=4 ts=4: |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 3 | # Copyright (c) 2001 David Schleef <ds@schleef.org> |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 4 | # Copyright (c) 2001 Erik Andersen <andersen@codepoet.org> |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 5 | # Copyright (c) 2001 Stuart Hughes <seh@zee2.com> |
"Steven J. Hill" | adb058b | 2002-10-08 21:33:51 +0000 | [diff] [blame] | 6 | # Copyright (c) 2002 Steven J. Hill <shill@broadcom.com> |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 7 | # Copyright (c) 2006 Freescale Semiconductor, Inc <stuarth@freescale.com> |
| 8 | # |
| 9 | # History: |
| 10 | # March 2006: Stuart Hughes <stuarth@freescale.com>. |
| 11 | # Significant updates, including implementing the '-F' option |
| 12 | # and adding support for 2.6 kernels. |
| 13 | |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 14 | # This program is free software; you can redistribute it and/or modify it |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 15 | # under the same terms as Perl itself. |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 16 | use Getopt::Long qw(:config no_auto_abbrev no_ignore_case); |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 17 | use File::Find; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 18 | use strict; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 19 | |
| 20 | # Set up some default values |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 21 | my $kdir=""; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 22 | my $basedir=""; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 23 | my $kernel=""; |
| 24 | my $kernelsyms=""; |
Mike Frysinger | d611ccc | 2007-07-13 04:37:12 +0000 | [diff] [blame] | 25 | my $symprefix=""; |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 26 | my $all=0; |
| 27 | my $quick=0; |
| 28 | my $errsyms=0; |
"Steven J. Hill" | adb058b | 2002-10-08 21:33:51 +0000 | [diff] [blame] | 29 | my $stdout=0; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 30 | my $verbose=0; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 31 | my $help=0; |
Rob Landley | 9a990aa | 2006-06-02 21:30:40 +0000 | [diff] [blame] | 32 | my $nm = $ENV{'NM'} || "nm"; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 33 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 34 | # more globals |
| 35 | my (@liblist) = (); |
| 36 | my $exp = {}; |
| 37 | my $dep = {}; |
| 38 | my $mod = {}; |
| 39 | |
| 40 | my $usage = <<TXT; |
Denis Vlasenko | 9213a9e | 2006-09-17 16:28:10 +0000 | [diff] [blame] | 41 | $0 -b basedir { -k <vmlinux> | -F <System.map> } [options]... |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 42 | Where: |
Mike Frysinger | d611ccc | 2007-07-13 04:37:12 +0000 | [diff] [blame] | 43 | -h --help : Show this help screen |
| 44 | -b --basedir : Modules base directory (e.g /lib/modules/<2.x.y>) |
| 45 | -k --kernel : Kernel binary for the target (e.g. vmlinux) |
| 46 | -F --kernelsyms : Kernel symbol file (e.g. System.map) |
| 47 | -n --stdout : Write to stdout instead of <basedir>/modules.dep |
| 48 | -v --verbose : Print out lots of debugging stuff |
| 49 | -P --symbol-prefix : Symbol prefix |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 50 | -a --all : Probe all modules (default/only thing supported) |
| 51 | -e --errsyms : Report any symbols not supplied by modules/kernel |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 52 | TXT |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 53 | |
| 54 | # get command-line options |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 55 | GetOptions( |
Mike Frysinger | d611ccc | 2007-07-13 04:37:12 +0000 | [diff] [blame] | 56 | "help|h" => \$help, |
| 57 | "basedir|b=s" => \$basedir, |
| 58 | "kernel|k=s" => \$kernel, |
| 59 | "kernelsyms|F=s" => \$kernelsyms, |
| 60 | "stdout|n" => \$stdout, |
| 61 | "verbose|v" => \$verbose, |
| 62 | "symbol-prefix|P=s" => \$symprefix, |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 63 | "all|a" => \$all, |
| 64 | # unsupported options |
| 65 | "quick|A" => \$quick, |
| 66 | # ignored options (for historical usage) |
| 67 | "quiet|q", |
| 68 | "root|r", |
| 69 | "unresolved-error|u" |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 70 | ); |
| 71 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 72 | die $usage if $help; |
| 73 | die $usage unless $basedir && ( $kernel || $kernelsyms ); |
| 74 | die "can't use both -k and -F\n\n$usage" if $kernel && $kernelsyms; |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 75 | die "sorry, -A/--quick is not supported" if $quick; |
| 76 | die "--errsyms requires --kernelsyms" if $errsyms && !$kernelsyms; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 77 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 78 | # Strip any trailing or multiple slashes from basedir |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 79 | $basedir =~ s-/+$--g; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 80 | |
| 81 | # The base directory should contain /lib/modules somewhere |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 82 | if($basedir !~ m-/lib/modules-) { |
| 83 | warn "WARNING: base directory does not match ..../lib/modules\n"; |
| 84 | } |
| 85 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 86 | # if no kernel version is contained in the basedir, try to find one |
| 87 | if($basedir !~ m-/lib/modules/\d\.\d-) { |
| 88 | opendir(BD, $basedir) or die "can't open basedir $basedir : $!\n"; |
| 89 | foreach ( readdir(BD) ) { |
| 90 | next if /^\.\.?$/; |
| 91 | next unless -d "$basedir/$_"; |
| 92 | warn "dir = $_\n" if $verbose; |
| 93 | if( /^\d\.\d/ ) { |
| 94 | $kdir = $_; |
| 95 | warn("Guessed module directory as $basedir/$kdir\n"); |
| 96 | last; |
| 97 | } |
| 98 | } |
| 99 | closedir(BD); |
| 100 | die "Cannot find a kernel version under $basedir\n" unless $kdir; |
| 101 | $basedir = "$basedir/$kdir"; |
| 102 | } |
| 103 | |
| 104 | # Find the list of .o or .ko files living under $basedir |
| 105 | warn "**** Locating all modules\n" if $verbose; |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 106 | find sub { |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 107 | my $file; |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 108 | if ( -f $_ && ! -d $_ ) { |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 109 | $file = $File::Find::name; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 110 | if ( $file =~ /\.k?o$/ ) { |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 111 | push(@liblist, $file); |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 112 | warn "$file\n" if $verbose; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 113 | } |
| 114 | } |
| 115 | }, $basedir; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 116 | warn "**** Finished locating modules\n" if $verbose; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 117 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 118 | foreach my $obj ( @liblist ){ |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 119 | # turn the input file name into a target tag name |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 120 | my ($tgtname) = $obj =~ m-(/lib/modules/.*)$-; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 121 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 122 | warn "\nMODULE = $tgtname\n" if $verbose; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 123 | |
| 124 | # get a list of symbols |
Rob Landley | 9a990aa | 2006-06-02 21:30:40 +0000 | [diff] [blame] | 125 | my @output=`$nm $obj`; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 126 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 127 | build_ref_tables($tgtname, \@output, $exp, $dep); |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 131 | # vmlinux is a special name that is only used to resolve symbols |
| 132 | my $tgtname = 'vmlinux'; |
Rob Landley | 9a990aa | 2006-06-02 21:30:40 +0000 | [diff] [blame] | 133 | my @output = $kernelsyms ? `cat $kernelsyms` : `$nm $kernel`; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 134 | warn "\nMODULE = $tgtname\n" if $verbose; |
| 135 | build_ref_tables($tgtname, \@output, $exp, $dep); |
| 136 | |
Mike Frysinger | fa6c484 | 2006-05-26 01:48:17 +0000 | [diff] [blame] | 137 | # resolve the dependencies for each module |
| 138 | # reduce dependencies: remove unresolvable and resolved from vmlinux/System.map |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 139 | # remove duplicates |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 140 | foreach my $module (keys %$dep) { |
| 141 | warn "reducing module: $module\n" if $verbose; |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 142 | $mod->{$module} = {}; |
| 143 | foreach (@{$dep->{$module}}) { |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 144 | if( $exp->{$_} ) { |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 145 | warn "resolved symbol $_ in file $exp->{$_}\n" if $verbose; |
| 146 | next if $exp->{$_} =~ /vmlinux/; |
| 147 | $mod->{$module}{$exp->{$_}} = 1; |
| 148 | } else { |
| 149 | warn "unresolved symbol $_ in file $module\n"; |
| 150 | } |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 151 | } |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 152 | } |
| 153 | |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 154 | # build a complete dependency list for each module and make sure it |
| 155 | # is kept in order proper order |
| 156 | my $mod2 = {}; |
| 157 | sub maybe_unshift |
| 158 | { |
| 159 | my ($array, $ele) = @_; |
| 160 | # chop off the leading path /lib/modules/<kver>/ as modprobe |
| 161 | # will handle relative paths just fine |
| 162 | $ele =~ s:^/lib/modules/[^/]*/::; |
| 163 | foreach (@{$array}) { |
| 164 | if ($_ eq $ele) { |
| 165 | return; |
| 166 | } |
| 167 | } |
| 168 | unshift (@{$array}, $ele); |
| 169 | } |
Mike Frysinger | 4c8a721 | 2009-07-09 00:28:48 -0400 | [diff] [blame] | 170 | sub add_mod_deps |
| 171 | { |
| 172 | my ($depth, $mod, $mod2, $module, $this_module) = @_; |
| 173 | |
| 174 | $depth .= " "; |
| 175 | warn "${depth}loading deps of module: $this_module\n" if $verbose; |
Mike Frysinger | 8ce1ad3 | 2010-11-16 07:15:00 -0500 | [diff] [blame] | 176 | if (length($depth) > 50) { |
| 177 | die "too much recursion (circular dependencies in modules?)"; |
| 178 | } |
Mike Frysinger | 4c8a721 | 2009-07-09 00:28:48 -0400 | [diff] [blame] | 179 | |
| 180 | foreach my $md (keys %{$mod->{$this_module}}) { |
| 181 | add_mod_deps ($depth, $mod, $mod2, $module, $md); |
| 182 | warn "${depth} outputting $md\n" if $verbose; |
| 183 | maybe_unshift (\@{$$mod2->{$module}}, $md); |
| 184 | } |
| 185 | |
| 186 | if (!%{$mod->{$this_module}}) { |
| 187 | warn "${depth} no deps\n" if $verbose; |
| 188 | } |
| 189 | } |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 190 | foreach my $module (keys %$mod) { |
Mike Frysinger | 4c8a721 | 2009-07-09 00:28:48 -0400 | [diff] [blame] | 191 | warn "filling out module: $module\n" if $verbose; |
| 192 | @{$mod2->{$module}} = (); |
| 193 | add_mod_deps ("", $mod, \$mod2, $module, $module); |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 194 | } |
| 195 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 196 | # figure out where the output should go |
| 197 | if ($stdout == 0) { |
Mike Frysinger | 4c8a721 | 2009-07-09 00:28:48 -0400 | [diff] [blame] | 198 | warn "writing $basedir/modules.dep\n" if $verbose; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 199 | open(STDOUT, ">$basedir/modules.dep") |
| 200 | or die "cannot open $basedir/modules.dep: $!"; |
| 201 | } |
Sonic Zhang | 880eec8 | 2011-09-09 18:58:08 +0200 | [diff] [blame] | 202 | my $kseries = $basedir =~ m,/2\.4\.[^/]*, ? '2.4' : 'others'; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 203 | |
| 204 | foreach my $module ( keys %$mod ) { |
| 205 | if($kseries eq '2.4') { |
| 206 | print "$module:\t"; |
| 207 | my @sorted = sort bydep keys %{$mod->{$module}}; |
| 208 | print join(" \\\n\t",@sorted); |
| 209 | print "\n\n"; |
| 210 | } else { |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 211 | my $shortmod = $module; |
| 212 | $shortmod =~ s:^/lib/modules/[^/]*/::; |
| 213 | print "$shortmod:"; |
| 214 | my @sorted = @{$mod2->{$module}}; |
| 215 | printf " " if @sorted; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 216 | print join(" ",@sorted); |
| 217 | print "\n"; |
| 218 | } |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 219 | } |
| 220 | |
"Steven J. Hill" | adb058b | 2002-10-08 21:33:51 +0000 | [diff] [blame] | 221 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 222 | sub build_ref_tables |
| 223 | { |
| 224 | my ($name, $sym_ar, $exp, $dep) = @_; |
| 225 | |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 226 | my $ksymtab = grep m/ ${symprefix}__ksymtab/, @$sym_ar; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 227 | |
| 228 | # gather the exported symbols |
| 229 | if($ksymtab){ |
| 230 | # explicitly exported |
| 231 | foreach ( @$sym_ar ) { |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 232 | / ${symprefix}__ksymtab_(.*)$/ and do { |
| 233 | my $sym = ${symprefix} . $1; |
| 234 | warn "sym = $sym\n" if $verbose; |
| 235 | $exp->{$sym} = $name; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 236 | }; |
| 237 | } |
| 238 | } else { |
| 239 | # exporting all symbols |
| 240 | foreach ( @$sym_ar ) { |
Mike Frysinger | dbd18f6 | 2007-11-18 06:13:58 +0000 | [diff] [blame] | 241 | / [ABCDGRSTW] (.*)$/ and do { |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 242 | warn "syma = $1\n" if $verbose; |
| 243 | $exp->{$1} = $name; |
| 244 | }; |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | # this takes makes sure modules with no dependencies get listed |
Mike Frysinger | d611ccc | 2007-07-13 04:37:12 +0000 | [diff] [blame] | 249 | push @{$dep->{$name}}, $symprefix . 'printk' unless $name eq 'vmlinux'; |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 250 | |
| 251 | # gather the unresolved symbols |
| 252 | foreach ( @$sym_ar ) { |
Mike Frysinger | 2b6497b | 2009-05-05 20:14:12 -0400 | [diff] [blame] | 253 | !/ ${symprefix}__this_module/ && / U (.*)$/ and do { |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 254 | warn "und = $1\n" if $verbose; |
| 255 | push @{$dep->{$name}}, $1; |
| 256 | }; |
| 257 | } |
| 258 | } |
| 259 | |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 260 | sub bydep |
| 261 | { |
| 262 | foreach my $f ( keys %{$mod->{$b}} ) { |
| 263 | if($f eq $a) { |
| 264 | return 1; |
| 265 | } |
| 266 | } |
| 267 | return -1; |
| 268 | } |
| 269 | |
| 270 | |
| 271 | |
| 272 | __END__ |
| 273 | |
| 274 | =head1 NAME |
| 275 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 276 | depmod.pl - a cross platform script to generate kernel module |
| 277 | dependency lists (modules.conf) which can then be used by modprobe |
Denis Vlasenko | 9213a9e | 2006-09-17 16:28:10 +0000 | [diff] [blame] | 278 | on the target platform. |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 279 | |
| 280 | It supports Linux 2.4 and 2.6 styles of modules.conf (auto-detected) |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 281 | |
| 282 | =head1 SYNOPSIS |
| 283 | |
"Steven J. Hill" | adb058b | 2002-10-08 21:33:51 +0000 | [diff] [blame] | 284 | depmod.pl [OPTION]... [basedir]... |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 285 | |
| 286 | Example: |
| 287 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 288 | depmod.pl -F linux/System.map -b target/lib/modules/2.6.11 |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 289 | |
| 290 | =head1 DESCRIPTION |
| 291 | |
| 292 | The purpose of this script is to automagically generate a list of of kernel |
Mike Frysinger | fa6c484 | 2006-05-26 01:48:17 +0000 | [diff] [blame] | 293 | module dependencies. This script produces dependency lists that should be |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 294 | identical to the depmod program from the modutils package. Unlike the depmod |
| 295 | binary, however, depmod.pl is designed to be run on your host system, not |
| 296 | on your target system. |
| 297 | |
| 298 | This script was written by David Schleef <ds@schleef.org> to be used in |
| 299 | conjunction with the BusyBox modprobe applet. |
| 300 | |
| 301 | =head1 OPTIONS |
| 302 | |
| 303 | =over 4 |
| 304 | |
| 305 | =item B<-h --help> |
| 306 | |
| 307 | This displays the help message. |
| 308 | |
| 309 | =item B<-b --basedir> |
| 310 | |
| 311 | The base directory uner which the target's modules will be found. This |
Denis Vlasenko | 9213a9e | 2006-09-17 16:28:10 +0000 | [diff] [blame] | 312 | defaults to the /lib/modules directory. |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 313 | |
| 314 | If you don't specify the kernel version, this script will search for |
| 315 | one under the specified based directory and use the first thing that |
| 316 | looks like a kernel version. |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 317 | |
| 318 | =item B<-k --kernel> |
| 319 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 320 | Kernel binary for the target (vmlinux). You must either supply a kernel binary |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 321 | or a kernel symbol file (using the -F option). |
| 322 | |
| 323 | =item B<-F --kernelsyms> |
| 324 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 325 | Kernel symbol file for the target (System.map). |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 326 | |
| 327 | =item B<-n --stdout> |
| 328 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 329 | Write to stdout instead of modules.dep |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 330 | kernel binary for the target (using the -k option). |
| 331 | |
| 332 | =item B<--verbose> |
| 333 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 334 | Verbose (debug) output |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 335 | |
| 336 | =back |
| 337 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 338 | =head1 COPYRIGHT AND LICENSE |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 339 | |
Rob Landley | d049812 | 2006-03-21 16:35:50 +0000 | [diff] [blame] | 340 | Copyright (c) 2001 David Schleef <ds@schleef.org> |
| 341 | Copyright (c) 2001 Erik Andersen <andersen@codepoet.org> |
| 342 | Copyright (c) 2001 Stuart Hughes <seh@zee2.com> |
| 343 | Copyright (c) 2002 Steven J. Hill <shill@broadcom.com> |
| 344 | Copyright (c) 2006 Freescale Semiconductor, Inc <stuarth@freescale.com> |
| 345 | |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 346 | This program is free software; you can redistribute it and/or modify it |
Eric Andersen | c126f8f | 2001-07-30 19:32:03 +0000 | [diff] [blame] | 347 | under the same terms as Perl itself. |
| 348 | |
| 349 | =head1 AUTHOR |
| 350 | |
| 351 | David Schleef <ds@schleef.org> |
| 352 | |
| 353 | =cut |