aboutsummaryrefslogtreecommitdiff
path: root/readme.md
blob: 883574bce23036de4e2a91137ca8a777a03e4b4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Unix v4

Dumped from http://squoze.net/UNIX/v4/README
Which itself is dumped from: https://archive.org/details/utah_unix_v4_raw

Also includes jslinux for running the image from a browser.

This a bit hacky repo put together a few hours to let people play around with
Unix v4 in their web browser.

## Building it yourself:

podman or docker on Linux x86 or amd64 is ideal.

```
$ sh ./build.sh
```

This will:

  * Pull down simh from github
  * create an alpine linux container, build simh, and strip down the deps
  * export the container to a tarball
  * create a disk image and setup a filesystem on a loopback device ( requires
    `kpartx` )

From there to load the disk image into the jslinux emulator you will need
the `splitimg` utility, a binary is checked in if you're on a recent Linux
machine, or compile it from the incuded sources:

```
$ cd jslinux-2019-12-21/
$ cp ../disk.img ./
$ ./splitimg root-x86.bin root-x86 4096
```

The `jslinux-2019-12-21` directory can then be copied to any plain HTTP server.

## Running UnixV4 locally

The `build.sh` script dumps out a statically linked `pdp11` simulator from
the tarball, it should work on most x86 Linux machines, if you don't wish
to build the image simply run the build script with the `-bin-only` flag,
i.e.

```
$ ./build.sh -bin-only
```

From there you can run the `pdp11` binary from the local directory:

```
$ ./pdp11 boot.ini
```


### Building simh on other architectures

Removing the `--platform` flag from the `build.sh` and `-march=i386`
from the `Containerfile` should suffice assuming there's an upstream
Alpine Linux container for your architecture.

Note, this will not work with JSLinux. Though, you could in theory
build for riscv and tweak the html to load that emulator instead.