This is driving me nuts.
Assemble and link the binary as per the included Makefile. Optionally strip it with llvm-strip minimal-boot
OpenBIOS (OpenFirmware implementation used by qemu) should run the executable which then should immediately exit through by invoking the "exit" service through OpenFirmware client handler API.
Execution freezes without further output upon (presumably) executing my binary.
I've looked at OpenBSD and NetBSD ofwboot bootloaders for reference and I can't figure out why none of my attempts are working.
https://cdn.openbsd.org/pub/OpenBSD/7.2/sparc64/ofwboot https://cvsweb.openbsd.org/src/sys/arch/sparc64/stand/ofwboot/
https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/sparc64/installation/misc/ofwboot https://github.com/NetBSD/src/tree/trunk/sys/arch/sparc/stand/ofwboot
https://www.openbios.org/data/docs/12751d1a.pdf https://www.openfirmware.info/IEEE_1275-1994 https://www.openfirmware.info/Bindings
Running either of the above ofwboot
files will actually do something, though they aren't intended to be run this way and will error out. In OpenBSD's case ofwboot
will print the bootloader version, then a notice Invalid Openfirmware environment
and then exit.
I have tried more complex versions that set up the stack and stdin/stdout handles like the BSD ofwboot
s do, but those fail in the exact same manner.