Subject: Report on compiling the OS...
To: None <port-sun3@NetBSD.ORG>
From: Geoff Adams <gadams@avernus.com>
List: port-sun3
Date: 04/13/1995 16:38:11
I have just recompiled the OS natively on my Sun 3/60. I've compiled
everything but games and the man pages (I'm mounting /usr/share from
my NetBSD/sparc). I've discovered a couple things along the way. I'll
be fairly verbose, because I know people have been having problems,
and perhaps this'll allow everyone to see if the problems they've had
are similar to mine and to see how I got around mine.
This is the first major task I've attempted since I moved the machine's
root, usr, and swap onto a local SCSI disk. Previously, I had been
NFS mounting them from a machine running SunOS. Along with the
expected speed gain, I noticed that things just seem to run more
smoothly. Only twice during the entire OS build did I see any "Error
code 139" messages. Here's one. (I seem to have lost my record of
the other one.)
===> cf/cf
rm -f ucbarpa.cf
(cd /build/netbsd/usr.sbin/sendmail/cf/cf && m4 ucbarpa.mc > /build/netbsd/usr.sbin/sendmail/cf/cf/ucbarpa.cf)
Segmentation fault - core dumped
*** Error code 139
Stop.
*** Error code 1
Stop.
I never did try to resolve this one -- I already have a sendmail.cf
file for this machine, generated elsewhere, so I don't need to deal
with it now. To solve the other one, I just re-ran make. Interes-
tingly, I had no problems compiling libc, which had previously been
the most sticky spot. I don't know whether to attribute this to
the more current binaries (every time I recompile, things get a
little better) or to the move to a local SCSI disk.
I also noticed that with 4mb of RAM and 16mb of swap, I can compile
(make all) or install (make install), but not both simultaneously.
I tried doing that twice, and each time, the machine spent hours
churning away, swapping or paging, until it finally hung. It gave no
signs of life other than that I could ping it.
I am now trying to compile a kernel natively. Aside from the need to
uncomment the line
# maxpartitions 8
in files.sun3.newconf and redefine AWK=awk and AS=as, I have run into
some interesting problems.
First, a number of .c files, mostly having to do with ddb, require
include files which are to be found in ../../../../../include, also
known as /usr/src/include. Here are a couple examples:
gcc -msoft-float -O -c -nostdinc -I../xinc -I. -I../.. -I../../../.. -I../../../../sys -I../../../../arch -DNEWCONFIG -DMACHINE_NONCONTIG -DSUN3_50 -DSUN3_60 -Dlotsa-other-options -D_KERNEL -Dmc68020 -Dsun3 ../../../../ddb/db_aout.c
../../../../ddb/db_aout.c:41: nlist.h: No such file or directory
../../../../ddb/db_aout.c:42: stab.h: No such file or directory
gcc -msoft-float -O -c -nostdinc -I../xinc -I. -I../.. -I../../../.. -I../../../../sys -I../../../../arch -DNEWCONFIG -DMACHINE_NONCONTIG -DSUN3_50 -DSUN3_60 -Dlotsa-other-options -D_KERNEL -Dmc68020 -Dsun3 ../../../../arch/sun3/sun3/machdep.c
../../../../arch/sun3/sun3/machdep.c:99: setjmp.h: No such file or directory
The latter of these threw a couple warnings when I added
-I../../../../include to the command:
../../../../arch/sun3/sun3/machdep.c: In function `peek_word':
../../../../arch/sun3/sun3/machdep.c:1471: warning: passing arg 1 of `setjmp' from incompatible pointer type
../../../../arch/sun3/sun3/machdep.c: In function `peek_byte':
../../../../arch/sun3/sun3/machdep.c:1487: warning: passing arg 1 of `setjmp' from incompatible pointer type
Next, bwtwo.h, cgtwp.h, and cgfour.h are generated containing (in the
case of bwtwo.h):
#define NBWTWO 1
Unfortunately, .../arch/sun3/sun3/conf.c expects somehing slightly
different:
cdev_fb_init(BWTWO,bw2), /* 27: bwtwo */
It seems to me that for consistency with other devices, conf.c should
be changed to use names of the form Ndevice.
At this point, I just got some more errors:
In file included from ../../../../arch/sun3/sun3/mem.c:56:
./machine/pmap.h:43: parse error before `simple_lock_data_t'
./machine/pmap.h:43: warning: no semicolon at end of struct or union
./machine/pmap.h:48: parse error before `}'
In file included from ../../../../arch/sun3/sun3/mem.c:58:
../../../../vm/vm.h:79: field `vm_pmap' has incomplete type
./machine/pmap.h:53: storage size of `kernel_pmap_store' isn't known
Sadly, now I must divert my attentions to other things for the moment.
I will return later to continue the project. Hopefully, I'll get
through a full kernel compile!
Once I can compile a sun3 kernel natively (I don't want to start
setting up a cross-compilation when I have a complete OS here that
certainly should be capable of compiling its own kernel!) I will
start tweaking locore.s to see if I can get anywhere with my 3/80.
- Geoff