Re: Custom boot loader stub

Valery Ushakov <[email protected]> Fri, 17 Oct 2025 00:11:20 +0300
Newsgroups gmane.os.netbsd.ports.sparc64
Message-ID <[email protected]>
[off-list]

On Thu, Oct 16, 2025 at 14:32:15 +0100, Sad Clouds wrote:

> I think OpenBoot can execute both, Forth byte codes and SPARC binaries.
> So I'm trying to understand how to execute SPARC binaries and in what
> format they should be.

Well, go to the source of truth :)

  https://github.com/openbios/openboot

From a quick glance at its obp/arch/sun4u/go.fth

  https://github.com/openbios/openboot/blob/1a08f436/obp/arch/sun4u/go.fth#L111

I guess it will try in order elf32, elf64, and a.out

The check for h# 107 is the a.out's OMAGIC (0407).

-uwe