This is the list of tools needed to build SpecOS and the versions currently used:
Only the SDCC version is explicitly required, as replacing the compiler-supplied crt can break easily as the compiler advances. A later version of SDCC introduced new linker sections which SpecOS doesn't yet support, so the resulting binary is missing the initialised variables.
dskform (from libdsk) and cpmcp (from cpmtools) are used to create or update a disk image as part of the build. As there seems to be no way of writing a boot sector directly, a small basic loader is copied to the disk as a file called "DISK" so it can boot the disk, install the boot sector and boot it. Subsequent boots will use the boot sector, not the basic loader.
If building SDCC from source, it requires Boost headers:
Unpack boost to its target location, e.g. /sw/boost_1_53_0
Set CXXFLAGS to point to boost:
$ setenv CXXFLAGS -I/sw/boost_1_53_0
$ ./configure --prefix=/sw --disable-ucsim --disable-sdcdb \
--disable-mcs51-port --disable-z180-port --disable-r2k-port \
--disable-r3ka-port --disable-gbz80-port --disable-ds390-port \
--disable-ds400-port --disable-pic14-port --disable-pic16-port \
--disable-hc08-port --disable-s08-port --disable-stm8-port
gmake
gmake install
Hex2bin needed some modifications to the Makefile to compile on Solaris:
--- Makefile Sun Mar 11 23:04:16 2012
+++ ../../Hex2bin-1.0.10/Makefile Mon Jul 1 21:13:30 2013
@@ -1,8 +1,8 @@
# Makefile hex2bin
WIN_GCC = amd64-mingw32msvc-gcc
-INSTALL_DIR = /usr/local
-MAN_DIR = $(INSTALL_DIR)/man/man1
+INSTALL_DIR = /sw
+MAN_DIR = $(INSTALL_DIR)/share/man/man1
all: hex2bin mot2bin hex2bin.1
@@ -24,4 +24,4 @@
cp hex2bin.1 $(MAN_DIR)
clean:
- rm core *.o hex2bin mot2bin
+ rm -f core *.o hex2bin mot2bin
Z80asm needed some code (prototype) changes to compile on Solaris:
diff -r z80asm-1.8/gnulib/getopt.c /download/z80asm-1.8/gnulib/getopt.c
196c196
< extern char *getenv ();
---
> extern char *getenv (char *);
diff -r z80asm-1.8/gnulib/getopt.h /download/z80asm-1.8/gnulib/getopt.h
144c144
< extern int getopt ();
---
> extern int getopt (int argc, char *const *argv, const char *optstring);
All the other tools are a simple configure/gmake combination:
$ ./configure --prefix=/sw
$ gmake
$ gmake install