[geeks] Standalone Exectuable Formats

Jonathan C. Patschke jp at celestrion.net
Fri Sep 17 17:22:52 CDT 2004


I would like to create a standalone executable for a 32-bit[0]
SPARCstation, in SPARC assembly language[1].  That is, I'd like to
create a program that can be launched from the PROM, probably via
Ethernet (ie: it'd be the kernel file that the bootserver sends down)
or floppy diskette.  Do any of you have documentation on the executable
format that OpenBoot is expecting and what services[1] are provided by
the firmware via syscalls or other forms of software interrupt?  Also,
does ufsboot block any of these?

In this case, any magic that may be performed by the native assembler
or compiler toolchain is not useful to me--I need to be able to do this
manually.  Assume I'm going to bang bits together and spew out machine
code; I need framing details, if there is any special checksumming to
do. :)

I suppose I could dig through the BSD bootstrap code, but I'd really
like a pointer to a more definitive answer, especially since I'm not
doing anything as complicated as the BSD bootloader does.  I understand
there is quite a lot of good info in the SILO source, but I'm
pretty-sure it's GPLed, and there's a very slight chance that this code
might go into a commercial product, so I don't want to taint it.

Failing that, I'd also take a pointer to the same information on a
DECstation 5000, an SGI Indy, a VAXstation 4000, or an Alpha running
SRM firmware, in order of preference.  MIPS and SPARC assembly I
know, but if I have to learn one of VAX or Alpha assembly language,
the VAXstation is physically a lot more accessible than any of the
Alphas I have.

Yes, I know how to do this on a PC.  The BIOS interrupt routines are
very well-documented and the BIOS doesn't expect any sort of executable
it just runs what it's handed.  However, I also can't attach a serial
console to any of my PCs here, so I can't mess with this stuff from
work--hence the SPARCstation being my first choice; not only does it
grok serial, but it does something useful upon receiving a break.


[0] Specifically, sun4c or sun4m.  If this documentation is lost, I
     can scrounge up an Ultra 1 and mess with sun4u, but I have an LX and
     a pair of IPXes that are doing nothing right now.
[1] Abstract terminal I/O and device I/O, specifically.  Clearly
     OpenBoot must have some function that says "spew $string to the
     console" without the program needing to know where the console is or
     how to talk to it at a register level.
-- 
Jonathan Patschke )
Elgin, TX        (  "Ma'am, I can do anything.  I own a game store."
USA               )             --Gord ( http://www.actsofgord.com )



More information about the geeks mailing list