Unix V7

Session captured from a Nexys-2 board configured with an 11/45, RH11 + RP06, console, and extra KL11. The RP06 image was created from the original V7 distribution tape using SIMH.
In this session, we see how the extra KL11 serial controller is configured into the kernel; after that, the kernel is recompiled, some settings are changed, and the system is rebooted with the new kernel.

Hello, world [t44]: cpu 11/45
boot from rp:
boot
Boot
: hp(0,0)unix
mem = 177344
# RESTRICTED RIGHTS: USE, DUPLICATION, OR DISCLOSURE
IS SUBJECT TO RESTRICTIONS STATED IN YOUR CONTRACT WITH
WESTERN ELECTRIC COMPANY, INC.
WED DEC 31 19:04:22 EST 1969
login: root
Password:
You have mail.
# cd /usr/sys/conf
# ls
c.c
c.o
hphtconf
hptmconf
l.o
l.s
makefile
mch.o
mch.s
mch0.s
mkconf
mkconf.c
rkhtconf
rktmconf
rp1conf
rphtconf
rptmconf
tconf
# cp hphtconf myconf
# cat myconf
hp
root hp 0
swap hp 1
swplo 0
nswap 8778
ht
# ed myconf
45
p
ht
s/ht/1kl/
w
46
1,$p
hp
root hp 0
swap hp 1
swplo 0
nswap 8778
1kl
q
# cd ../dev
# ed kl.c
3629
1,40p
/*
 *   KL/DL-11 driver
 */
#include "../h/param.h"
#include "../h/conf.h"
#include        "../h/dir.h"
#include "../h/user.h"
#include "../h/tty.h"
#include "../h/systm.h"
/* base address */
#define KLADDR  ((struct device *)0177560)      /* console */
#define KLBASE  ((struct device *)0176500)      /* kl and dl11-a */
#define DLBASE  ((struct device *)0175610)      /* dl-e */
#define NKL11   1
#define NDL11   0
#define DSRDY   02
#define RDRENB  01
#define DLDELAY 4       /* Extra delay for DL's (double buff) */
#define NL1     000400
#define NL2     001000
#define CR2     020000
#define FF1     040000
#define TAB1    002000
struct  tty kl11[NKL11+NDL11];
int     klstart();
int     ttrstrt();
char    partab[];
struct device {
        int     rcsr;
        int     rbuf;
        int     tcsr;
        int     tbuf;
};
klopen(dev, flag)
dev_t dev;
15
#define NKL11   1
s/11 1/11 2/
p
#define NKL11   2
w
3629
q
# cd ../conf
# ls
c.c
c.o
hphtconf
hptmconf
l.o
l.s
makefile
mch.o
mch.s
mch0.s
mkconf
mkconf.c
myconf
rkhtconf
rktmconf
rp1conf
rphtconf
rptmconf
tconf
# ./mkconf <myconf
console at 60
clock at 100
clock at 104
parity at 114
hp at 254
kl at 300
# make all
cd ../sys; cc -c -O *.c; mklib; rm *.o
acct.c:
alloc.c:
clock.c:
fakemx.c:
fio.c:
iget.c:
machdep.c:
main.c:
malloc.c:
nami.c:
pipe.c:
prf.c:
prim.c:
rdwri.c:
sig.c:
slp.c:
subr.c:
sys1.c:
sys2.c:
sys3.c:
sys4.c:
sysent.c:
text.c:
trap.c:
ureg.c:
cd ../dev; cc -c -O *.c; mklib; rm *.o
bio.c:
cat.c:
dc.c:
dh.c:
dhdm.c:
dhfdm.c:
dkleave.c:
dn.c:
dsort.c:
du.c:
dz.c:
hp.c:
ht.c:
kl.c:
mem.c:
mx1.c:
mx2.c:
partab.c:
pk0.c:
pk1.c:
pk2.c:
pk3.c:
rf.c:
rk.c:
rl.c:
rp.c:
sys.c:
tc.c:
tm.c:
tty.c:
vp.c:
vs.c:
# make
as - -o l.o l.s
cc  -c c.c
ld -o unix -X -i l.o mch.o c.o ../sys/LIB1 ../dev/LIB2
# ls
c.c
c.o
hphtconf
hptmconf
l.o
l.s
makefile
mch.o
mch.s
mch0.s
mkconf
mkconf.c
myconf
rkhtconf
rktmconf
rp1conf
rphtconf
rptmconf
tconf
unix
# mv /unix /ounix
# cp unix /
# cd /dev
# /etc/mknod tty00 c 0 1
# ls -als
total 4
   1 drwxr-xr-x 2 root      304 Dec 31 19:20 .
   1 drwxr-xr-x 8 root      288 Dec 31 19:19 ..
   0 crw--w--w- 1 root    0,  0 Dec 31 19:20 console
   5 crw-r--r-- 1 bin     8,  1 Jan 10 15:40 kmem
   2 -rw-rw-r-- 1 bin       775 Jan 10 15:26 makefile
   4 crw-r--r-- 1 bin     8,  0 Jan 10 15:39 mem
   2 brw-rw-rw- 1 root    3,  0 Dec 31 19:00 mt0
   7 crw-rw-rw- 1 root   12,128 Dec 31 19:00 nrmt0
   5 crw-rw-rw- 1 bin     8,  2 Dec 31 19:01 null
   6 crw-rw-rw- 1 root   12,  0 Dec 31 19:00 rmt0
   3 brw-r--r-- 1 root    6,  0 Dec 31 19:02 rp0
   4 brw-r--r-- 1 root    6,  7 Dec 31 19:01 rp3
   7 crw-r--r-- 1 root   14,  0 Dec 31 19:00 rrp0
   8 crw-r--r-- 1 root   14,  7 Dec 31 19:00 rrp3
   4 brw-r--r-- 1 root    6,  1 Dec 31 19:00 swap
   9 crw-rw-rw- 1 bin    17,  0 Jan 10 15:40 tty
   1 crw-rw-r-- 1 root    0,  1 Dec 31 19:20 tty00
# cd /etc
# ed ttys
266
1
14console
00tty00
s/00/14/
p
14tty00
w
266
q
# sync
# sync
#
Hello, world [t44]: cpu 11/45
boot from rp:
boot
Boot
: hp(0,0)unix
mem = 178816
# RESTRICTED RIGHTS: USE, DUPLICATION, OR DISCLOSURE
IS SUBJECT TO RESTRICTIONS STATED IN YOUR CONTRACT WITH
WESTERN ELECTRIC COMPANY, INC.
WED DEC 31 19:26:15 EST 1969
login: root
Password:
You have mail.
# ed /etc/passwd
141
1,$p
root:VwL97VCAx1Qhs:0:1::/:
daemon:x:1:1::/:
sys::2:2::/usr/sys:
bin::3:3::/bin:
uucp::4:4::/usr/lib/uucp:/usr/lib/uucico
dmr::7:3::/usr/dmr:
a
sytse::100:100::/usr/sytse:
^D
?
1,$p
root:VwL97VCAx1Qhs:0:1::/:
daemon:x:1:1::/:
sys::2:2::/usr/sys:
bin::3:3::/bin:
uucp::4:4::/usr/lib/uucp:/usr/lib/uucico
dmr::7:3::/usr/dmr:
sytse::100:100::/usr/sytse:
w
169
q
# mkdir /usr/sytse
# chown sytse /usr/sytse
# who
root     console Dec 31 19:26
sytse    tty00   Dec 31 19:27
# who am i
root     console Dec 31 19:26
#