Rev 1667 | Rev 1881 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1667 | Rev 1668 | ||
|---|---|---|---|
| Line 124... | Line 124... | ||
| 124 | |
124 | |
| 125 | @device = $devices[0]; |
125 | @device = $devices[0]; |
| 126 | |
126 | |
| 127 | foreach (@devices) |
127 | foreach (@devices) |
| 128 | { |
128 | { |
| 129 | if (@{$_}[ |
129 | if (@{$_}[0] eq $devicename) |
| 130 | { |
130 | { |
| 131 | @device = @{$_}; |
131 | @device = @{$_}; |
| 132 | } |
132 | } |
| 133 | } |
133 | } |
| 134 | |
134 | |
| 135 | if ($device[0] eq " |
135 | if ($device[0] eq "unknown") |
| 136 | { |
136 | { |
| 137 | print "\nWarning: Unknown device type, will not set MCU settings\n\n"; |
137 | print "\nWarning: Unknown device type, will not set MCU settings\n\n"; |
| 138 | } |
138 | } |
| 139 | else |
139 | else |
| 140 | { |
140 | { |
| Line 153... | Line 153... | ||
| 153 | @file = <FP>; |
153 | @file = <FP>; |
| 154 | close FP; |
154 | close FP; |
| 155 | open (FP, ">".$biosfile) or die "Cannot open file $biosfile\n"; |
155 | open (FP, ">".$biosfile) or die "Cannot open file $biosfile\n"; |
| 156 | foreach $file (@file) { |
156 | foreach $file (@file) { |
| 157 | $file =~ s/^NODE_HW_ID=.*/NODE_HW_ID=$hwid/g; |
157 | $file =~ s/^NODE_HW_ID=.*/NODE_HW_ID=$hwid/g; |
| 158 | if ($device[0] ne " |
158 | if ($device[0] ne "unknown") |
| 159 | { |
159 | { |
| 160 | $file =~ s/^MCU=.*/MCU=$device[0]/g; |
160 | $file =~ s/^MCU=.*/MCU=$device[0]/g; |
| 161 | $file =~ s/^HIGHFUSE=.*/HIGHFUSE=$device[1]/g; |
161 | $file =~ s/^HIGHFUSE=.*/HIGHFUSE=$device[1]/g; |
| 162 | $file =~ s/^LOWFUSE=.*/LOWFUSE=$device[2]/g; |
162 | $file =~ s/^LOWFUSE=.*/LOWFUSE=$device[2]/g; |
| 163 | $file =~ s/^EXTFUSE=.*/EXTFUSE=$device[3]/g; |
163 | $file =~ s/^EXTFUSE=.*/EXTFUSE=$device[3]/g; |
| Line 165... | Line 165... | ||
| 165 | } |
165 | } |
| 166 | print FP $file; |
166 | print FP $file; |
| 167 | } |
167 | } |
| 168 | close FP; |
168 | close FP; |
| 169 | 169 | ||
| 170 | exit |
170 | exit(0); |
| 171 | 171 | ||
| 172 | 172 | ||