So with that Mt Xinu Mach/386 thing I thought I’d take another stab at building the source from the CSRG CD-ROM set.
The makefiles from the i386 version are so cut up it’s a seemingly hopeless mess. I took the mach.kernel.mk directory and tried to build of 4.3BSD UWisc, but that went nowhere quick as the tool chain just isn’t right and there is a bunch of VAX stuff missing. It looks more complete for the SUN-3.
So in a fit of rage, I copied the bare needed i386 files into the SUN-3 tree and it actually compiles.
ROUGH notes….
Mach25 is where I put the 386 directory & running from inside the mach.kernel.mk directory.
mv ../mach25/sys/i386 .
mv ../mach25/sys/i386at .
mv ../mach25/sys/mach/i386 mach
mv ../mach25/sys/sysV .
cp ../mach25/sys/conf/*i386* conf
ln -s i386 machine
ln -s mach/i386 mach/machine
cp Makeconf Makeconf-orig
vi Makeconf
------
bash$ diff Makeconf-orig Makeconf
85c85,86
< CONFIG = ${${TARGET_MACHINE}_CONFIG?${${TARGET_MACHINE}_CONFIG}:STD+ANY+EXP}
---
> #CONFIG = ${${TARGET_MACHINE}_CONFIG?${${TARGET_MACHINE}_CONFIG}:STD+ANY+EXP}
> CONFIG = STD+WS-afs-nfs
89a91
> #SOURCEDIR = /usr/src/mach.kernel.mk
91c93,95
< OBJECTDIR = ../../../obj/@sys/kernel/${KERNEL_SERIES}
---
> #OBJECTDIR = ../../../obj/@sys/kernel/${KERNEL_SERIES}
> #OBJECTDIR = /usr/src/mach.kernel.mk/obj
> OBJECTDIR = ./obj
------
vi Makefile
include ../../${MAKETOP}Makefile-common
to
include ${MAKETOP}Makefile-common
vi src/config/Makefile
include ../../${MAKETOP}Makefile-common
to
include ${MAKETOP}Makefile-common
mkdir obj
make
And it actually compiled…
cc -c -O -MD -I. -I../../sys -DCMU -DINET -DMACH -DAT386 -DCMUCS -DKERNEL -fno-function-cse ../../i386at/pic_isa.c; ; ;
cc -c -O -MD -I. -I../../sys -DCMU -DINET -DMACH -DAT386 -DCMUCS -DKERNEL -fno-function-cse ../../i386at/rtc.c; ; ;
cc -c -O -MD -I. -I../../sys -DCMU -DINET -DMACH -DAT386 -DCMUCS -DKERNEL -fno-function-cse ../../i386at/wt.c; ; ;
cc -c -O -MD -I. -I../../sys -DCMU -DINET -DMACH -DAT386 -DCMUCS -DKERNEL -fno-function-cse ../../machine/swapgeneric.c
(null command)
(null command)
(null command)
loading vmunix.sys
rearranging symbols
text data bss dec hex
479200 47980 125520 652700 9f59c
ln vmunix.sys vmunix
md -f -d `ls *.d`
ln -s STD+WS-afs-nfs/vmunix KERNEL.STD+WS-afs-nfs
Naturally the Mt Xinu bootloader won’t run it.
479200+47980+125520[+40968+42516]
That’s all I get out of it. I’ll have to mess with it later on as it’s getting late, but I thought it was worth sharing.