This is the beginnings of a alternative version of the PDP-7 Unix
system which corresponds to a later development point, around mid-1971, where the system had lost the "dd" directory and gained . and .. entries. This is close to the system as described in http://www.tuhs.org/Archive/PDP-11/Distributions/research/McIlroy_v0/UnixEditionZero.txt except there are no pathnames. To use this version: cd build; make alt; make altrun
This commit is contained in:
+41
-2
@@ -22,16 +22,29 @@ BINARIES=../binaries/
|
||||
|
||||
all: cmd others a.rim image.fs copybinaries
|
||||
|
||||
# Make alternative everything: no dd but . and ..
|
||||
alt: altcmd altothers alta.rim altimage.fs
|
||||
|
||||
# The run rule has no dependencies so that the system can be booted easily
|
||||
# and frequently with make run. However, you have to manually make all first!
|
||||
run:
|
||||
$(PDP7) unixv0.simh
|
||||
|
||||
# Alternative run, use the altimage.fs
|
||||
altrun:
|
||||
$(PDP7) altunixv0.simh
|
||||
|
||||
# Warm boot Unix kernel: boots into init and a login prompt
|
||||
a.rim:
|
||||
$(AS) -f rim -o a.rim $(SYSSRC)/sop.s $(SYSSRC)/s[1-8].s
|
||||
$(AS) -n -f list -o a.lst $(SYSSRC)/sop.s $(SYSSRC)/s[1-8].s
|
||||
|
||||
# Alternative kernel: no dd, but . and ..
|
||||
alta.rim:
|
||||
$(AS) -f rim -o alta.rim -DNO_DD $(SYSSRC)/sop.s $(SYSSRC)/s[1-8].s
|
||||
$(AS) -n -f list -o alta.lst -DNO_DD $(SYSSRC)/sop.s $(SYSSRC)/s[1-8].s
|
||||
|
||||
|
||||
# Cold boot Unix kernel: attempts to build a minimal filesystem.
|
||||
# Don't use this one!
|
||||
coldboot:
|
||||
@@ -40,16 +53,22 @@ coldboot:
|
||||
|
||||
# Filesystem image
|
||||
image.fs: cmd others
|
||||
$(MKFS) --format simh proto
|
||||
$(MKFS) proto
|
||||
$(FSCK) image.fs
|
||||
|
||||
# Alternate filesystem image: . and .. but no dd
|
||||
altimage.fs: altcmd altothers
|
||||
$(MKFS) -1 -2 -3 -o altimage.fs altproto
|
||||
$(FSCK) -3 altimage.fs
|
||||
|
||||
|
||||
copybinaries:
|
||||
mkdir -p $(BINARIES)
|
||||
cp image.fs $(BINARIES)
|
||||
cp a.rim $(BINARIES)
|
||||
|
||||
clean:
|
||||
rm -f a.rim image.fs a.lst n.out
|
||||
rm -f a.rim image.fs a.lst n.out altimage.fs alta.rim alta.lst
|
||||
rm -rf $(BINDIR)
|
||||
rm -rf $(TESTDIR)
|
||||
rm -rf $(BINARIES)
|
||||
@@ -62,6 +81,11 @@ cmd: dirs $(BINDIR)/as $(BINDIR)/cat $(BINDIR)/check $(BINDIR)/chmod \
|
||||
$(BINDIR)/chown $(BINDIR)/chrm $(BINDIR)/cp $(BINDIR)/ds $(BINDIR)/ed \
|
||||
$(BINDIR)/init
|
||||
|
||||
# Alternate commands: no dd, but . and ..
|
||||
altcmd: dirs $(BINDIR)/as $(BINDIR)/cat $(BINDIR)/check $(BINDIR)/chmod \
|
||||
$(BINDIR)/chown $(BINDIR)/altchrm $(BINDIR)/cp $(BINDIR)/ds $(BINDIR)/ed \
|
||||
$(BINDIR)/altinit
|
||||
|
||||
$(BINDIR)/as: $(CMDSRC)/as.s
|
||||
$(AS) $(ASARGS) -o $(BINDIR)/as $(CMDSRC)/as.s
|
||||
|
||||
@@ -80,6 +104,9 @@ $(BINDIR)/chown: $(CMDSRC)/chown.s
|
||||
$(BINDIR)/chrm: $(CMDSRC)/chrm.s
|
||||
$(AS) $(ASARGS) -o $(BINDIR)/chrm $(CMDSRC)/chrm.s
|
||||
|
||||
$(BINDIR)/altchrm: $(OTHERSRC)/wktchrm.s
|
||||
$(AS) $(ASARGS) -o $(BINDIR)/altchrm -DNO_DD $(OTHERSRC)/wktchrm.s
|
||||
|
||||
$(BINDIR)/cp: $(CMDSRC)/cp.s
|
||||
$(AS) $(ASARGS) -o $(BINDIR)/cp $(CMDSRC)/cp.s
|
||||
|
||||
@@ -92,10 +119,19 @@ $(BINDIR)/ed: $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s
|
||||
$(BINDIR)/init: $(CMDSRC)/init.s
|
||||
$(AS) $(ASARGS) -o $(BINDIR)/init $(CMDSRC)/init.s
|
||||
|
||||
# Alternative init: no dd directory
|
||||
$(BINDIR)/altinit: $(CMDSRC)/init.s
|
||||
$(AS) $(ASARGS) -DNO_DD -o $(BINDIR)/altinit $(CMDSRC)/init.s
|
||||
|
||||
# The commands that did not come from the scans
|
||||
others: dirs $(BINDIR)/sh $(BINDIR)/wktcat $(BINDIR)/wktcp $(BINDIR)/date \
|
||||
$(BINDIR)/ln $(BINDIR)/ls $(BINDIR)/mv $(BINDIR)/stat
|
||||
|
||||
# Alternative other commands: no dd, but . and ..
|
||||
altothers: dirs $(BINDIR)/sh $(BINDIR)/wktcat $(BINDIR)/wktcp $(BINDIR)/date \
|
||||
$(BINDIR)/ln $(BINDIR)/altls $(BINDIR)/mv $(BINDIR)/stat
|
||||
|
||||
|
||||
$(BINDIR)/sh: $(OTHERSRC)/pbsh.s
|
||||
$(AS) $(ASARGS) -o $(BINDIR)/sh $(OTHERSRC)/pbsh.s
|
||||
|
||||
@@ -114,6 +150,9 @@ $(BINDIR)/ln: $(OTHERSRC)/wktln.s
|
||||
$(BINDIR)/ls: $(OTHERSRC)/wktls.s
|
||||
$(AS) $(ASARGS) -o $(BINDIR)/ls $(OTHERSRC)/wktls.s
|
||||
|
||||
$(BINDIR)/altls: $(OTHERSRC)/wktls.s
|
||||
$(AS) $(ASARGS) -o $(BINDIR)/altls -DNO_DD $(OTHERSRC)/wktls.s
|
||||
|
||||
$(BINDIR)/mv: $(OTHERSRC)/wktmv.s
|
||||
$(AS) $(ASARGS) -o $(BINDIR)/mv $(OTHERSRC)/wktmv.s
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# Alternative prototype file for PDP-7 Unix filesystem layout
|
||||
#
|
||||
# This one has . and .. but no dd directory entries
|
||||
#
|
||||
# Entries are one of:
|
||||
# filename f[r-][w-][r-][w-] uid local_file_to_insert
|
||||
# dirname d[r-][w-][r-][w-] uid [inumber]
|
||||
# device i[r-][w-][r-][w-] uid inumber
|
||||
# link l---- inumber
|
||||
#
|
||||
# The top directory's name is ignored
|
||||
# Numeric values are in decimal
|
||||
# Contents of each directory ends with a $ on a line by itself
|
||||
# Format was inspired by 6th Edition mkfs
|
||||
#
|
||||
/ drwr- -1 2
|
||||
system drwr- -1 3
|
||||
ttyin irwr- -1 6
|
||||
keyboard irwr- -1 7
|
||||
pptin irwr- -1 8
|
||||
ttyout irwr- -1 11
|
||||
display irwr- -1 12
|
||||
pptout irwr- -1 13
|
||||
as frwr- -1 bin/as
|
||||
cat frwr- -1 bin/cat
|
||||
chmod frwr- -1 bin/chmod
|
||||
chown frwr- -1 bin/chown
|
||||
chrm frwr- -1 bin/altchrm
|
||||
cp frwr- -1 bin/cp
|
||||
date frwr- -1 bin/date
|
||||
ds frwr- -1 bin/ds
|
||||
ed frwr- -1 bin/ed
|
||||
init frwr- -1 bin/altinit
|
||||
ln frwr- -1 bin/ln
|
||||
ls frwr- -1 bin/altls
|
||||
mv frwr- -1 bin/mv
|
||||
password frw-- -1 fs/password
|
||||
sh frwr- -1 bin/sh
|
||||
stat frwr- -1 bin/stat
|
||||
$
|
||||
ken drwr- 10
|
||||
system l---- 3
|
||||
hello frwr- 10 fs/hello
|
||||
$
|
||||
dmr drwr- 12
|
||||
system l---- 3
|
||||
$
|
||||
@@ -0,0 +1,12 @@
|
||||
set cpu 8k
|
||||
set cpu eae
|
||||
set cpu history=100
|
||||
show cpu
|
||||
|
||||
set tti unix
|
||||
set rb ena
|
||||
att rb altimage.fs
|
||||
show dev
|
||||
|
||||
load -S alta.rim
|
||||
dep pc 0100
|
||||
Reference in New Issue
Block a user