david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2012-06-11 19:27:23 +01:00
parent b58374fe91
commit a3cba84bab
1 changed files with 6 additions and 3 deletions

View File

@ -87,12 +87,15 @@ foreach my $rom ( @roms ) {
# Fix checksum for this ROM segment
$rom->fix_checksum();
# Add this ROM to base ROM
my $data = substr ( $baserom->get(), 0, $baserom->length() );
$data .= $rom->get();
$data .= $baserom->next_image()->get() if $baserom->next_image();
$baserom->set ( $data );
$offset += $rom->length;
}
$baserom->pnp_header->fix_checksum() if $baserom->pnp_header;
$baserom->fix_checksum();
$baserom->save ( "-" );
foreach my $rom ( @roms ) {
$rom->save ( "-" );
}