From 8d69dd6d1313ac7408f136e7e3cf29bbe5efe657 Mon Sep 17 00:00:00 2001 From: Warren Toomey Date: Thu, 24 Mar 2016 17:38:27 +1000 Subject: [PATCH] Changed the build so that we boot via Phil's bootstrap code. --- build/Makefile | 24 +++++++++++++++--------- build/unixv0.simh | 4 ++-- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/build/Makefile b/build/Makefile index 0d6db1a..4879aad 100644 --- a/build/Makefile +++ b/build/Makefile @@ -22,7 +22,7 @@ TESTDIR=tests BINARIES=../binaries/ -all: cmd others a.rim image.fs +all: cmd others a.ptr a.rim image.fs # Make alternative everything: no dd but . and .. alt: altcmd altothers alt/a.rim alt/image.fs @@ -42,23 +42,28 @@ dist: all alt mkdir -p $(BINARIES)/alt cp image.fs $(BINARIES)/orig cp a.rim $(BINARIES)/orig + cp a.ptr $(BINARIES)/orig cp unixv0.simh $(BINARIES)/orig cp alt/image.fs $(BINARIES)/alt - cp alt/a.rim $(BINARIES)/alt + cp alt/a.ptr $(BINARIES)/alt cp alt/unixv0.simh $(BINARIES)/alt # 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 +a.ptr: + $(AS) -f ptr -o a.ptr $(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 .. -alt/a.rim: - $(AS) -f rim -o alt/a.rim $(SYSSRC)/sop.s $(SYSSRC)/s1.s \ +alt/a.ptr: + $(AS) -f ptr -o alt/a.ptr $(SYSSRC)/sop.s $(SYSSRC)/s1.s \ $(ALTSRC)/s2.s $(SYSSRC)/s[3-8].s $(AS) -n -f list -o alt/a.lst $(SYSSRC)/sop.s $(SYSSRC)/s1.s \ $(ALTSRC)/s2.s $(SYSSRC)/s[3-8].s +# Phil's bootstrap code +a.rim: $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s + $(AS) -f rim -o a.rim $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s + # Cold boot Unix kernel: attempts to build a minimal filesystem. # Don't use this one! coldboot: @@ -67,16 +72,17 @@ coldboot: # Filesystem image image.fs: cmd others - $(MKFS) proto + $(MKFS) -k a.ptr proto $(FSCK) image.fs # Alternate filesystem image: . and .. but no dd alt/image.fs: altcmd altothers - $(MKFS) -1 -2 -3 -o alt/image.fs alt/proto + $(MKFS) -1 -2 -3 -o alt/image.fs -k alt/a.ptr alt/proto $(FSCK) -3 alt/image.fs clean: - rm -f a.rim image.fs a.lst n.out alt/image.fs alt/a.rim alt/a.lst + rm -f a.rim image.fs a.lst n.out a.ptr + rm -f alt/image.fs alt/a.ptr alt/a.lst rm -rf $(BINDIR) $(TESTDIR) rm -rf $(BINARIES) diff --git a/build/unixv0.simh b/build/unixv0.simh index bde540d..22271ed 100644 --- a/build/unixv0.simh +++ b/build/unixv0.simh @@ -25,7 +25,7 @@ set dt disa # show device settings: show dev -# load and start the system: +# load and run the bootstrap code load -S a.rim -dep pc 0100 +dep pc 010000 go