====== Running klh10 on a Raspberry Pi ======
These notes are historical. Please use the [[https://github.com/PDP-10/klh10|Github repository]] as a primary source of code and information.
Use the ''bld/lnxarm'' directory.
You will want working tun/tap support. Download [[http://home.comcast.net/~mmcm/klh10/tuntap.patch|tuntap.patch]] (by MMcM) and apply it.
===== TOPS-20 specifics =====
==== Compilation ====
Cf. [[https://groups.google.com/d/topic/alt.sys.pdp10/xndbqJ6Qmwg/discussion|MRC's instructions]]. Edit the file ''src/Makefile.mk'', lines 357-358 (in the base-kl target) to change
-DKLH10_ITIME_INTRP=1 -DKLH10_CTYIO_INT=1
to
-DKLH10_ITIME_SYNC=1 -DKLH10_CTYIO_INT=0
(It does not seem to be necessary to make the corresponding change to the base-ks-its target, but I may be confused. See also [[https://groups.google.com/d/msg/alt.sys.pdp10/DraFRBUWt9Q/Wcgo4qXWtAkJ|a post on alt.sys.pdp10]].)
==== Set up the tap interface ====
Set up the addresses of the tap interface (in your klh10 init file) which will automatically be created by kn10-kl. This makes the TOPS-20 end have the address 192.168.1.129 and the host (Raspberry) end have ..128.
devdef ni0 564 ni20 ipaddr=192.168.1.129 tunaddr=192.168.1.128
For external access, you need to set up iptables and ''/proc/sys/net/ipv4/conf/$IFACE/forwarding'' to be 1, for ''$IFACE in {tap0,eth0}''.
===== ITS specifics =====
I disabled the "host" device (commenting the call to ''clk_idle'' in ''hst_write''), which idles the emulator when the ITS scheduler idles. With the host device active, I got terrible interactivity. Possibly you could instead do the corresponding to the TOPS-20 compilation fix?
You might want to install [[ch11|the Chaosnet interface]] (for fun).
I did have to change my startup script, since at boot time it does take significant time to get a DHCP address for the host system, and kn10-ks (with Chaosnet support) doesn't like to start until there is one.
* [[http://victor.se/bjorn/its/raspi-its.txt|My start/stop script]], e.g. for /etc/init.d/its.
* [[http://victor.se/bjorn/its/raspi-ksits-iptables.txt|My network setup script]], referred to as ksits-iptables.
* See also [[http://home.comcast.net/~mmcm/klh10/|MMcM's scripts and patches]].