Thanks Mark, 

I found a tool that says it can convert COFF to ELF format, but it says X86, so I’m not real sure it will work.

https://www.agner.org/optimize/#objconv

I did manage to build it on macOS 12.6 on my AppleSoC PowerBook, but trying to convert with this command seems to error out:

objconv -felf32 -nu /Users/jam/Downloads/objconv/BootX BootX.elf 

Error 2018: Unknown type 0x5248433C for file: /Users/jam/Downloads/objconv/BootX

I would assume the COFF is COFF is COFF, but maybe this tool can’t convert for PPC COFF, if there is such a thing?

On Sep 29, 2022, at 4:11 AM, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:

On 28/09/2022 18:30, Jd Lyons via OpenBIOS wrote:

I’m trying to figure how Openbios boots CHRP boot scrips like :tbxi, yet SOLF does not.
Can anyone point me to the code in Openbios that enables :tbxi/CHRP booting?
Also, does anyone know how exactly that works, what was done to Openbios to enable booting the Mac OS?
I’d really like to try and get Apple’s BootX to load on Qemu’s pseries machines and as I understand it CHRP booting should work in SLOF, but it just errors out on BootX with "bad executable”, so there must be some magic I need to understand about :tbxi CHRP boot scripts that SLOF needs some sort of patch.

The boot scripts are really just an XML file that contains among other things, a Forth command to use when booting the media. You can find the simple parser in OpenBIOS at https://github.com/openbios/openbios/blob/master/libopenbios/bootinfo_load.c.

I suspect what is happening in SLOF is that the XML is being parsed, however the resulting executable loaded isn't being recognised because it is in COFF rather than ELF format.


ATB,

Mark.
_______________________________________________
OpenBIOS mailing list -- openbios@openbios.org
To unsubscribe send an email to openbios-leave@openbios.org