summaryrefslogtreecommitdiff
path: root/isohybrid-acritox
diff options
context:
space:
mode:
Diffstat (limited to 'isohybrid-acritox')
-rwxr-xr-xisohybrid-acritox20
1 files changed, 5 insertions, 15 deletions
diff --git a/isohybrid-acritox b/isohybrid-acritox
index 440e756..e2bcd49 100755
--- a/isohybrid-acritox
+++ b/isohybrid-acritox
@@ -10,10 +10,8 @@ $bs=0x0200; $block0='45520200eb5f90'; # 512 - add (%eax),%al
$bs=0x0400; $block0='45520400eb5f90'; # 1024 - add $0x0,%al
# Apple Partition Map entries:
-$pm1='504d000000000004000000010000000f4170706c650000000000000000000000000000000000000000000000000000004170706c655f706172746974696f6e5f6d617000000000000000000000000000000000000000000f00000003';
-$pm2='504d00000000000400000010000000014d6163696e746f736800000000000000000000000000000000000000000000004170706c655f4472697665725f41544150490000000000000000000000000000000000000000000100000303000000002674b000000000000000000000000000000000000000eaeb0000000000000000000000000000000049534f43';
-$pm3='504d00000000000400000400000005006469736b20696d616765000000000000000000000000000000000000000000004170706c655f4846530000000000000000000000000000000000000000000000000000000000040040000033';
-$pm4='504d000000000004000009000000001000000000000000000000000000000000000000000000000000000000000000004170706c655f4672656500000000000000000000000000000000000000000000000000000000001000000001';
+$pm1='504d000000000002000000010000000f4170706c650000000000000000000000000000000000000000000000000000004170706c655f706172746974696f6e5f6d617000000000000000000000000000000000000000000f00000003';
+$pm2='504d00000000000200000400000005006469736b20696d616765000000000000000000000000000000000000000000004170706c655f4846530000000000000000000000000000000000000000000000000000000000040040000033';
die "Usage: $0 <isohybrid-bg2.iso> <HFS+-image> <FAT-image>\n" if $#ARGV != 2;
@@ -74,10 +72,6 @@ seek(FILE, $bs*1, SEEK_SET) or die "$0: $file: $!\n";
print FILE pack('H*',$pm1);
seek(FILE, $bs*2, SEEK_SET) or die "$0: $file: $!\n";
print FILE pack('H*',$pm2);
-seek(FILE, $bs*3, SEEK_SET) or die "$0: $file: $!\n";
-print FILE pack('H*',$pm3);
-seek(FILE, $bs*4, SEEK_SET) or die "$0: $file: $!\n";
-print FILE pack('H*',$pm4);
# Pad the image to a fake cylinder boundary
seek(FILE, $imgstat[7], SEEK_SET) or die "$0: $file: $!\n";
@@ -98,17 +92,13 @@ if ($padding) {
}
$partsize += $padding;
-# Adjust $pm3 (Apple_HFS)
+# Adjust $pm2 (Apple_HFS)
# "physical block start" and "physical block count" of partition:
-seek(FILE, $bs*3+8, SEEK_SET) or die "$0: $file: $!\n";
+seek(FILE, $bs*2+8, SEEK_SET) or die "$0: $file: $!\n";
print FILE pack('NN', $imgsize/$bs, $partsize/$bs);
# "logical block start" and "logical block count" of partition:
-seek(FILE, $bs*3+80, SEEK_SET) or die "$0: $file: $!\n";
+seek(FILE, $bs*2+80, SEEK_SET) or die "$0: $file: $!\n";
print FILE pack('NN', 0, $partsize/$bs);
-# Adjust $pm4 (Apple_Free)
-# "physical block start" of partition:
-seek(FILE, $bs*4+8, SEEK_SET) or die "$0: $file: $!\n";
-print FILE pack('N', $imgsize/$bs + $partsize/$bs);
$imgsize += $partsize;
seek(FILE, $imgsize, SEEK_SET) or die "$0: $file: $!\n";