Any resources for OS/kernel development on SGI hardware?

nuclear

Member
Jun 3, 2020
24
36
13
nuclear.mutantstargoat.com
A recent message by Elf in the "old vs new" thread, mentioned in passing the notion of "writing a new operating system for SGI hardware", which I found intriguing. Now that would be an interesting project!

I've done a bit of kernel hacking on IBM PC compatibles, which is easy because the platform is documented to high heaven. But I wonder if there are resources out there documenting the boot process of SGI hardware, how to make the SGI firmware run custom code, and how to talk with the basic hardware necessary to get things going (maybe a text console or even just a serial port for starters).

I'm sure there are differences from SGI computer to SGI computer. I think I'd like to target the indy or the O2 for such a project.

So, is there any good source of info for such a project out there? Any pointers appreciated.

(I realize I could just study the linux/mips source code and try to figure it out like that, and it's good that option exists, but I don't enjoy reading other people's code very much, and I try to avoid it wherever possible).
 
  • Like
Reactions: Karpour and Elf
The SGI firmware is a semi-customised version of what was originally standardised by the ARC consortium:
Writing a simple boot stage program using the ARC callbacks is actually relatively simple.

The design specs for many components in the Indy/Indigo2 were released officially by SGI at the request of those working on Linux MIPS:
https://download.majix.org/sgi/
I think its also on linux-mips but that gives me a certificate error right now. Only the 2D Newport stuff was covered by SGI's documentation release.

Documents for the later O2 and Octane hardware did eventually get leaked, as did IRIX source up as far as at least 6.5.17, but as those are unofficial leaks of information that is still owned/controlled by HP it may be wise to stay away. The O2 and Octane hardware is more complicated than the Indy/Indigo2 anyway.
 
Last edited:
  • Like
Reactions: ruckusman and Elf
Brilliant! That's more than I hoped to find. It seems like the indy is very well documented and since I don't have an indigo2, it seems like the indy would be an good target platform for this hack.

I don't care about "keeping clean" and avoidng looking at leaked docs and source. Now that you mentioned it, I do have the source code of irix 6.5.5 somewhere for some time, which might be helpful in a tight spot. If you have pointers to any leaks I'd love to keep them for future reference. Especially docs.

Thanks!
 
  • Like
Reactions: ruckusman and Elf
So I've got a hello world up and running on the O2 (couldn't be bothered to dig up the Indy at this stage, if I continue this thing and hit a brick wall at some point I'll revert to the Indy).

sgi_boot_test1-helloworld.jpg

Took me a while to sort out how to build correctly... Initially I thought I needed to produce ECOFF binaries (according to the ARC spec), and I was fighting with old versions of the GNU toolchain for a while to build a suitable cross-compiler & binutils, trying different elf2ecoff programs and so on. But it turns out the O2 supports loading ELF files directly, so all that was not necessary. I also chased a couple of red-herrings when it comes to my TFTP/BOOTP setup, but it worked out ok in the end.

Here's the source code (git repo, current commit: 3d2058b): http://nuclear.mutantstargoat.com/git/sgisys_test1

Edit: I didn't like that I had to hardcode the load address to make this work. It took a bit of searching and trial and error to find where the firmware loads my code in memory. There must be a better way to do this...
 
Last edited:
  • Like
  • Love
Reactions: ruckusman and Elf
Edit: With apologies, I no longer wish to have involvement with SGUG or SGI communities in general,
and have also chosen to remove all of my content. Many things have changed since I co-founded, named, and ultimately
then left SGUG. There are many good people around, to whom I apologize for frustrating by removing these things, and
also many petty people that over the years whittled down both the enjoyment as well as sense of obligation I used to
feel to anyone else regarding what was ultimately just a hobby. Unfortunately one of the latter now writes the rules
and so it is time for me to take my things and go.

This message will replace all of my previous forum posts because deleting threads that I started would have removed
other peoples' posts.
 
Last edited:
  • Like
Reactions: ruckusman
This is actually way cool because you've got a program running from the PROM command monitor before Irix even boots, I'm thinking if perhaps this could be used to load a device driver of a PCI card to boot from another drive as the command monitor is reminding me of the way in which boot ROMS load from cards and the way that EFI/UEFI is being used to support unsupported hardware on older Macs
EFI binaries are very versatile on Irix, can be executable, object files etc
 
This would actually be even cooler as a audit/inventory opportunity...along with a setting a bunch of variables for you to interactively setup network OS installs! That way you could send a custom binary first and walk the user through options and possibly detecting known add-on cards, changing OS install to include them, setting ENV variables to then running OS install normally with a script for the inst portion.

That would impact a huge number of users.

Also the link doesn't work for me, could you put this in your github?
 
  • Like
Reactions: ruckusman

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu