From 6be8b181ae864b63ffdfef751b8e5d435bd75277 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Wed, 21 Feb 2018 13:04:55 +0100 Subject: [PATCH] Split off KS10 stuff into separate script. --- Makefile | 12 ++- bin/{ => ks10}/_/@.ddt | Bin bin/{ => ks10}/_/@.stink | Bin bin/{ => ks10}/_/@.teco | Bin bin/{ => ks10}/_/bt.rp06 | Bin bin/{ => ks10}/_/dskdmp.rp06 | Bin bin/{ => ks10}/_/its.rp06 | Bin bin/{ => ks10}/_/ram.ram | Bin bin/{ => ks10}/_/salv.rp06 | Bin bin/{ => ks10}/boot/dskdmp.rp06 | Bin bin/{ => ks10}/boot/ram.262 | Bin bin/{ => ks10}/boot/salv.rp06 | Bin bin/{ => ks10}/sys/ts.dump | Bin build/build.tcl | 133 ++++------------------------- build/klh10/build.tcl | 5 +- build/ks10/include.tcl | 145 ++++++++++++++++++++++++++++++++ build/simh/build.tcl | 3 +- 17 files changed, 171 insertions(+), 127 deletions(-) rename bin/{ => ks10}/_/@.ddt (100%) rename bin/{ => ks10}/_/@.stink (100%) rename bin/{ => ks10}/_/@.teco (100%) rename bin/{ => ks10}/_/bt.rp06 (100%) rename bin/{ => ks10}/_/dskdmp.rp06 (100%) rename bin/{ => ks10}/_/its.rp06 (100%) rename bin/{ => ks10}/_/ram.ram (100%) rename bin/{ => ks10}/_/salv.rp06 (100%) rename bin/{ => ks10}/boot/dskdmp.rp06 (100%) rename bin/{ => ks10}/boot/ram.262 (100%) rename bin/{ => ks10}/boot/salv.rp06 (100%) rename bin/{ => ks10}/sys/ts.dump (100%) create mode 100644 build/ks10/include.tcl diff --git a/Makefile b/Makefile index f8ddc5e2..bcd399b8 100644 --- a/Makefile +++ b/Makefile @@ -11,13 +11,10 @@ SRC = system syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \ DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc chprog BIN = sys2 emacs _teco_ lisp liblsp alan inquir sail comlap c decsys moon -# These directories are put on the minsys tape. -MINSYS = _ sys - # These files are used to create bootable tape images. -RAM = bin/boot/ram.262 -NSALV = bin/boot/salv.rp06 -DSKDMP = bin/boot/dskdmp.rp06 +RAM = bin/ks10/boot/ram.262 +NSALV = bin/ks10/boot/salv.rp06 +DSKDMP = bin/ks10/boot/dskdmp.rp06 KLH10=${PWD}/tools/klh10/tmp/bld-ks-its/kn10-ks-its SIMH=${PWD}/tools/simh/BIN/pdp10 @@ -33,7 +30,8 @@ out/rp0.dsk: build/simh/init out/minsys.tape out/salv.tape out/dskdmp.tape build out/minsys.tape: $(ITSTAR) mkdir -p out - cd bin; $(ITSTAR) -cf ../$@ $(MINSYS) + cd bin/ks10; $(ITSTAR) -cf ../../$@ _ sys + cd bin; $(ITSTAR) -rf ../$@ sys out/sources.tape: $(ITSTAR) build/$(EMULATOR)/stamp src/syshst/$(H3TEXT) mkdir -p out diff --git a/bin/_/@.ddt b/bin/ks10/_/@.ddt similarity index 100% rename from bin/_/@.ddt rename to bin/ks10/_/@.ddt diff --git a/bin/_/@.stink b/bin/ks10/_/@.stink similarity index 100% rename from bin/_/@.stink rename to bin/ks10/_/@.stink diff --git a/bin/_/@.teco b/bin/ks10/_/@.teco similarity index 100% rename from bin/_/@.teco rename to bin/ks10/_/@.teco diff --git a/bin/_/bt.rp06 b/bin/ks10/_/bt.rp06 similarity index 100% rename from bin/_/bt.rp06 rename to bin/ks10/_/bt.rp06 diff --git a/bin/_/dskdmp.rp06 b/bin/ks10/_/dskdmp.rp06 similarity index 100% rename from bin/_/dskdmp.rp06 rename to bin/ks10/_/dskdmp.rp06 diff --git a/bin/_/its.rp06 b/bin/ks10/_/its.rp06 similarity index 100% rename from bin/_/its.rp06 rename to bin/ks10/_/its.rp06 diff --git a/bin/_/ram.ram b/bin/ks10/_/ram.ram similarity index 100% rename from bin/_/ram.ram rename to bin/ks10/_/ram.ram diff --git a/bin/_/salv.rp06 b/bin/ks10/_/salv.rp06 similarity index 100% rename from bin/_/salv.rp06 rename to bin/ks10/_/salv.rp06 diff --git a/bin/boot/dskdmp.rp06 b/bin/ks10/boot/dskdmp.rp06 similarity index 100% rename from bin/boot/dskdmp.rp06 rename to bin/ks10/boot/dskdmp.rp06 diff --git a/bin/boot/ram.262 b/bin/ks10/boot/ram.262 similarity index 100% rename from bin/boot/ram.262 rename to bin/ks10/boot/ram.262 diff --git a/bin/boot/salv.rp06 b/bin/ks10/boot/salv.rp06 similarity index 100% rename from bin/boot/salv.rp06 rename to bin/ks10/boot/salv.rp06 diff --git a/bin/sys/ts.dump b/bin/ks10/sys/ts.dump similarity index 100% rename from bin/sys/ts.dump rename to bin/ks10/sys/ts.dump diff --git a/build/build.tcl b/build/build.tcl index 679136ee..f65ac3ab 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -70,66 +70,24 @@ expect_before timeout abort set ip [ip_address [lindex $argv 0]] set gw [ip_address [lindex $argv 1]] -start_nsalv +start_salv + +mark_packs -respond "\n" "mark\033g" -respond "Format pack on unit #" "0" -respond "Are you sure you want to format pack on drive" "y" -respond "Pack no ?" "0\r" -respond "Verify pack?" "n" -respond "Alloc?" "3000\r" -respond "ID?" "foobar\r" respond "DDT" "tran\033g" -respond "onto unit" "0" +respond "#" "0" respond "OK" "y" expect "EOT" respond "DDT" $emulator_escape -start_dskdmp +start_dskdmp_its -respond "DSKDMP" "l\033ddt\r" -expect "\n"; type "t\033its rp06\r" -expect "\n"; type "\033u" -respond "DSKDMP" "m\033salv rp06\r" -expect "\n"; type "d\033its\r" -expect "\n"; type "its\r" -expect "\n"; type "\033g" pdset respond "*" ":login db\r" sleep 1 -type ":ksfedr\r" -respond "File not found" "create\r" -expect -re {Directory address: ([0-7]*)\r\n} -set dir $expect_out(1,string) -type "write\r" -respond "Are you sure" "yes\r" -respond "Which file" "bt\r" -expect "Input from" -sleep 1 -respond ":" ".;bt rp06\r" -respond "!" "quit\r" -expect ":KILL" -shutdown -restart_nsalv +prepare_frontend -expect "\n" -sleep 1 -type "feset\033g" -respond "on unit #" "0" -respond "address: " "$dir\r" -respond "DDT" $emulator_escape -quit_emulator - -start_its -respond "DSKDMP" "its\r" -type "\033g" -pdset - -respond "*" ":login db\r" -sleep 1 -type $emulator_escape -mount_tape "out/sources.tape" type ":dump\r" respond "_" "reload " respond "ARE YOU SURE" "y" @@ -158,55 +116,21 @@ respond "*" ":pdump sys;atsign ddt\r" respond "*" ":kill\r" respond "*" ":midas .;_system;its\r" -respond "MACHINE NAME =" "DB\r" -respond "Configuration?" "RP06\r" +its_switches expect ":KILL" -respond "*" ":midas .;@ ddt_system;ddt\r" -respond "cpusw" "3\r" -respond "New One Proceed" "1\r" -expect ":KILL" +make_ntsddt -respond "*" ":midas .;_kshack;nsalv\r" -respond "Which machine?" "KSRP06\r" -expect ":KILL" +make_salv -respond "*" ":midas .;_system;dskdmp\r" -expect "Configuration" -respond "?" "ksrp06\r" -respond "Assemble BOOT?" "no\r" -expect ":KILL" +make_dskdmp -respond "*" ":midas .;bt_system;dskdmp\r" -expect "Configuration" -respond "?" "ksrp06\r" -respond "Assemble BOOT?" "yes\r" -expect ":KILL" - -respond "*" ":midas sysbin;_kshack;ksfedr\r" -expect ":KILL" -respond "*" ":delete sys;ts ksfedr\r" -respond "*" ":link sys;ts ksfedr,sysbin;ksfedr bin\r" - -respond "*" ":ksfedr\r" -respond "!" "write\r" -respond "Are you sure" "yes\r" -respond "Which file" "bt\r" -expect "Input from" -sleep 1 -respond ":" ".;bt bin\r" -respond "!" "quit\r" -expect ":KILL" +frontend_bootstrap shutdown start_dskdmp -respond "DSKDMP" "l\033ddt\r" -expect "\n"; type "t\033dskdmp bin\r" -expect "\n"; type "\033g" -respond "DSKDMP" "t\033its bin\r" -expect "\n"; type "\033u" -respond "DSKDMP" "m\033nsalv bin\r" -expect "\n"; type "d\033nits\r" + +dump_nits expect "\n"; type "nits\r" expect "\n"; type "\033g" pdset @@ -328,11 +252,7 @@ respond "*" ":midas sys1;_kshack;nsalv\r" respond "machine?" "TS\r" expect "*" -# salv, standalone and timesharing versions -respond "*" ":midas .;_system;salv\r" -respond "time-sharing?" "n\r" -respond "machine?" "ML\r" -expect ":KILL" +# salv, timesharing versions respond "*" ":midas sys1;ts salv_system;salv\r" respond "time-sharing?" "y\r" expect ":KILL" @@ -355,7 +275,7 @@ respond "*" ":midas sys1;ts magfrm_syseng;magfrm\r" expect ":KILL" respond "*" ":midas sysbin;_syseng;dump\r" -respond "WHICH MACHINE?" "DB\r" +dump_switches expect ":KILL" respond "*" ":delete sys;ts dump\r" respond "*" ":link sys;ts dump,sysbin;dump bin\r" @@ -1514,28 +1434,7 @@ respond "*" ":midas sys3;ts balanc_alan;balanc\r" expect ":KILL" respond "*" ":link sys3;ts movdir,sys3;ts balanc\r" -# ndskdmp tape -respond "*" ":link kshack;good ram,.;ram ram\r" -respond "*" ":link kshack;ddt bin,.;@ ddt\r" -respond "*" $emulator_escape -create_tape "out/ndskdmp.tape" -type ":kshack;mtboot\r" -respond "Write a tape?" "y" -respond "Rewind tape first?" "y" -respond "Include DDT?" "y" -respond "Input file" ".;dskdmp bin\r" -expect ":KILL" - -# make nnsalv.tape - -respond "*" $emulator_escape -create_tape "out/nnsalv.tape" -type ":kshack;mtboot\r" -respond "Write a tape?" "y" -respond "Rewind tape first?" "y" -respond "Include DDT?" "y" -respond "Input file" ".;nsalv bin\r" -expect ":KILL" +bootable_tapes # make output.tape diff --git a/build/klh10/build.tcl b/build/klh10/build.tcl index a2ab6fd9..ad105f06 100644 --- a/build/klh10/build.tcl +++ b/build/klh10/build.tcl @@ -3,7 +3,7 @@ cd build/klh10 set emulator_prompt "KLH10" set emulator_escape "\034" -proc start_nsalv {} { +proc start_salv {} { uplevel #0 {spawn ./kn10-ks-its nsalv.ini} expect "EOF" respond "KLH10#" "go\r" @@ -11,7 +11,7 @@ proc start_nsalv {} { proc restart_nsalv {} { quit_emulator - start_nsalv + start_salv } proc start_dskdmp {} { @@ -51,4 +51,5 @@ proc initialize_comsat {} { respond "*" ":kill\r" } +source ../ks10/include.tcl source ../build.tcl diff --git a/build/ks10/include.tcl b/build/ks10/include.tcl new file mode 100644 index 00000000..376f3783 --- /dev/null +++ b/build/ks10/include.tcl @@ -0,0 +1,145 @@ +proc start_dskdmp_its {} { + start_dskdmp + + respond "DSKDMP" "l\033ddt\r" + expect "\n"; type "t\033its rp06\r" + expect "\n"; type "\033u" + respond "DSKDMP" "m\033salv rp06\r" + expect "\n"; type "d\033its\r" + expect "\n"; type "its\r" + expect "\n"; type "\033g" +} + +proc mark_packs {} { + respond "\n" "mark\033g" + respond "Format pack on unit #" "0" + respond "Are you sure you want to format pack on drive" "y" + respond "Pack no ?" "0\r" + respond "Verify pack?" "n" + respond "Alloc?" "3000\r" + respond "ID?" "foobar\r" +} + +proc prepare_frontend {} { + global emulator_escape + + type ":ksfedr\r" + respond "File not found" "create\r" + expect -re {Directory address: ([0-7]*)\r\n} + set dir $expect_out(1,string) + type "write\r" + respond "Are you sure" "yes\r" + respond "Which file" "bt\r" + expect "Input from" + sleep 1 + respond ":" ".;bt rp06\r" + respond "!" "quit\r" + expect ":KILL" + shutdown + + restart_nsalv + + expect "\n" + sleep 1 + type "feset\033g" + respond "on unit #" "0" + respond "address: " "$dir\r" + respond "DDT" $emulator_escape + quit_emulator + + start_its + respond "DSKDMP" "its\r" + type "\033g" + pdset + + respond "*" ":login db\r" + sleep 1 + type $emulator_escape + mount_tape "out/sources.tape" +} + +proc frontend_bootstrap {} { + respond "*" ":midas sysbin;_kshack;ksfedr\r" + expect ":KILL" + respond "*" ":delete sys;ts ksfedr\r" + respond "*" ":link sys;ts ksfedr,sysbin;ksfedr bin\r" + + respond "*" ":ksfedr\r" + respond "!" "write\r" + respond "Are you sure" "yes\r" + respond "Which file" "bt\r" + expect "Input from" + sleep 1 + respond ":" ".;bt bin\r" + respond "!" "quit\r" + expect ":KILL" +} + +proc its_switches {} { + respond "MACHINE NAME =" "DB\r" + respond "Configuration?" "RP06\r" +} + +proc make_ntsddt {} { + respond "*" ":midas .;@ ddt_system;ddt\r" + respond "cpusw" "3\r" + respond "New One Proceed" "1\r" + expect ":KILL" +} + +proc make_salv {} { + respond "*" ":midas .;_kshack;nsalv\r" + respond "Which machine?" "KSRP06\r" + expect ":KILL" +} + +proc make_dskdmp {} { + respond "*" ":midas .;_system;dskdmp\r" + expect "Configuration" + respond "?" "ksrp06\r" + respond "Assemble BOOT?" "no\r" + expect ":KILL" + + respond "*" ":midas .;bt_system;dskdmp\r" + expect "Configuration" + respond "?" "ksrp06\r" + respond "Assemble BOOT?" "yes\r" + expect ":KILL" +} + +proc dump_switches {} { + respond "WHICH MACHINE?" "DB\r" +} + +proc dump_nits {} { + respond "DSKDMP" "dskdmp bin\r" + respond "DSKDMP" "l\033ddt\r" + respond "\n" "t\033its bin\r" + respond "\n" "\033u" + respond "DSKDMP" "m\033nsalv bin\r" + respond "\n" "d\033nits\r" +} + +proc bootable_tapes {} { + global emulator_escape + + respond "*" ":link kshack;good ram,.;ram ram\r" + respond "*" ":link kshack;ddt bin,.;@ ddt\r" + respond "*" $emulator_escape + create_tape "out/ndskdmp.tape" + type ":kshack;mtboot\r" + respond "Write a tape?" "y" + respond "Rewind tape first?" "y" + respond "Include DDT?" "y" + respond "Input file" ".;dskdmp bin\r" + expect ":KILL" + + respond "*" $emulator_escape + create_tape "out/nnsalv.tape" + type ":kshack;mtboot\r" + respond "Write a tape?" "y" + respond "Rewind tape first?" "y" + respond "Include DDT?" "y" + respond "Input file" ".;nsalv bin\r" + expect ":KILL" +} diff --git a/build/simh/build.tcl b/build/simh/build.tcl index a2aa7168..45863a4e 100644 --- a/build/simh/build.tcl +++ b/build/simh/build.tcl @@ -1,6 +1,6 @@ set emulator_escape "\005" -proc start_nsalv {} { +proc start_salv {} { uplevel #0 {spawn pdp10 build/simh/init} respond "sim>" "show ver\r" respond "sim>" "b tu1\r" @@ -45,4 +45,5 @@ proc initialize_comsat {} { #type "mfinit\033g" } +source build/ks10/include.tcl source build/build.tcl