Skip to content

Instantly share code, notes, and snippets.

@Vbitz
Created July 6, 2023 08:20
Show Gist options
  • Save Vbitz/4151ab54d3a27edb2447ff59db6ce46b to your computer and use it in GitHub Desktop.
Save Vbitz/4151ab54d3a27edb2447ff59db6ce46b to your computer and use it in GitHub Desktop.
Cute little self-contained TinyRange scenario for downloading and compiling SIMH and a Mini-UNIX distribution. Based on the instructions at https://www.tavi.co.uk/unixhistory/mini-unix.html
"""
A cute little self-contained demo to demonstrate running Mini-Unix on a PDP-11.
"""
vm1 = main.add_vm(
"vm1",
ram = 512,
arch = "host",
accelerate = True,
login_script = """
source /etc/profile
apk add libc-dev make gcc
(cd /install && unzip simhv312-4.zip && cd sim && make BIN/pdp11 && cp BIN/pdp11 /root)
cd /root
unzip munix-tap.zip
unzip munix-initfiles.zip
ash -l
""",
additional_files = {
"/install/simhv312-4.zip": file_http("http://simh.trailing-edge.com/sources/simhv312-4.zip"),
"/root/munix-tap.zip": file_http("https://www.tavi.co.uk/unixhistory/mini-unix/munix-tap.zip"),
"/root/munix-initfiles.zip": file_http("https://www.tavi.co.uk/unixhistory/mini-unix/munix-initfiles.zip"),
},
)
main.add_service(lesson(
title = "Running Mini-UNIX on a PDP-11",
text = """
Source: https://www.tavi.co.uk/unixhistory/mini-unix.html
## Installation
- Run `./pdp11 setup.ini`
- Type `run 100000` and press enter.
- Wait about 2 seconds for the program to load and press Ctrl-E.
- Type `run 0`
- Type `tmrk` then `0` then `100` then `1`.
- Type `tmrk` then `1` then `101` then `3999`.
- Press Ctrl-E then type `quit`.
## Running
- Run `./pdp11`
- Type `boot rk` then `rkmx`.
- Login with username `root`.
""",
interaction = interaction_ssh(
vm1,
),
open_browser = True,
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment