summaryrefslogtreecommitdiff
path: root/common/tools
diff options
context:
space:
mode:
authorNélio Laranjeiro2013-03-26 10:42:48 +0100
committerNélio Laranjeiro2013-04-05 10:12:08 +0200
commit6b4a520839b4fecaa51c6448414b1911edc5cca6 (patch)
tree7cd89792a51c0bb53b73f40ab2e0c8638e01f94a /common/tools
parent26f8690daa009e7ac4f4c349c1aac0c4b2458421 (diff)
common/tools/genNVRAM: provide the board type to nvram_range.pl, closes #3890
Diffstat (limited to 'common/tools')
-rwxr-xr-xcommon/tools/genNVRAM/nvram_range.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/tools/genNVRAM/nvram_range.pl b/common/tools/genNVRAM/nvram_range.pl
index 27a88bbcf2..98ada9cf72 100755
--- a/common/tools/genNVRAM/nvram_range.pl
+++ b/common/tools/genNVRAM/nvram_range.pl
@@ -14,17 +14,19 @@ my @dpw_table = ( 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N
my $help;
my $start;
my $end;
+my $type;
my $conf;
GetOptions (
'help|h' => \$help,
'start|s=i' => \$start,
'end|e=i' => \$end,
+ 'type|t=s' => \$type,
'conf|c=s' => \$conf,
) or pod2usage (2);
pod2usage (1) if $help;
# check args
-defined $start && defined $end && defined $conf or pod2usage(2);
+defined $start && defined $end && defined $conf && defined $type or pod2usage(2);
# check parameters
if ($start <= 0) {
@@ -71,7 +73,7 @@ for $index ($start .. $end) {
print TEMP_CONF "dpw=", &dpw_generate, "\n";
close TEMP_CONF;
- system ("./genNVRAM --type spc300 --infile $temp_conf --outfile nvram_".sprintf("%06x", $index).".bin");
+ system ("./genNVRAM --type $type --infile $temp_conf --outfile nvram_".sprintf("%06x", $index).".bin");
}
system ("rm $temp_conf");
@@ -90,6 +92,7 @@ Arguments:
-h, --help brief help message
-s, --start start mac offset
-e, --end end mac offset
+ -t, --type type spc300 or mse500
-c, --conf configuration file
=cut