PowerPC: Transition back to CHRP script.

* After examining MacOS toolbox roms, I think i've got
  this nailed down. The MacOS Toolbox rom contains chrp
  code at the top and binary code at the bottom.
* The Raw format for the chrp seemed to cause issues with the
  OpenFirmware boot process on some systems.  NetBSD uses a '-'
  file type.
* The format of the chrp seems a lot more sensitive across machines
  than described. Ensure our returns and spaces are even.
* Booting with the 'c' key is still working on my older OpenFirmware
  machine with the chrp script. The bitmap logo is a half black, half
  white box.
* I removed the &device; alias for now for troubleshooing. It also may
  of been causing compatibility issues. More testing is needed.
This commit is contained in:
Alexander von Gluck IV 2013-06-05 03:24:42 -05:00
parent 1072a5e777
commit 67b2c0fee3
3 changed files with 25 additions and 15 deletions

View File

@ -1480,21 +1480,20 @@ actions BuildCDBootPPCImage1 bind MAPS
mkdir -p $(HAIKU_OUTPUT_DIR)/cd/boot
# CHRP Boot script
cp $(>[3]) $(HAIKU_OUTPUT_DIR)/cd/ppc/bootinfo.txt
# Haiku Bootloaders (Old World Mac + PReP partition)
cp $(>[2]) $(HAIKU_OUTPUT_DIR)/cd/ofwboot.xcf
# Haiku Bootloader (New World)
cp $(>[1]) $(HAIKU_OUTPUT_DIR)/cd/ofwboot.elf
cp $(>[1]) $(HAIKU_OUTPUT_DIR)/cd/boot/bootloader.b
cp $(>[3]) $(HAIKU_OUTPUT_DIR)/cd/boot/boot.chrp
# Haiku Bootloaders
cp $(>[2]) $(HAIKU_OUTPUT_DIR)/cd/boot/haikuloader.xcf
cp $(>[1]) $(HAIKU_OUTPUT_DIR)/cd/boot/haikuloader.elf
# Extras (readme files, etc)
cp $(>[4]) $(HAIKU_OUTPUT_DIR)/cd/
mkisofs -v -hfs -part -map $(MAPS) -no-desktop -hfs-volid bootimg \
-V bootimg -hfs-bless $(HAIKU_OUTPUT_DIR)/cd/boot -prep-boot \
ofwboot.xcf -r -o $(<) $(HAIKU_OUTPUT_DIR)/cd \
boot/haikuloader.xcf -r -o $(<) $(HAIKU_OUTPUT_DIR)/cd \
|| \
genisoimage -v -hfs -part -map $(MAPS) -no-desktop -hfs-volid bootimg \
-V bootimg -hfs-bless $(HAIKU_OUTPUT_DIR)/cd/boot -prep-boot \
ofwboot.xcf -r -o $(<) $(HAIKU_OUTPUT_DIR)/cd
boot/haikuloader.xcf -r -o $(<) $(HAIKU_OUTPUT_DIR)/cd
$(RM) -R $(HAIKU_OUTPUT_DIR)/cd
}

View File

@ -2,9 +2,9 @@
# from treating everything like a text file (ugly!)
#
# EXTN XLate CREATOR TYPE Comment
.b Raw 'UNIX' 'tbxi' "Macintosh Toolbox ROM file"
.chrp Raw 'chrp' 'tbxi' "Macintosh CHRP script"
.elf Raw 'UNIX' 'boot' "Bootstrap"
.chrp - 'chrp' 'tbxi' "Macintosh Toolbox ROM file"
.elf Raw 'UNIX' 'boot' "ELF Binary"
.xcf Raw 'UNIX' 'boot' "XCOFF Binary"
.htm Ascii 'MOSS' 'TEXT' "HTML File"
.html Ascii 'MOSS' 'TEXT' "HTML File"
.txt Ascii 'ttxt' 'TEXT' "Text File"

View File

@ -1,8 +1,16 @@
<chrp-boot> <description>Haiku</description>
<os-name>Haiku</os-name>
<boot-script>boot &device;:\\bootloader.b</boot-script>
<chrp-boot>
<compatible>
MacRISC
</compatible>
<description>
Haiku for PowerPC
</description>
<boot-script>
boot cd:,\\haikuloader.elf
</boot-script>
<icon size=64,64 color-space=3,3,2>
<bitmap> FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
<bitmap>
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
@ -166,4 +174,7 @@ FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 </bitmap> </icon> </chrp-boot>
00 00 00 00 00 00
</bitmap>
</icon>
</chrp-boot>