Skip to content
Axel Muhr edited this page Mar 19, 2014 · 1 revision

Ok so you're keen to make your hands dirty with the Helios-NG code? Great! You might be one of a very few ;-)
Before you get too nervous, currently -as speaking of Sköll release- there are two options:

Option A: Compile a running version of Helios-NG

A running SPARC Solaris system, preferrably Solaris 8/9 to compile the OS and some sort of Transputer gear to actually run Helios-NG on. If that's 2x "yes" read on further down.

Option B: Make Helios-NG to compile on another platform than Solaris/SPARC

This is actually phase-2 or "project Hati" - I assume you're most likely thinking of compiling under Linux. So I suggest reading the Hati chapter first.

Getting all the pieces together

Whatever option you've chosen, first you need the sources... you can get here on github. A git clone https://github.com/axelmuhr/Helios-NG should do the job.

If you're going the Hati/Linux route, you'll probably use the latest and greatest compilers, libs and tools. That's fine and every Linux distribution should provide everything you'll need to start hacking right away (make/gcc/binutils).

Under Sköll/Solaris, you might need several packages to get going. Here's a quick list - the names are from the old sunfreeware repository (non-free now and called unixpackages.com), but you might be able to find an alternative source using Google:

This one is for sure:

  • gcc-2.95.3-sol8-sparc-local

It might be worth having a look at OpenCSW, providing a up-to-date package management etc.. Im using this CSW packages mirror for Solaris 8, but it does not offer gcc 2.95 which is neccessary for the first phase - this will surely fixed in later releases.
The below packages are AFAIK available in OpenCSW, too.

Make needs:

  • libgcc-3.4.6-sol8-sparc-local
  • libiconv-1.9.2-sol8-sparc-local
  • libintl-3.4.0-sol8-sparc-local
  • make-3.82-sol8-sparc-local

And some bits and pieces:

  • ncurses-5.6-sol25-sparc-local
  • glib-2.6.2-sol8-sparc-local
  • gnutls-2.8.6-sol8-sparc-local
  • git ;-) That's only availabe on OpenCSW

Let's MAKE it

This is the same procedure for Solaris or Linux. The original Helios build-system is based on make, which is good. On the other hand it's a bit... mhhh... confusing at least.

Global and host-specific settings are defined in two files within the makeinc folder. The most important is a small shell script being called to kickstart the make process. For a Sun SPARC this is called makesun4 - I've added comments not being part of the original file:

# Make Helios/TRAN on sparky 
# I changed it to bash, was csh before

export HPROC=TRAN       # this is the target CPU, i.e. Transputer in this case

export HHOST=SUN4       # that defines the compiling host, a Sun 4 system

export HSRC=/giga/HeliosRoot/Helios     # I'll call that Helios-Root, that's where the sources live

export HPROD=/giga/HeliosRoot/Production/TRAN     # The compiled system will go here

export HHOSTBIN=/giga/bin      # the Host binaries (cc, asm, ...) will be located here

export HLICENSEE=PERIHELION    # Super-secure licence definition ;-) this controls the feature settings

if [ -e SUN4 ]; then           # This should be obvious...
 cd SUN4; make $*
else
 make $*
fi

The other important file is in the same folder and somehow matches the naming: SUN4.mak in my case.
This time it's a classic makefile and defines all the processor specific globals like the host and target C-Compiler or where to find the includes and many, many more. Check this file to make sure your pathes are all set correctly.
There are many more Host- and Targetfiles in this folder, eg. IBM RS6000, SUN3, SCO, Acorn R140 and others. We'll have to weed this out over the time.

If everything is set correctly, all you have to do is calling the shell script from Helios-Root:

yourbox# ./makeinc/makesun4

This will set all environment vars and start the make process.
But before you're able to crosscompile Helios (e.g. targeting Transputers), you'll need the so-called host-utilities. As defined in the "make kickstart shellscript" above, they either already exist or will be put in $HHOSTBIN (in my case /giga/bin). You can manually trigger the build-process by calling

yourbox# ./makeinc/makesun4 hostutil

If you plan to follow the Hati/Linux route this would be

yourbox# ./makeinc/makelinux hostutil

and then the fun part begins... tons of warnings & errors. Mainly because of type conflicts, redundant includes etc. So most source- and header files have to be adjusted using #if defined etc.
The makefiles will use the $HHOST variable as -D option for gcc. So you can use that for your pre-processor conditionals, e.g. #if defined (LINUX) or #if !(defined SUN4 || defined SUN3)

Clone this wiki locally