SunOS 3.5

Aus Knowledgebase
Zur Navigation springen Zur Suche springen

Installing SunOS on a Sun3:

SunOS 3.5 runs on classic Sun3 like the 3/160, 3/110, 3/75, 3/60, or 3/50. It does not support the sun3x kernel architecture. It's old and rather simple. There are no shared libraries. It deviates from more modern SunOS 4 in one very important area: It does not netboot like a modern SunOS. It requires a special "nd" server to provide network storage. SunOS 3.5 will be able to use NFS shares just fine, but can't use them for booting over the network.

Sun 3/160

SunOS will often not properly with with a serial terminal set to 9600 8N1, but requires 7N1.


set boot device to ie() in the PROM:

>q 019
EEPROM 019: 73? 69
EEPROM 01A: 64? 65
EEPROM 01B: 00? ----Enter Control-C to exit

>EEPROM: Using RS232 A port.
Selftest Completed.

Sun Workstation, Model Sun-3/160M.
ROM Rev 3.0, 16MB memory installed, Serial #9944.
Ethernet address 8:0:20:1:7C:32, Host ID 110026D8.


Testing 16 Megabytes of Memory ... Completed.

Auto-boot in progress...

EEPROM boot device...Boot: sd(0,0,0) 

Device not found
>b ie()
Boot: ie(0,0,0) 
Using IP Address 192.168.2.22 = C0A80216
Booting from tftp server at 192.168.2.1 = C0A80201
Downloaded 31056 bytes from tftp server.

Boot: ie(0,0,0)vmunix
Size: 494840+80288+106616 bytes
Sun UNIX 4.2 Release 3.5EXPORT (GENERIC) #1: Tue Dec 1 19:03:42 PST 1987
Copyright (c) 1986 by Sun Microsystems, Inc.
mem = 16384K (0x1000000)
avail mem = 15761408
Ethernet address = 8:0:20:1:7c:32
si0 at vme24d16 200000 vec 0x40                                              
sd0 at si0 slave 0                                                           
sd1 at si0 slave 1                                                           
sd2 at si0 slave 8                                                           
sd3 at si0 slave 9                                                           
st0 at si0 slave 32                                                          
st1 at si0 slave 40                                                          
zs0 at obio 20000 pri 3                                                      
zs1 at obio 0 pri 3                                                          
mti0 at vme16d16 620 vec 0x88                                                
ie0 at obio c0000 pri 3                                                      
bwtwo0 at obmem ff000000 pri 4                              
bwtwo0: resolution 1152 x 900                               
sd0:  scsi bus failure                                      
si0:  sd0, unit offline                                     
sd0:  scsi bus failure                                      
si0:  sd0, unit offline                                     
root on nd0                                       
using 198 buffers containing 1622016 bytes of main memory
?A?N?NG:???D?cloc??ot?i?iti?li?e?--??H??K?AND??? |Ԡ?HŠDA??!??
                                                                 ???'t?o?e?c?ec
?li?t?file:??etc?f?t??
                       ?e?oot?f?ile?...?el?!?
                                             ??
# 
# ls
.MINIROOT       bin             etc             tmp
.profile        boot            lost+found      usr
a               dev             stand           vmunix

partition a hard disk using SunOS 4 format. Partitioning and disklabeling using Solaris does not work for SunOS 3. Use the scsiinfo tools on SunOS to get the disk parameters.

root@gepard:~# ./scsiinfo-4.6-sunos4.1.3U1 -f /dev/rsd2c

Vendor:                      DEC
Model:                       RZ26     (C) DEC
Revision:                    T386
Serial:                      412225157560
Device Type:                 Disk
Data Transfer Width(s):      8
Supported Features:          SYNC_SCSI LINK_CMD TAG_QUEUE
Formatted Capacity:          2050860 sectors (1.0 GB)
Sector size:                 512 bytes
Physical Cylinders:          2570
Heads:                       14
Sectors per track (Avg.):    57
Tracks per zone:             14
Alternate Sectors per zone:  14
Alternate Tracks per volume: 0
Rotational speed:            5400 rpm
Cache:                       Read-Only

data cyl: 2568
alt cyl: 2
phys cal: 2570

after installing the system:

./MAKEDEV std sd0 sd1 sd2 pty0 mti0 

mv /etc/ypbind /etc/ypbind.save

setenv TERM vt100
setenv PATH .:/usr/local/bin:/usr/ucb:/bin:/usr/bin:/etc:/usr/etc:/usr/5bin

add to /etc/rc.local:

# set default route
echo 'setting default route' > /dev/console
route add default 192.168.2.253 1



amelie:$ telnet john
Trying 192.168.2.22...
Connected to john
Escape character is '^]'.


4.2 BSD UNIX (john)

login: root
Last login: Sat Mar  9 21:35:33 from 192.168.2.111
Sun UNIX 4.2 Release 3.5EXPORT (JOHN_2019) #2: Sun Feb 7 11:10:47 PST 1988
Copyright (c) 1986 by Sun Microsystems, Inc.
mem = 16384K (0x1000000)
avail mem = 15695872
Ethernet address = 8:0:20:1:7c:32
si0 at vme24d16 200000 vec 0x40 
sd0 at si0 slave 0
sd1 at si0 slave 1
sd2 at si0 slave 8
sd3 at si0 slave 9
st0 at si0 slave 32
st1 at si0 slave 40
zs0 at obio 20000 pri 3 
zs1 at obio 0 pri 3 
mti0 at vme16d16 620 vec 0x88 
ie0 at obio c0000 pri 3 
bwtwo0 at obmem ff000000 pri 4 
bwtwo0: resolution 1152 x 900
sd0:  scsi bus failure
si0:  sd0, unit offline
sd0:  scsi bus failure
si0:  sd0, unit offline
root on nd0
using 198 buffers containing 1622016 bytes of main memory
# uname -a
john john 4.2BSD vm sun

gcc-2.5.8

./configure --enable-languages=c m68k-sun-sunos3.5

build gcc in steps:

make "CC=/usr/local/bin/gcc" LANGUAGES=c

make stage1

make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O"

make stage2

make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES="c proto c++"

make compare

make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES="c proto c++"

______________

flex-2.5.4

change -g to -O in Makefile

m4-1.4

change -g to -O in Makefile

gcc-2.5.8

X11R4

use Sun cc. Just set OS version to 3.5 in config/sun.cf and make World.
has problesm building/installing server/ddx/sun
cc -c -O   -I../../../. -I. -I../mfb -I../mi -I../../include -I../../.././X11  -DXDMCP  -DSHAPE -DMITSHM -DMULTIBUFFER -DMITMISC    sunCG3C.c
"sunCG3C.c", line 463: CG3AC_MONOLEN undefined
"sunCG3C.c", line 464: CG3AC_ENBLEN undefined
"sunCG3C.c", line 480: CG3BC_MONOLEN undefined
"sunCG3C.c", line 481: CG3BC_ENBLEN undefined
*** Error code 1

remove all references to CG3 and CG6 in the Makefile. Build server without support for these. We don't need them, because cg3 and cg6 are sbus cards and we don't have those. Also check sunInit.c for init and create of CG3 and CG6.


sed-3.0.2

sed/utils.h:
#include <sys/types.h>


make-3.75

IOT trap (core dumped)
copy make to /usr/local/bin/make by hand.


gawk-2.03: FAIL

use gcc
FAILS

gzip-1.2.4a

cp install-sh /usr/local/bin/install from gawk-3.0.6


bison-1.28

--disable-nls


unzip-5.52:

make sunos3
fileio.c:
#include <missing_strerror.h>


xpm-3.4k:

use gcc
ajdust path to install to /usr, not /usr/local

grep-2.4.2:

replace strcoll with strcmp

+/* Define to `int' if <sys/types.h> does not define. */
+#undef mode_t

typedef int mode_t;


make-3.77:

glob/fnmatch.c:
#include <sys/types.h>
#define NULL 0

function.c and job.c:
#ifndef remove
#define remove unlink
#endif

see if this works. remove() should remove both files and directories. unlink() only removes files.


gawk-3.0.6:

/usr/local/lib/gcc-lib/m68k-sun-sunos3.5/2.5.8/include/time.h:16: redefinition of `struct tm'
check for #include <time.h> and change to #include <sys/time.h>

time.h and sys/time.h cannot both be included.
#include only <sys/time.h>. It will automatically include <time.h>.



bash-2.02.1:

lib/readline/input.c
lib/readline/parens.c
SunOS 3.5 does not declare FD_SET in <sys/types.h>
create <missing_fd.h> and include here.


gcc-2.8.1: FAIL

in auto-config.h
/* Define if you have the <stddef.h> header file.  */

#undef HAVE_STDDEF_H

/* Define if you have the <stdlib.h> header file.  */
#undef HAVE_STDLIB_H
FAILS. xgcc can't assemble properly.


texinfo-4.8:

use /usr/local/bin/ksh

add to lib/strdup.c:
#include <sys/types.h>
#define NULL 0
needs #include <missing_strstr.h>

remove the idef _sun, which includes locale.h from lib/gettext.h


libiconv-1.9.2:

--disable-nls
srclib/setenv.c:
srclib/unsetenv.c:
add #include <sys/types.h>
use /usr/local/bin/ksh


gcc-2.7.2.3

--enable-languages=c,c++ m68k-sun-sunos3.5
will use cc first.
change Makefile to use gcc

compile error in stage1:
cp/errfn.c:
extern int sprintf (char *, const char *, ...);


tin-2.4.4:

gcc -DHAVE_CONFIG_H -I. -I../include -I../pcre -I../pcre -DLOCALEDIR=\"/usr/local/share/locale\" -I../include   -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506L -O2  -c ./curses.c
./curses.c: In function `Raw':
./curses.c:622: `ECHO' undeclared (first use this function)
./curses.c:622: (Each undeclared identifier is reported only once
./curses.c:622: for each function it appears in.)
make[1]: *** [curses.o] Error 1


ioctl.h:#define		ECHO		0x00000008	/* echo input */


#define		CBREAK		0x00000002	/* half-cooked mode */
#define		ECHO		0x00000008	/* echo input */

SunOS 3.5 doesn't know about h_addr_list. replace all h_addr_list[0] with h_addr:

header.c
nntplib.c
curses.c

add #include <missing_fd.h> to curses.c

add to pcre/pcre_globals.c:

#include <sys/types.h>
extern void *malloc(size_t);
extern void *realloc(void *, size_t);
extern void free(void *);


SunOS 3.5 defines this in /etc/services:

"untp		119/tcp		usenet"
change untp to nntp.

change autoconf.h:

#define TOLOWER_BROKEN 1
#define TOUPPER_BROKEN 1