TOPS-20をNetBSD/amd64 6.99.24上のKLH10 PDP-10エミュレーターで起動し、TCP/IPで通信する

ふと、NetBSD/pdp10 http://www.netbsd.org/ports/pdp10/ のウェブページを観ると、KLH10というPDP-10エミュレーターをターゲットにすると書いてあった。これは、pkgsrcには収録されていない。
NetBSD/pdp10自体は、gcc for PDP-10の開発が止まってしまったので、放棄されているらしいが、KLH10がpkgsrcにないのは残念なので、追加してみたいと思った。
NetBSD/pdp10のウェブページによると、KL10Bというextended addressingをサポートするCPUをエミュレートするのは、KLH10だけである。
KLH10自体は、KL10B以外にKS10等もエミュレートするバイナリーを作ることができるが、今はそれには対応するpackageにはなっていない。

追加するには、当然動作確認が必要なので、TOPS-20を実行してみた。最新のKLH10を探しているうちに、NetBSDでのtap(4)ネットワークサポートのパッチが提供されていることが分かったので、それを適用して、telnetでloginできることも確認した。
TOPS-20はV7.0をインストールする。最新版は、V7.1のはずだが、どの磁気テープか確認できていないので。


pkgsrcにKLH10を追加する方法は書いても仕方ないので、pkgsrc/emulators/klh10を使って、TOPS-20にtelnetでloginするまでの方法を書いておく。

まずは、pkgsrc/emulators/klh10をmake installでインストールする。これは、現在のところ、NetBSD/i386とNetBSD/amd64しか想定しておらず、NetBSD/amd64 6.9924でしか動作確認していない。NetBSD/i386でも動くと思われる。armやalphaでのbuildができるようにするのは、そのうち対応したい。

KLH10の起動方法は普通のエミュレータープログラムとは異なる。/usr/pkg/share/klh10/binディレクトリーにあるバイナリーファイルは全て、kn10-klを実行するディレクトリーに置かれなくてはいけない。PATHが通っているからと言って、ちゃんと探して実行してもらえるようなことはないので、注意が必要である。

TOPS-20をKL10Bで動かすための環境は、/usr/pkg/share/klh10/klt20にインストールされる。
$ mkdir pdp10
$ cp -r /usr/pkg/share/klh10/klt20 ~/pdp10
$ cd klt20
$ cp /usr/pkg/share/klh10/bin/* .

として、KLH10を実行できる環境を整える。


次に、TOPS-20の磁気テープイメージをダウンロードする。
http://pdp-10.trailing-edge.com/tapes/ にあるものを使う。
TOPS-20本体については、bitsavers等にあるものでも良いが、TCP/IPに関しては、minotorプログラムが含まれていない磁気テープイメージもあるので、違うイメージを使う時には注意が必要である。

$ cd ~/pdp10/klh20

# TOPS-20 V7.0本体
$ ftp http://pdp-10.trailing-edge.com/tapes/bb-h137f-bm.tap.bz2

# TCP/IP拡張
$ ftp http://pdp-10.trailing-edge.com/tapes/bb-ev83b-bm_longer.tap.bz2

$ bunzip bb-h137f-bm.tap.bz2
$ bunzip bb-ev83b-bm_longer.tap.bz2


次は、KLH10を起動させて、TOPS-20をインストールする。
基本的には、/usr/pkg/share/klh10/klt20.txt にある通りに進める。
磁気テープイメージによって、若干違いがあるかもしれない。

以下に、インストール時のログを示す。
$ ./kn10-kl inst-klt20.ini
KLH10 V2.0H (MyKL) built Oct 18 2013 00:36:03
    Copyright � 2002 Kenneth L. Harrenstien -- All Rights Reserved.
This program comes "AS IS" with ABSOLUTELY NO WARRANTY.

Compiled for NETBSD on I386 with word model USEHWD
Emulated config:
         CPU: KL10-extend   SYS: T20   Pager: KL  APRID: 3600
         Memory: 8192 pages of 512 words  (SHARED)
         Time interval: INTRP   Base: OSGET
         Interval default: 60Hz
         Internal clock: OSINT
         Other: MCA25 JPC DEBUG PCCACHE CTYINT EVHINT
         Devices: DTE RH20 RPXX(DP) TM03(DP) NI20(DP)
[MEM: Allocating 8192 pages shared memory, clearing...done]

KLH10# ; Sample KLH10.INI for initial installation
KLH10#
KLH10# ; Define basic device config - one DTE, one disk, one tape.
KLH10# ; Use two RH20s because TOPS-10 doesn't like mixing disk and tape on
KLH10# ; the same controller (TOPS-20 is fine).
KLH10#
KLH10# devdef dte0 200   dte    master
KLH10# devdef rh0  540   rh20
KLH10# devdef rh1  544   rh20
KLH10# devdef dsk0 rh0.0 rp     type=rp06 format=dbd9
KLH10# devdef mta0 rh1.0 tm03   type=tu45
KLH10#
KLH10# ; Need KLNI to avoid LAPRBF BUGCHKs - use valid address if known
KLH10# ;
KLH10# devdef ni0 564 ni20 ipaddr=10.0.0.51
KLH10#
KLH10# ; Mount installation tape (no ucode or boot to skip)
KLH10# devmount mta0 bb-h137f-bm.tap
Mount requested: "bb-h137f-bm.tap"
[mta0: Tape online]
KLH10#
KLH10# ; Load tape bootstrap directly
KLH10# load mtboot.sav
Using word format "c36"...
Loaded "mtboot.sav":
Format: DEC-CSAV
Data: 4067, Symwds: 0, Low: 040000, High: 054641, Startaddress: 040000
Entvec: JRST (120 ST: 0, 124 RE: 0, 137 VR: 0,,0)
KLH10#
KLH10# ; Now ready to GO
KLH10# [EOF on inst-klt20.ini]
KLH10# go
Starting KN10 at loc 040000...

BOOT V11.0(315)

MTBOOT>/l

[BOOT: Loading] [OK]

MTBOOT>/g143



[FOR ADDITIONAL INFORMATION TYPE "?" TO ANY OF THE FOLLOWING QUESTIONS.]

DO YOU WANT TO REPLACE THE FILE SYSTEM ON THE SYSTEM STRUCTURE? Y

DO YOU WANT TO DEFINE THE SYSTEM STRUCTURE? Y

HOW MANY PACKS ARE IN THIS STRUCTURE: 1

ON WHICH "CHANNEL,CONTROLLER,UNIT" IS LOGICAL PACK # 0 MOUNTED? 0,-1,0

DO YOU WANT THE DEFAULT SWAPPING SPACE? Y

DO YOU WANT THE DEFAULT SIZE FRONT END FILE SYSTEM? Y

DO YOU WANT THE DEFAULT SIZE BOOTSTRAP AREA? Y

DO YOU WANT TO ENABLE PASSWORD ENCRYPTION FOR THE SYSTEM STRUCTURE? Y

WHAT IS THE NAME OF THIS STRUCTURE? PS

[STRUCTURE "PS" SUCCESSFULLY DEFINED]

[PS MOUNTED]
?PS UNIT 0 HAS NO BAT BLOCKS.
DO YOU WANT TO WRITE A SET OF PROTOTYPE BAT BLOCKS? Y

%%NO SETSPD.

System restarting, wait...
DATE AND TIME IS: FRIDAY, 18-OCTOBER-2013 11:03PM
WHY RELOAD? NEW
PROBLEM WITH ACCOUNTS-TABLE.BIN
CANNOT FIND ERROR MESSAGE FILE - ACCOUNT VALIDATION IS DISABLED

RUNNING DDMP


NO SYSJOB

********************
*BUGCHK "KNICFF" AT 18-OCT-2013 23:03:38
*PHYKNI - CANNOT RELOAD THE KLNI
*JOB:  0, USER: OPERATOR
*ADDITIONAL DATA: 600104
********************
NO EXEC
MX>GET FILE MTA0:
  ?
MX>GET FILE MTA0:
MX>START

 TOPS-20 Command processor 7(4143)
@TER NO RAI
@ena
$run mta0:
DLUSER>load mta0:

DONE.
DLUSER>exit
$run mta0:
DUMPER>tape mta0:
DUMPER>restore <*>*.*.* (TO) *.*.*
Saveset "SYSTEM Files for TOPS-20 V7.0" 22-Jun-88 2035
 Loading files into PS:
 End of Saveset.


 Total files restored:      26
 Total pages restored:    1765
DUMPER>restore <*>*.*.* (TO) *.*.*
Saveset "SUBSYS Files for TOPS-20 V7.0" 22-Jun-88 2037
 Loading files into PS:
 End of Saveset.


 Total files restored:     176
 Total pages restored:    4535
DUMPER>restore <*>*.*.* (TO) *.*.*
Saveset "GALAXY SUBSYS Files for TOPS-20 V7.0"  22-Jun-88 2043
 Loading files into PS:
 End of Saveset.


 Total files restored:      25
 Total pages restored:     586
DUMPER>restore <*>*.*.* (TO) <*>*.*.*
Saveset "UETP Files for TOPS-20 V7.0"   22-Jun-88 2044
 Loading files into PS:
 End of Tape.


 Total files restored:      55
 Total pages restored:     482
DUMPER>exit
$conn 
$vdir

   PS:
 2060-MONBIG.EXE.1;P777752 597 305664(36) 26-May-88 17:05:33 BROOKS
 2060-MONMAX.EXE.1;P777752 597 305664(36) 26-May-88 17:28:27 BROOKS
 7-PTYCON.ATO.1;P777752     1 823(7)      2-Jun-88 22:29:16 BROOKS
 7-SETSPD.EXE.1;P777752    14 7168(36)   28-May-88 02:21:05 BROOKS
 7-SYSJOB.EXE.1;P777752     7 3584(36)   28-May-88 03:11:07 BROOKS
   .RUN.1;P777752           1 158(7)      2-Jun-88 21:41:35 BROOKS
 BOOT.EXB.1;P777752        12 11658(18)  27-May-88 21:36:22 BROOKS
 BUGS.MAC.1;P777752       155 395399(7)  23-May-88 18:14:48 BROOKS
 BUGSTRINGS.TXT.1;P777752  22 54680(7)   26-May-88 17:28:13 BROOKS
 CHECKD.EXE.1;P777752      22 11264(36)  27-May-88 21:42:19 BROOKS
 ERRMES.BIN.1;P777752      24 12013(36)  28-May-88 01:48:31 BROOKS
 EXEC.EXE.1;P777752       125 64000(36)  27-May-88 11:40:08 BROOKS
 FEDDT.EXE.1;P777752        9 4608(36)   14-Feb-79 20:37:17 BROOKS
 IPALOD.EXE.1;P777752      28 14336(36)  28-May-88 00:53:56 BROOKS
 KNILDR.EXE.1;P777752      26 13312(36)  28-May-88 00:58:59 BROOKS
 MTBOOT.EXB.1;P777752      11 10247(18)  27-May-88 21:37:31 BROOKS
 PROGRAM-NAME-CACHE.TXT.1;P777752   1 78(7)  9-Mar-81 15:24:00 BROOKS
 RP2DBT.EXB.1;P777752      18 17687(18)  27-May-88 21:38:15 BROOKS
 RP2MBT.EXB.1;P777752      16 16276(18)  27-May-88 21:39:26 BROOKS
 RSX20F.MAP.1;P777752      29 74007(7)   22-Mar-88 14:17:44 BROOKS
 SYSJOB.HLP.1;P777752       3 5679(7)    29-Mar-82 15:47:02 BROOKS
 SYSTEM.CMD.1;P777752       1 598(7)     24-Feb-84 20:01:23 BROOKS
 TGHA.EXE.1;P777752        29 14848(36)  28-May-88 03:20:32 BROOKS
   .HLP.1;P777752           1 214(7)     11-Nov-86 20:49:44 BROOKS
 TOPS20.BWR.1;P777752       3 1425(36)    1-Jun-88 18:17:20 BROOKS
   .DOC.1;P777752          13 6432(36)   21-Jun-88 15:25:11 LOMARTIRE

 Total of 1765 pages in 26 files
$renAME (EXISTING FILE) 2060-monbig.EXE.* (TO BE) monitr.exe
 2060-MONBIG.EXE.1 => MONITR.EXE.1 [OK]
$^Ecease now
 TOPS20 Will be shut down IMMEDIATELY
[Confirm]

[Timesharing is over]
$
        OPERATOR - Wait for the message "Shutdown complete" before
        entering commands to PARSER.

Shutdown complete
[HALTED: FE interrupt]
KLH10> q
Are you sure you want to quit? [Confirm]
Shutting down...Bye!


ここで注意すべきは終了方法である。
^Ecease nowの^Eは、Ctrl-e を入力すると言うことである。
また、その後、shutdown completeと出たら、Ctrl-\を押すと、KLH10の管理コンソールに移行できるので、そこでqを入力して終了する。

次に、一度TOPS-20にログインしてシャットダウンするまでを示す。
起動できるか確認すると言うことである。
一般ユーザーで起動させるので、tap(4)を使おうとして失敗するメッセージが表示されるが、今は気にしないで良い。
$ ./kn10-kl klt20.ini
KLH10 V2.0H (MyKL) built Oct 18 2013 00:36:03
    Copyright � 2002 Kenneth L. Harrenstien -- All Rights Reserved.
This program comes "AS IS" with ABSOLUTELY NO WARRANTY.

Compiled for NETBSD on I386 with word model USEHWD
Emulated config:
         CPU: KL10-extend   SYS: T20   Pager: KL  APRID: 3600
         Memory: 8192 pages of 512 words  (SHARED)
         Time interval: INTRP   Base: OSGET
         Interval default: 60Hz
         Internal clock: OSINT
         Other: MCA25 JPC DEBUG PCCACHE CTYINT EVHINT
         Devices: DTE RH20 RPXX(DP) TM03(DP) NI20(DP)
[MEM: Allocating 8192 pages shared memory, clearing...done]

KLH10# ; Sample KLH10.INI for initial installation
KLH10#
KLH10# ; Define basic device config - one DTE, one disk, one tape.
KLH10# ; Use two RH20s because TOPS-10 doesn't like mixing disk and tape on
KLH10# ; the same controller (TOPS-20 is fine).
KLH10#
KLH10# devdef dte0 200   dte    master
KLH10# devdef rh0  540   rh20
KLH10# devdef rh1  544   rh20
KLH10# devdef dsk0 rh0.0 rp     type=rp06 format=dbd9
KLH10# devdef mta0 rh1.0 tm03   type=tu45
KLH10#
KLH10# ; Need KLNI to avoid LAPRBF BUGCHKs - use valid address if known
KLH10# ;
KLH10# ; devdef ni0 564 ni20 ipaddr=10.0.0.51
KLH10# ; The (NetBSD/FreeBSD) version with tap(4) and bridge(4) creates the named
KLH10# ; tap device dynamically and bridges it to the default interface.
KLH10# ; If you want it differently (for instance routed instead of bridged),
KLH10# ; you can create the tap yourself and it will be used as it is.
KLH10# devdef ni0 564 ni20 ipaddr=10.0.0.51 ifc=tap0 dedic=true
KLH10#
KLH10# ; Load disk bootstrap directly
KLH10# load boot.sav
Using word format "c36"...
Loaded "boot.sav":
Format: DEC-CSAV
Data: 4630, Symwds: 0, Low: 040000, High: 054641, Startaddress: 040000
Entvec: JRST (120 ST: 0, 124 RE: 0, 137 VR: 0,,0)
KLH10#
KLH10# ; Now ready to GO
KLH10# [EOF on klt20.ini]
KLH10# go
Starting KN10 at loc 040000...

BOOT V11.0(315)

BOOT>

[BOOT: Loading] [OK]


[PS MOUNTED]

System restarting, wait...
DATE AND TIME IS: FRIDAY, 18-OCTOBER-2013 11:11PM
WHY RELOAD? NEW
PROBLEM WITH ACCOUNTS-TABLE.BIN
CANNOT GET A JFN FOR ACCOUNTS-TABLE.BIN - ACCOUNT VALIDATION IS
DISABLED
RUN CHECKD? N

RUNNING DDMP


SYSJOB 7(78) STARTED AT 18-OCT-2013 2311
RUN SYS:INFO
RUN SYS:MAPPER
JOB 0 /LOG OPERATOR XX OPERATOR
ENA
^ESET LOGIN PSEUDO
^ESET LOGIN CONSOLE
^ESET OPERATOR
PTYCON
GET SYSTEM:7-PTYCON.ATO
/

[dpni20: Warning - cannot set high priority - Permission denied]

[dpni20: Fatal error: Must be superuser!]
[KNILDR: LOADING MICROCODE VERSION 1(172) INTO ETHERNET CHANNEL 0]

18-OCT-2013 23:11:15 - TGHA 4.2(31
SJ  0: @LOG OPERATOR OPERATOR
SJ  0:  JOB 1 ON TTY172 18-OCT-2013 23:11:15, LAST LOGIN NEVER
SJ  0: @ENA
) IN OPERATION

********************
*BUGCHK "KNIINF" AT 18-OCT-2013 23:
SJ  0: $^ESET LOGIN PSEUDO
SJ  0: $^ESET LOGIN CONSOLE
11:10
*PHYKNI - KLNI INITIAL
SJ  0: $^ESET OPERATOR
SJ  0: $PTYCON
IZATION TIMED OUT
*JOB:  0, USER: OPERATOR
*ADDITIONAL DATA: 400007000036
********************

********************
*BUGCHK "KNIRLF" AT 18-OCT-2013 23:11:15
*PHYKNI - KLNI RELOAD FAILED
*JOB:  0, USER: OPERATOR
*ADDITIONAL DATA: 10
********************
SJ  0: PTYCON> GET SYSTEM:7-PTYCON.ATO
SJ  0: PTYCON> SILENCE
SJ  0: PTYCON> W ALL
SJ  0: GAL(0)     2          OPERATOR   EXEC       TI         0:0:0
SJ  0: BAT(1)     3          OPERATOR   BATCON     RN         0:0:0
SJ  0: NEB(2)     4          OPERATOR   NEBULA     RN         0:0:0
SJ  0: OPR(3)     5          OPERATOR   OPR        TI         0:0:0
SJ  0: MAILS(4)   6          OPERATOR   MX         RN         0:0:0
SJ  0: PTYCON> CONN OPR
SJ  0: [CONNECTED TO SUBJOB OPR(3)]
SJ  0:
SJ  0: 23:11:25          -- DEVICE STATUS FILE INITIALIZATION ERROR --
SJ  0:                 CHANGED CPU
SJ  0:                 SYSTEM:DEVICE-STATUS.BIN FILE WILL BE RESET
SJ  0:
SJ  0: 23:11:25          -- STRUCTURE STATUS CHANGE DETECTED --
SJ  0:                 PREVIOUSLY MOUNTED STRUCTURE PS: DETECTED
SJ  0:
SJ  0: 23:11:25          -- STRUCTURE STATUS CHANGE DETECTED --
SJ  0:                 STRUCTURE STATE FOR STRUCTURE PS IS INCORRECT
SJ  0:                   EXCLUSIVE/SHARED ATTRIBUTE SET INCORRECTLY
SJ  0:                 STATUS OF STRUCTURE PS: IS SET:
SJ  0:                 DOMESTIC, UNREGULATED, SHARED, AVAILABLE, DUMPABL
E
SJ  0:

 TOPS-20 Big System, TOPS-20 Monitor 7(21017)
@TER NO RAI
@log operator
 Job 7 on TTY145 18-Oct-2013 23:12:06, Last Login 18-Oct-2013 23:11:21
@ena
SJ  0: OPR>
SJ  0: **** MAILS(4) 23:12:21 ****
SJ  0:
SJ  0:  [SCHEDULER]:        Waiting for UPS:
SJ  0: **** OPR(3) 23:12:21 ****
vdir 

   PS:
 2060-MONMAX.EXE.1;P777752 597 305664(36) 26-May-88 17:28:27 BROOKS
 7-PTYCON.ATO.1;P777752     1 823(7)      2-Jun-88 22:29:16 BROOKS
 7-SETSPD.EXE.1;P777752    14 7168(36)   28-May-88 02:21:05 BROOKS
 7-SYSJOB.EXE.1;P777752     7 3584(36)   28-May-88 03:11:07 BROOKS
   .RUN.1;P777752           1 158(7)      2-Jun-88 21:41:35 BROOKS
 BOOT.EXB.1;P777752        12 11658(18)  27-May-88 21:36:22 BROOKS
 BUGS.MAC.1;P777752       155 395399(7)  23-May-88 18:14:48 BROOKS
 BUGSTRINGS.TXT.1;P777752  22 54680(7)   26-May-88 17:28:13 BROOKS
 CHECKD.EXE.1;P777752      22 11264(36)  27-May-88 21:42:19 BROOKS
 DEVICE-STATUS.BIN.1;P777752   0 0(0)    18-Oct-2013 23:11:25 OPERATOR
 ERRMES.BIN.1;P777752      24 12013(36)  28-May-88 01:48:31 BROOKS
 EXEC.EXE.1;P777752       125 64000(36)  27-May-88 11:40:08 BROOKS
 FEDDT.EXE.1;P777752        9 4608(36)   14-Feb-79 20:37:17 BROOKS
 IPALOD.EXE.1;P777752      28 14336(36)  28-May-88 00:53:56 BROOKS
 KNILDR.EXE.1;P777752      26 13312(36)  28-May-88 00:58:59 BROOKS
 MONITR.EXE.1;P777752     597 305664(36) 26-May-88 17:05:33 OPERATOR
 MTBOOT.EXB.1;P777752      11 10247(18)  27-May-88 21:37:31 BROOKS
 PROGRAM-NAME-CACHE.TXT.1;P777752   1 78(7)  9-Mar-81 15:24:00 BROOKS
 RP2DBT.EXB.1;P777752      18 17687(18)  27-May-88 21:38:15 BROOKS
 RP2MBT.EXB.1;P777752      16 16276(18)  27-May-88 21:39:26 BROOKS
 RSX20F.MAP.1;P777752      29 74007(7)   22-Mar-88 14:17:44 BROOKS
 SYSJOB.HLP.1;P777752       3 5679(7)    29-Mar-82 15:47:02 BROOKS
 SYSTEM.CMD.1;P777752       1 598(7)     24-Feb-84 20:01:23 BROOKS
 TGHA.DAT.1;P777752        16 8192(36)   18-Oct-2013 23:11:15 OPERATOR
   .EXE.1;P777752          29 14848(36)  28-May-88 03:20:32 BROOKS
   .HLP.1;P777752           1 214(7)     11-Nov-86 20:49:44 BROOKS
   .TRA.1;P777752           1 237(7)     18-Oct-2013 23:11:15 OPERATOR
 TOPS20.BWR.1;P777752       3 1425(36)    1-Jun-88 18:17:20 BROOKS
   .DOC.1;P777752          13 6432(36)   21-Jun-88 15:25:11 LOMARTIRE

 Total of 1782 pages in 29 files
$^Ecease now
 TOPS20 Will be shut down IMMEDIATELY
[Confirm]

[Timesharing is over]
$
        OPERATOR - Wait for the message "Shutdown complete" before
        entering commands to PARSER.
SJ  0: Killed Job 1, User OPERATOR, Account OPERATOR, TTY 172,
SJ  0:   at 18-Oct-2013 23:12:37,  Used 0:00:00 in 0:01:21

Shutdown complete
[HALTED: FE interrupt]
KLH10> q
Are you sure you want to quit? [Confirm]
Shutting down...Bye!


ここで注意すべきは、ログインの方法である。
log operatorと書かれている箇所がloginをしている箇所である。
パスワードが必要で、初期値はDEC-20である。
入力方法は、log operator DEC-20エンターキーである。log operatorの後のDEC-20の部分は続けて入力するが表示されない。Unix like OSでの感覚でlog operatorの後にエンターキーを押さないように気をつけなくてはいけない。


次に、TCP/IPをインストールし、初期設定をする方法を示す。
$ ./kn10-kl klt20.ini
KLH10 V2.0H (MyKL) built Oct 18 2013 00:36:03
    Copyright � 2002 Kenneth L. Harrenstien -- All Rights Reserved.
This program comes "AS IS" with ABSOLUTELY NO WARRANTY.

Compiled for NETBSD on I386 with word model USEHWD
Emulated config:
         CPU: KL10-extend   SYS: T20   Pager: KL  APRID: 3600
         Memory: 8192 pages of 512 words  (SHARED)
         Time interval: INTRP   Base: OSGET
         Interval default: 60Hz
         Internal clock: OSINT
         Other: MCA25 JPC DEBUG PCCACHE CTYINT EVHINT
         Devices: DTE RH20 RPXX(DP) TM03(DP) NI20(DP)
[MEM: Allocating 8192 pages shared memory, clearing...done]

KLH10# ; Sample KLH10.INI for initial installation
KLH10#
KLH10# ; Define basic device config - one DTE, one disk, one tape.
KLH10# ; Use two RH20s because TOPS-10 doesn't like mixing disk and tape on
KLH10# ; the same controller (TOPS-20 is fine).
KLH10#
KLH10# devdef dte0 200   dte    master
KLH10# devdef rh0  540   rh20
KLH10# devdef rh1  544   rh20
KLH10# devdef dsk0 rh0.0 rp     type=rp06 format=dbd9
KLH10# devdef mta0 rh1.0 tm03   type=tu45
KLH10#
KLH10# ; Need KLNI to avoid LAPRBF BUGCHKs - use valid address if known
KLH10# ;
KLH10# ; devdef ni0 564 ni20 ipaddr=10.0.0.51
KLH10# ; The (NetBSD/FreeBSD) version with tap(4) and bridge(4) creates the named
KLH10# ; tap device dynamically and bridges it to the default interface.
KLH10# ; If you want it differently (for instance routed instead of bridged),
KLH10# ; you can create the tap yourself and it will be used as it is.
KLH10# devdef ni0 564 ni20 ipaddr=10.0.0.51 ifc=tap0 dedic=true
KLH10#
KLH10# ; Load disk bootstrap directly
KLH10# load boot.sav
Using word format "c36"...
Loaded "boot.sav":
Format: DEC-CSAV
Data: 4630, Symwds: 0, Low: 040000, High: 054641, Startaddress: 040000
Entvec: JRST (120 ST: 0, 124 RE: 0, 137 VR: 0,,0)
KLH10#
KLH10# ; Now ready to GO
KLH10# [EOF on klt20.ini]
KLH10# devmount mta0 bb-ev83b-bm_longer.tap
Mount requested: "bb-ev83b-bm_longer.tap"
[mta0: Tape online]
KLH10# go
Starting KN10 at loc 040000...

BOOT V11.0(315)

BOOT>

[BOOT: Loading] [OK]


[PS MOUNTED]

System restarting, wait...
DATE AND TIME IS: FRIDAY, 18-OCTOBER-2013 11:22PM
WHY RELOAD? NEW
PROBLEM WITH ACCOUNTS-TABLE.BIN
CANNOT GET A JFN FOR ACCOUNTS-TABLE.BIN - ACCOUNT VALIDATION IS
DISABLED
RUN CHECKD? N

RUNNING DDMP


SYSJOB 7(78) STARTED AT 18-OCT-2013 2322
RUN SYS:INFO
RUN SYS:MAPPER
JOB 0 /LOG OPERATOR XX OPERATOR
ENA
^ESET LOGIN PSEUDO
^ESET LOGIN CONSOLE
^ESET OPERATOR
PTYCON
GET SYSTEM:7-PTYCON.ATO
/

[dpni20: Warning - cannot set high priority - Permission denied]

[dpni20: Fatal error: Must be superuser!]
[KNILDR: LOADING MICROCODE VERSION 1(172) INTO ETHERNET CHANNEL 0]

18-OCT-2013 23:22:27 - TGHA 4.2(31
SJ  0: @LOG OPERATOR OPERATOR
SJ  0:  JOB 1 ON TTY172 18-OCT-2013 23:22:27, LAST LOGIN 18-OCT-2013 23:
20:19
SJ  0: @ENA
) IN OPERATION

********************
*BUGCHK "K
SJ  0: $^ESET LOGIN PSEUDO
SJ  0: $^ESET LOGIN CONSOLE
NIINF" AT 18-OCT-2013 23:22:22
SJ  0: $^ESET OPERATOR
SJ  0: $PTYCON
*PHYKNI - KLNI INITIALIZATION TIMED OUT
*JOB:  0, USER: OPERATOR
*ADDITIONAL DATA: 400007000036
********************

********************
*BUGCHK "KNIRLF" AT 18-OCT-2013 23:22:27
SJ  0: PTYCON> GET SYSTEM:7-PTYCON.ATO
SJ  0: PTYCON> SILENCE

*JOB:  0, USER: OPERATOR
*ADDITIONAL DATA: 10
********************
SJ  0: PTYCON> W ALL
SJ  0: GAL(0)     2          OPERATOR   EXEC       TI         0:0:0
SJ  0: BAT(1)     3          OPERATOR   BATCON     RN         0:0:0
SJ  0: NEB(2)     4          OPERATOR   NEBULA     RN         0:0:0
SJ  0: OPR(3)     5          OPERATOR   OPR        TI         0:0:0
SJ  0: MAILS(4)   6          OPERATOR   MX         RN         0:0:0
SJ  0: PTYCON> CONN OPR
SJ  0: [CONNECTED TO SUBJOB OPR(3)]
SJ  0:
SJ  0: 23:22:36          -- STRUCTURE STATUS CHANGE DETECTED --
SJ  0:                 PREVIOUSLY MOUNTED STRUCTURE PS: DETECTED
SJ  0:
SJ  0: 23:22:36          -- STRUCTURE STATUS CHANGE DETECTED --
SJ  0:                 STRUCTURE STATE FOR STRUCTURE PS IS INCORRECT
SJ  0:                   EXCLUSIVE/SHARED ATTRIBUTE SET INCORRECTLY
SJ  0:                 STATUS OF STRUCTURE PS: IS SET:
SJ  0:                 DOMESTIC, UNREGULATED, SHARED, AVAILABLE, DUMPABL
E
SJ  0:

 TOPS-20 Big System, TOPS-20 Monitor 7(21017)
@TER NO RAI
@log operator
 Job 7 on TTY145 18-Oct-2013 23:22:49, Last Login 18-Oct-2013 23:22:33
@ena
$BUILD PS:
[Old]
$$WORKING 2700
$$PERMANENT 2700
$$
$BUILD PS:
[Old]
$$WORKING 600
SJ  0: OPR>
SJ  0: **** MAILS(4) 23:23:33 ****
SJ  0:
SJ  0:  [SCHEDULER]:        Waiting for UPS:
SJ  0: **** OPR(3) 23:23:33 ****

$$PERMANENT 600
$$
$dumper
DUMPER>tape mta0:
DUMPER>rewind
DUMPER>SUPERSEDE ALWAYS
DUMPER>RESTORE PS:<*>*.*.* PS:*.*.*
Saveset "Documentation Files for TCP/IP-20 V4.0"        22-Jun-88 2031
 Loading files into PS:
 End of Saveset.


 Total files restored:       6
 Total pages restored:     107
DUMPER>
SJ  0: **** MAILS(4) 23:24:33 ****
SJ  0:
SJ  0:  [SCHEDULER]:        Waiting for UPS:
SJ  0: **** OPR(3) 23:24:33 ****
RESTORE  PS:<*>*.*.*  PS:*.*.*
Saveset "SYSTEM Files for TCP/IP-20 V4.0"       22-Jun-88 2032
 Loading files into PS:
 End of Saveset.


 Total files restored:      10
 Total pages restored:    2071
DUMPER>RESTORE  PS:<*>*.*.*  PS:*.*.*
Saveset "Unsupported SUBSYS Utilities for TCP/IP-20 V4.0"       22-Jun-8
8 2034
 Loading files into PS:
 End of Saveset.


 Total files restored:      10
 Total pages restored:     162
DUMPER>RESTORE PS:<*>*.*.* PS:*.*.*
Saveset "Source Files for TCP/IP-20 V4.0"       22-Jun-88 2035
 Loading files into PS:
 End of Saveset.


 Total files restored:      56
 Total pages restored:    2638
DUMPER>RESTORE PS:<*>*.*.* PS:*.*.*
Saveset "TCP/IP Monitor Source Keys"    22-Jun-88 2038
 Loading files into PS:
 End of Tape.


 Total files restored:      25
 Total pages restored:     541
DUMPER>exit
$unload mta0:
$CONNECT PS:
$CREATE INTERNET.ADDRESS
Input: PS:INTERNET.ADDRESS.1
00100   IPNI#0,192 168 81 3,PACKET-SIZE:1500,DEFAULT,PREFERRED
00200   $
*EU

[PS:INTERNET.ADDRESS.1]
$^Ecease now
 TOPS20 Will be shut down IMMEDIATELY
[Confirm]

[Timesharing is over]
$
        OPERATOR - Wait for the message "Shutdown complete" before
        entering commands to PARSER.
SJ  0: Killed Job 1, User OPERATOR, Account OPERATOR, TTY 172,
SJ  0:   at 18-Oct-2013 23:26:59,  Used 0:00:00 in 0:04:31

Shutdown complete
[HALTED: FE interrupt]
KLH10> q
Are you sure you want to quit? [Confirm]
Shutting down...Bye!

ここで、設定したIPアドレスは、192.168.81.3である。ここは必要なIPアドレスに変更することができる。default gateway等も設定する箇所があるが、localhostからtelnetでloginするには不要なので割愛する。

次に、ネットワークを有効にして起動する方法を示す。
klt20.iniには、すでにtap(4)を有効にする設定が書かれているので、それを以下のように編集する。
$ cat klt20.ini
; Sample KLH10.INI for initial installation

; Define basic device config - one DTE, one disk, one tape.
; Use two RH20s because TOPS-10 doesn't like mixing disk and tape on
; the same controller (TOPS-20 is fine).

devdef dte0 200   dte master
devdef rh0  540   rh20
devdef rh1  544   rh20
devdef dsk0 rh0.0 rp type=rp06 format=dbd9
devdef mta0 rh1.0 tm03 type=tu45

; Need KLNI to avoid LAPRBF BUGCHKs - use valid address if known
;
; devdef ni0 564 ni20 ipaddr=10.0.0.51
; The (NetBSD/FreeBSD) version with tap(4) and bridge(4) creates the named
; tap device dynamically and bridges it to the default interface.
; If you want it differently (for instance routed instead of bridged),
; you can create the tap yourself and it will be used as it is.
devdef ni0 564 ni20 ipaddr=192.168.81.3 ifc=tap0 dedic=true

; Load disk bootstrap directly
load boot.sav

; Now ready to GO

起動させる。今回はrootで起動させる。
$ sudo ./kn10-kl klt20.ini
Password:
KLH10 V2.0H (MyKL) built Oct 18 2013 00:36:03
    Copyright � 2002 Kenneth L. Harrenstien -- All Rights Reserved.
This program comes "AS IS" with ABSOLUTELY NO WARRANTY.

Compiled for NETBSD on I386 with word model USEHWD
Emulated config:
         CPU: KL10-extend   SYS: T20   Pager: KL  APRID: 3600
         Memory: 8192 pages of 512 words  (SHARED)
         Time interval: INTRP   Base: OSGET
         Interval default: 60Hz
         Internal clock: OSINT
         Other: MCA25 JPC DEBUG PCCACHE CTYINT EVHINT
         Devices: DTE RH20 RPXX(DP) TM03(DP) NI20(DP)
[MEM: Allocating 8192 pages shared memory, clearing...done]

KLH10# ; Sample KLH10.INI for initial installation
KLH10#
KLH10# ; Define basic device config - one DTE, one disk, one tape.
KLH10# ; Use two RH20s because TOPS-10 doesn't like mixing disk and tape on
KLH10# ; the same controller (TOPS-20 is fine).
KLH10#
KLH10# devdef dte0 200   dte    master
KLH10# devdef rh0  540   rh20
KLH10# devdef rh1  544   rh20
KLH10# devdef dsk0 rh0.0 rp     type=rp06 format=dbd9
KLH10# devdef mta0 rh1.0 tm03   type=tu45
KLH10#
KLH10# ; Need KLNI to avoid LAPRBF BUGCHKs - use valid address if known
KLH10# ;
KLH10# ; devdef ni0 564 ni20 ipaddr=10.0.0.51
KLH10# ; The (NetBSD/FreeBSD) version with tap(4) and bridge(4) creates the named
KLH10# ; tap device dynamically and bridges it to the default interface.
KLH10# ; If you want it differently (for instance routed instead of bridged),
KLH10# ; you can create the tap yourself and it will be used as it is.
KLH10# devdef ni0 564 ni20 ipaddr=192.168.81.3 ifc=tap0 dedic=true
KLH10#
KLH10# ; Load disk bootstrap directly
KLH10# load boot.sav
Using word format "c36"...
Loaded "boot.sav":
Format: DEC-CSAV
Data: 4630, Symwds: 0, Low: 040000, High: 054641, Startaddress: 040000
Entvec: JRST (120 ST: 0, 124 RE: 0, 137 VR: 0,,0)
KLH10#
KLH10# ; Now ready to GO
KLH10# [EOF on klt20.ini]
KLH10# go
Starting KN10 at loc 040000...

BOOT V11.0(315)

BOOT>AN-MONMAX

[BOOT: Loading] [OK]


[PS MOUNTED]

System restarting, wait...
DATE AND TIME IS: FRIDAY, 18-OCTOBER-2013 11:32PM
WHY RELOAD? NEW
PROBLEM WITH ACCOUNTS-TABLE.BIN
CANNOT GET A JFN FOR ACCOUNTS-TABLE.BIN - ACCOUNT VALIDATION IS
DISABLED
RUN CHECKD? N

RUNNING DDMP


[LOADING INTERNET HOST NAMES] [OK]

SYSJOB 7(78) STARTED AT 18-OCT-2013 2333
RUN SYS:INFO
RUN SYS:MAPPER
JOB 0 /LOG OPERATOR XX OPERATOR
ENA
^ESET LOGIN PSEUDO
^ESET LOGIN CONSOLE
^ESET OPERATOR
PTYCON
GET SYSTEM:7-PTYCON.ATO
/
[dpni20: Created host-side tap "tap0"]
[dpni20: Opened 10-side tap "/dev/tap0"]
[dpni20: Created bridge "bridge0"]
[dpni20: Bridging with default interface "bge0"]
[dpni20: /sbin/brconfig bridge0 add bge0 add tap0 up => 0]
arp: delete: can't locate 192.168.81.3
                                      [KNILDR: LOADING MICROCODE VERSION 1(172) INTO ETHERNET CHANNEL 0]

18-OCT-2013 23:33:09 - TGHA 4.2(31
SJ  0: @LOG OPERATOR OPERATOR
SJ  0:  JOB 1 ON TTY206 18-OCT-2013 23:33:09, LAST LOGIN 18-OCT-2013 23:
22:49
SJ  0: @ENA
) IN OPERATION

[INTERNET NETWORK
************192.168.81.0 ON, OUTPUT ON 18-OCT-2013 23:33:09]

SJ  0: $^ESET LOGIN PSEUDO
SJ  0: $^ESET LOGIN CONSOLE
********
*BUGINF "IPHTNI" AT 18
SJ  0: $^ESET OPERATOR
SJ  0: $PTYCON
-OCT-2013 23:33:04
*ERROR WHILE READING GHT
*JOB:  0, USER: OPERATOR
*ADDITIONAL DATA: 600104
********************
SJ  0: PTYCON> GET SYSTEM:7-PTYCON.ATO
SJ  0: PTYCON> SILENCE
SJ  0: PTYCON> W ALL
SJ  0: GAL(0)     2          OPERATOR   EXEC       TI         0:0:0
SJ  0: BAT(1)     3          OPERATOR   BATCON     RN         0:0:0
SJ  0: NEB(2)     4          OPERATOR   EXEC       TI         0:0:0
SJ  0: OPR(3)     5          OPERATOR   OPR        TI         0:0:0
SJ  0: MAILS(4)   6          OPERATOR   MX         RN         0:0:0
SJ  0: PTYCON> CONN OPR
SJ  0: [CONNECTED TO SUBJOB OPR(3)]
SJ  0:
SJ  0: 23:33:19          -- STRUCTURE STATUS CHANGE DETECTED --
SJ  0:                 PREVIOUSLY MOUNTED STRUCTURE PS: DETECTED
SJ  0:
SJ  0: 23:33:19          -- STRUCTURE STATUS CHANGE DETECTED --
SJ  0:                 STRUCTURE STATE FOR STRUCTURE PS IS INCORRECT
SJ  0:                   EXCLUSIVE/SHARED ATTRIBUTE SET INCORRECTLY
SJ  0:                 STATUS OF STRUCTURE PS: IS SET:
SJ  0:                 DOMESTIC, UNREGULATED, SHARED, AVAILABLE, DUMPABL
E
SJ  0:

 TOPS-20AN Maximum System, TOPS-20AN Monitor 7(21017)
@TER NO RAI
@log operator
 Job 7 on TTY205 18-Oct-2013 23:33:32, Last Login 18-Oct-2013 23:33:14
@ena
$
SJ  0: OPR>
SJ  0: **** MAILS(4) 23:34:14 ****
SJ  0:
SJ  0:  [SCHEDULER]:        Waiting for UPS:
SJ  0: **** OPR(3) 23:34:14 ****

tap(4)関連の項目は、自動で設定されるので、ifconfig tap0 create等をしておく必要はない。

この状態で、ホスト側のNetBSDからtelnetでloginできる。
% telnet 192.168.81.3
Trying 192.168.81.3...
Connected to aluminum.elements.tetera.org.
Escape character is '^]'.

 TOPS-20AN Maximum System, TOPS-20AN Monitor 7(21017)
@TER NO RAI
@log operator
 Job 8 on TTY270 18-Oct-2013 23:34:43, Last Login 18-Oct-2013 23:33:56
@ena
$vdir

   PS:
 5221BM.MEM.1;P777700      43 21550(36)  21-Nov-83 20:58:02 BROOKS
 ANUTIL.MAN.1;P777700      48 121334(7)  13-Jun-85 16:25:21 BROOKS
 TCPIP.BWR.1;P777700        3 1075(36)   21-Jun-88 15:22:48 LOMARTIRE
   .DOC.1;P777700           3 1067(36)   31-May-88 18:51:39 BROOKS
 TELNET.DOC.1;P777700       9 22964(7)    5-Mar-84 15:53:22 BROOKS
   .HLP.1;P777700           1 916(7)      5-Mar-84 15:54:07 BROOKS

 Total of 107 pages in 6 files
$logout
Killed Job 8, User OPERATOR, Account , TTY 270,
  at 18-Oct-2013 23:34:58,  Used 0:00:00 in 0:00:14
Connection closed by foreign host.

0 件のコメント:

コメントを投稿

注: コメントを投稿できるのは、このブログのメンバーだけです。

plgarc/wip/llama.cppでpkgsrcのBLASサポートを探る

この記事は、 NetBSD Advent Calendar 2024 の13日目の記事です。 llama.cppを使ってみる 以前に、 NetBSD/amd64でllama.cppを使ってみる という記事で llama.cpp を使ってみていました。 あれか...