Subject: Sun-3 kernel, one more time
To: None <port-sun3@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: port-sun3
Date: 05/25/1995 07:52:49
Okay, after reading all the stuff on port-sun3 about building Sun-3
kernels under NetBSD, I cloned arch/sun3/conf to arch/sun3/conf2, made
the following changes

	diff -c -r -s conf/Makefile.sun3 conf2/Makefile.sun3
	*** conf/Makefile.sun3	Fri Mar 24 06:08:06 1995
	--- conf2/Makefile.sun3	Tue May 23 20:44:27 1995
	***************
	*** 22,36 ****
	  # For cross development, uncomment XINC, and
	  # copy a few things from NetBSD:/usr/include
	  # into compile/xinc : nlist.h setjmp.h stab.h
	! XINC = -nostdinc -I../xinc
	! AWK = nawk
	  
	  # DEBUG is set to -g by config if debugging is requested (config -g).
	  DEBUG?=-O
	  # PROF is set to -pg by config if profiling is requested (config -p).
	! AS=	gas 
	! CC=	gcc -msoft-float ${DEBUG}
	! CPP=	gcpp
	  LD=	ld
	  TOUCH=	touch -f -c
	  GPROF.EX=/usr/src/usr.lib/libc/csu/sun3/gmon.ex
	--- 22,39 ----
	  # For cross development, uncomment XINC, and
	  # copy a few things from NetBSD:/usr/include
	  # into compile/xinc : nlist.h setjmp.h stab.h
	! #XINC = -nostdinc -I../xinc
	! #AWK = nawk
	  
	  # DEBUG is set to -g by config if debugging is requested (config -g).
	  DEBUG?=-O
	  # PROF is set to -pg by config if profiling is requested (config -p).
	! #AS=	gas 
	! #CC=	gcc -msoft-float ${DEBUG}
	! #CPP=	gcpp
	! AS=as
	! CC=cc -msoft-float $(DEBUG)
	! CPP=cpp
	  LD=	ld
	  TOUCH=	touch -f -c
	  GPROF.EX=/usr/src/usr.lib/libc/csu/sun3/gmon.ex
	diff -c -r -s conf/files.sun3 conf2/files.sun3
	*** conf/files.sun3	Fri Apr 28 06:24:42 1995
	--- conf2/files.sun3	Tue May 23 20:43:21 1995
	***************
	*** 5,11 ****
	  #
	  
	  # maxpartitions must be first item in files.${ARCH}.newconf
	! # maxpartitions 8
	  
	  maxusers 2 8 64
	  
	--- 5,11 ----
	  #
	  
	  # maxpartitions must be first item in files.${ARCH}.newconf
	! maxpartitions 8
	  
	  maxusers 2 8 64
	  

and ran "config GENERIC".  It completed, apparently happily; I then did
"cd ../compile/GENERIC" and "make depend" and "make".  Everything went
apparently normally except for some warnings

	cc -msoft-float -O -c  -I. -I../.. -I../../../.. -I../../../../sys -I../../../../arch -DNEWCONFIG -DMACHINE_NONCONTIG -DSUN3_50 -DSUN3_60 -DSUN3_110 -DSUN3_160 -DSUN3_260 -DGENERIC -DFPU_EMULATE -DTIMEZONE="0x12c" -DDST="2" -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DKTRACE -DDDB -DSYMTAB_SPACE="0x17ed0" -DNFSSERVER -DNFSCLIENT -DFFS -DFDESC -DFIFO -DKERNFS -DNULLFS -DPROCFS -DUNION -DINET -DNFS_BOOT_RWSIZE="0x400" -DCOMPAT_SUNOS -DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_43 -DTCP_COMPAT_42 -DCONTEXT_DEBUG -DPMAP_DEBUG -DEXEC_DEBUG -DDIAGNOSTIC -DSCSIDEBUG -DKERNEL -D_KERNEL -Dmc68020 -Dsun3  ../../../../arch/sun3/sun3/machdep.c
	../../../../arch/sun3/sun3/machdep.c: In function `peek_word':
	../../../../arch/sun3/sun3/machdep.c:1198: warning: passing arg 1 of `setjmp' from incompatible pointer type
	../../../../arch/sun3/sun3/machdep.c: In function `peek_byte':
	../../../../arch/sun3/sun3/machdep.c:1214: warning: passing arg 1 of `setjmp' from incompatible pointer type
	cc -msoft-float -O -c  -I. -I../.. -I../../../.. -I../../../../sys -I../../../../arch -DNEWCONFIG -DMACHINE_NONCONTIG -DSUN3_50 -DSUN3_60 -DSUN3_110 -DSUN3_160 -DSUN3_260 -DGENERIC -DFPU_EMULATE -DTIMEZONE="0x12c" -DDST="2" -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DKTRACE -DDDB -DSYMTAB_SPACE="0x17ed0" -DNFSSERVER -DNFSCLIENT -DFFS -DFDESC -DFIFO -DKERNFS -DNULLFS -DPROCFS -DUNION -DINET -DNFS_BOOT_RWSIZE="0x400" -DCOMPAT_SUNOS -DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_43 -DTCP_COMPAT_42 -DCONTEXT_DEBUG -DPMAP_DEBUG -DEXEC_DEBUG -DDIAGNOSTIC -DSCSIDEBUG -DKERNEL -D_KERNEL -Dmc68020 -Dsun3  ../../../../arch/sun3/sun3/fpu.c
	../../../../arch/sun3/sun3/fpu.c: In function `fpu_probe':
	../../../../arch/sun3/sun3/fpu.c:126: warning: passing arg 1 of `setjmp' from incompatible pointer type

which I figure are probably not too serious.  But then when the compile
is done, I get

	sh ../../../../conf/newvers.sh
	cc -msoft-float -O  -I. -I../.. -I../../../.. -I../../../../sys -I../../../../arch -DNEWCONFIG -DMACHINE_NONCONTIG -DSUN3_50 -DSUN3_60 -DSUN3_110 -DSUN3_160 -DSUN3_260 -DGENERIC -DFPU_EMULATE -DTIMEZONE="0x12c" -DDST="2" -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DKTRACE -DDDB -DSYMTAB_SPACE="0x17ed0" -DNFSSERVER -DNFSCLIENT -DFFS -DFDESC -DFIFO -DKERNFS -DNULLFS -DPROCFS -DUNION -DINET -DNFS_BOOT_RWSIZE="0x400" -DCOMPAT_SUNOS -DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_43 -DTCP_COMPAT_42 -DCONTEXT_DEBUG -DPMAP_DEBUG -DEXEC_DEBUG -DDIAGNOSTIC -DSCSIDEBUG -DKERNEL -D_KERNEL -Dmc68020 -Dsun3 -c vers.c
	loading netbsd
	ld -S -n -N -e start -T 0E004000 -o netbsd ${SYSTEM_OBJ} vers.o ../libkern.a
	ld: ../libkern.a: No such file or directory
	size: netbsd: No such file or directory
	*** Error code 1 (ignored)
	*** Error code 1
	
	Stop.

I assume this is YA aspect of it being designed for cross-compilation,
but before trying to guess at what needs to be changed to make it build
libkern the way it should (and with a correct path, something better
than ../libkern.a), I thought I'd ask here, since at least one person
has claimed to be able to build Sun-3 kernels native....

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu