Sfoglia il codice sorgente

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 anni fa
parent
commit
a3cba84bab
1 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 6
    3
      src/util/mergerom.pl

+ 6
- 3
src/util/mergerom.pl Vedi 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…
Annulla
Salva