copied from Keith Halewood's facebook note 7/7/2019
https://www.facebook.com/notes/dec-computer-users/running-pdp10klh10-on-raspberry-pi/394084557900778/
This is a bit of a work in progress so beware the rough edges.
The PDP-10 (KLH10) distribution from github seems to have been modified to make it more general purpose so the various bits of documentation on the net seem to be a little out of date or confusing, so here’s how I got it to work so that I could install the Panda distribution of TOPS-20 onto it, along with DECnet (connection to HECnet) and TCP-IP. LAT too, was a bit of a surprise.
Firstly, the raspberry Pi. I’m running the minimal ‘buster’ version with a WIRED network. I have also used ‘apt-get install’ to install the following:
screen
bridge-utils
uml-utilities
autogen
autoconf
build-essential (if on minimalist install, such as debian, for example)
screen
bridge-utils
uml-utilities
autogen
autoconf
build-essential (if on minimalist install, such as debian, for example)
The Pi’s networking configuration has a fixed IP address so I’ve switched off the standard dhcp client and I rely entirely on the content of /etc/network/interfaces. For me, the contents look roughly like:
auto lo br0 tap1 tap2 tap3
iface lo inet loopback
iface eth0 inet manual
iface tap1 inet manual
pre-up ip tuntap add tap1 mode tap user simh
iface tap2 inet manual
pre-up ip tuntap add tap2 mode tap user simh
iface tap3 inet manual
pre-up ip tuntap add tap3 mode tap user simh
iface br0 inet static
bridge_ports eth0 tap1 tap2 tap3
bridge_fd 0
address 192.168.x.y
netmask 255.255.255.0
gateway 192.168.x.a
where x.y and x.a are the host addresses of your pi and default gateway. ‘simh’ is the userId of the non-privileged user under which you run your simulations. What has been set up here is a bridge device linking the real ethernet device eth0 and pseudo devices tap1, tap2, tap3 - usable by SIMH and by the PDP10 emulator.
auto lo br0 tap1 tap2 tap3
iface lo inet loopback
iface eth0 inet manual
iface tap1 inet manual
pre-up ip tuntap add tap1 mode tap user simh
iface tap2 inet manual
pre-up ip tuntap add tap2 mode tap user simh
iface tap3 inet manual
pre-up ip tuntap add tap3 mode tap user simh
iface br0 inet static
bridge_ports eth0 tap1 tap2 tap3
bridge_fd 0
address 192.168.x.y
netmask 255.255.255.0
gateway 192.168.x.a
where x.y and x.a are the host addresses of your pi and default gateway. ‘simh’ is the userId of the non-privileged user under which you run your simulations. What has been set up here is a bridge device linking the real ethernet device eth0 and pseudo devices tap1, tap2, tap3 - usable by SIMH and by the PDP10 emulator.
Download and unzip the KLH10 emulator:
$ curl -L https://github.com/PDP-10/klh10/archive/master.zip > klh10-master.zip
$ unzip -o klh10-master.zip
$ curl -L https://github.com/PDP-10/klh10/archive/master.zip > klh10-master.zip
$ unzip -o klh10-master.zip
Go into the ./klh10-master directory and edit the configure file. Find the CFLAGS setting and change the -O3 into -O2
Go back up a directory level.
Create another directory, say klh10-build and go into it and:
$ ../klh10-master/autogen.sh
Create another directory, say klh10-build and go into it and:
$ ../klh10-master/autogen.sh
Assuming you’ve installed autogen, autoconf etc., you should see a few files and directories magically appear in your current directory (klh10-build).
Type:
$ make
and watch it building the kl, ks and ks-its models in the appropriate subdirectories. You should see the compiler compiling with -O2. This is important. The -O3 optimisation seems to mess up something critical in the simulators.
$ make
and watch it building the kl, ks and ks-its models in the appropriate subdirectories. You should see the compiler compiling with -O2. This is important. The -O3 optimisation seems to mess up something critical in the simulators.
Go into the bld-kl directory and you’ll see some executables like:
dpni20, dprpxx, dptm03, enaddr, kn10-kl, udlconv, uexbconv, vdkfmt, wfconv, wxtest.
Copy these to a location where you’ll be running the simulator with a configuration file and disc image file(s).
dpni20, dprpxx, dptm03, enaddr, kn10-kl, udlconv, uexbconv, vdkfmt, wfconv, wxtest.
Copy these to a location where you’ll be running the simulator with a configuration file and disc image file(s).
kn10-kl is the simulator executable. When running a simulation, it’ll fire up instances of dprpxx and dpni20. The dpni20 executable will need to be setuid root, ie:
# chown root:root dpni20
# chmod u+s dpni20
It’s annoying because the whole point about ‘tap’ network interfaces defined above is that a non-privileged user, ie. simh as defined above, should be able to exert full control over its side of the device.
# chown root:root dpni20
# chmod u+s dpni20
It’s annoying because the whole point about ‘tap’ network interfaces defined above is that a non-privileged user, ie. simh as defined above, should be able to exert full control over its side of the device.
WORK IN PROGRESS
Panda distribution of TOPS-20 , installation and configuration - see
Panda distribution of TOPS-20 , installation and configuration - see
http://www.ldx.ca/notes/tops-20-notes.html
Talk about the workaround for the network connection and the fact it doesn’t use the tap device you want it to.... etc...
NCP might take a while to start... or not.
Using screen to let you detach the pdp10’s console...
Connections via TCP/IP, DECnet. LAT appears to work much better than DECnet’s CTERM.
Talk about the workaround for the network connection and the fact it doesn’t use the tap device you want it to.... etc...
NCP might take a while to start... or not.
Using screen to let you detach the pdp10’s console...
Connections via TCP/IP, DECnet. LAT appears to work much better than DECnet’s CTERM.
--30--
No comments:
Post a Comment