Browse Source

[util] Update mergerom.pl to handle .mrom images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
a3cba84bab
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      src/util/mergerom.pl

+ 6
- 3
src/util/mergerom.pl View File

@@ -87,12 +87,15 @@ foreach my $rom ( @roms ) {
87 87
   # Fix checksum for this ROM segment
88 88
   $rom->fix_checksum();
89 89
 
90
+  # Add this ROM to base ROM
91
+  my $data = substr ( $baserom->get(), 0, $baserom->length() );
92
+  $data .= $rom->get();
93
+  $data .= $baserom->next_image()->get() if $baserom->next_image();
94
+  $baserom->set ( $data );
95
+
90 96
   $offset += $rom->length;
91 97
 }
92 98
 
93 99
 $baserom->pnp_header->fix_checksum() if $baserom->pnp_header;
94 100
 $baserom->fix_checksum();
95 101
 $baserom->save ( "-" );
96
-foreach my $rom ( @roms ) {
97
-  $rom->save ( "-" );
98
-}

Loading…
Cancel
Save