{"id":13836037,"url":"https://github.com/jserv/unix-v1","last_synced_at":"2025-05-16T15:03:34.263Z","repository":{"id":30227410,"uuid":"33778505","full_name":"jserv/unix-v1","owner":"jserv","description":"Restoration of 1st Edition UNIX kernel sources from Bell Laboratories","archived":false,"fork":false,"pushed_at":"2025-04-01T13:42:52.000Z","size":12572,"stargazers_count":249,"open_issues_count":0,"forks_count":45,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-04T20:12:38.617Z","etag":null,"topics":["pdp-11","research-unix","simh","unix"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jserv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-11T14:22:57.000Z","updated_at":"2025-04-01T13:42:57.000Z","dependencies_parsed_at":"2024-01-13T16:44:22.548Z","dependency_job_id":"c8c634b5-e0e4-4b42-af62-8323a7d00301","html_url":"https://github.com/jserv/unix-v1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Funix-v1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Funix-v1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Funix-v1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Funix-v1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jserv","download_url":"https://codeload.github.com/jserv/unix-v1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550693,"owners_count":20956987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pdp-11","research-unix","simh","unix"],"created_at":"2024-08-04T15:00:33.636Z","updated_at":"2025-04-06T21:16:41.294Z","avatar_url":"https://github.com/jserv.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Restoration of 1st Edition UNIX from Bell Laboratories\n\nWelcome to the 1st Edition UNIX repository. Here, you will find the kernel\nsource code and userland binaries necessary to run 1st Edition UNIX on a\nPDP-11 simulator. This repository houses a reconstructed version of UNIX as\nit existed around 1972, rather than an original 1st Edition UNIX image.\nThe reconstruction is based on a printout of the UNIX kernel slightly after\nVersion 1, supplemented with data recovered from a DECtape dating from around\nVersions 2 or 3.\n\nThe 1st Edition UNIX marked a significant milestone when UNIX was rewritten\nfor the then-new PDP-11, a relatively affordable minicomputer, transitioning\nfrom the PDP-7 for which it was originally developed, at Bell Laboratories.\nBoth versions were crafted in assembly language. The early iterations of UNIX\nwere quintessential examples of advanced concepts encapsulated within\nstreamlined systems. The influence of UNIX has been so profound that its\nimpact resonates well into the 21st century. The developmental history of UNIX\nis well-documented, and in the past decade, concerted efforts have been made\nto locate and preserve software and documentation artifacts from UNIX's\nformative years.\n\nThe paper titled \"[The Restoration of Early UNIX Artifacts](https://www.usenix.org/legacy/event/usenix09/tech/full_papers/toomey/toomey.pdf)\"\nby Warren Toomey provides an in-depth account of the endeavors to restore\nthese historical artifacts to operational condition, along with the valuable\ninsights gained through this process.\n\n## Build Instructions\nUnless otherwise noted, file and directory names refer to this repository.\n\nSimply execute `make`. Doing so initiates several processes. It compiles\n`tools/pdp11`, `tools/mkfs`, `tools/ml`, and `tools/apout/apout`. These tools\nare essential for constructing the filesystems and the kernel for 1st Edition\nUNIX. Additionally, the command prepares kernel sources with requisite patches,\nassembles the kernel, and creates a bootable [SIMH](http://simh.trailing-edge.com/)\nmemory image. This image is then placed into the images directory.\n\nFinally, the `make` will build the `rf0.dsk`, `rk0.dsk` and `tape` images and\ninstall these in the `images` directory. You can also do a `make clean` to clean\nout the `images` and `build` directories. A `make distclean` will clean out the\n`images`, `build`  and `tools` directories accordingly.\n\n## Running 1st Edition UNIX\n1. Execute `make run` or `./simh.cfg`, and you should see this:\n\n```\nPDP-11 simulator Open SIMH V4.1-0 Current        git commit id: 1a1396d0\nDisabling XQ\nRF: buffering file in memory\nTC0: 16b format, buffering file in memory\nListening on port 5555\n```\n\n   You will receive a `login:` prompt:\n\n2. Type in `root` followed by RETURN key. You should receive a `#` prompt.\n\n3. Type in an `ls -l` command. You should see something like this:\n\n```\ntotal    6\n 43 sdrwr-  2 root    620 Jan  1 00:00:00 bin\n 42 sdrwr-  2 root    250 Jan  1 00:00:00 dev\n104 sdrwr-  2 root    110 Jan  1 00:00:00 etc\n114 sdrwr-  2 root     50 Jan  1 00:00:00 tmp\n 41 sdrwr-  7 root     70 Jan  1 00:00:00 usr\n```\n\n4. To change directories, use `chdir`, e.g. `chdir /usr`. The only editor installed\n   is `ed`. You can check [A Tutorial Introduction to the UNIX Text Editor](docs/edtut.pdf) for its usage.\n\n5. To log in multiple times, telnet to localhost port 5555.  The system\n   is configured to allow 8 remote logins.\n\n6. To shut the system down, press `Ctrl-E` to stop the simulator, and `q` to quit.\n   You do not need to sync the system before shutdown.\n\n## Documentation\nThe manuals for 1st Edition UNIX are available here:\n\u003chttps://web.archive.org/web/20250114151916/https://www.bell-labs.com/usr/dmr/www/1stEdman.html\u003e,\n\u003chttps://www.tuhs.org/Archive/Distributions/Research/Dennis_v1/UNIX_ProgrammersManual_Nov71.pdf\u003e, and\n\u003chttps://man.cat-v.org/unix-1st/\u003e.\n\nSome documentation of the internals of the 1st Edition UNIX are available here:\n\u003chttp://www.bitsavers.org/pdf/att/unix/Early_UNIX/PreliminaryUnixImplementationDocument_Jun72.pdf\u003e\n\nDetails of the PDP-11/20 architecture and its peripherals can be found at:\n\u003chttp://www.bitsavers.org/pdf/dec/pdp11/handbooks/PDP1120_Handbook_1972.pdf\u003e, and\n\u003chttp://www.bitsavers.org/pdf/dec/pdp11/handbooks/PDP11_PeripheralsHbk_1972.pdf\u003e.\n\nThe C compiler from 2nd Edition UNIX has been installed and is operational.\nHowever, it supports a very early dialect of C. The most relevant reference for\nthis version of the language is as follows, although it may be approximately\ntwo years more advanced than the dialect in question:\n\u003chttps://web.archive.org/web/20240425202413/https://www.bell-labs.com/usr/dmr/www/cman74.pdf\u003e\n\nThe userland binaries originate from a period between the 1st and 2nd Editions\nof UNIX. The manuals from the 2nd Edition may also be useful:\n\u003chttp://www.bitsavers.org/pdf/att/unix/Early_UNIX/Unix_2nd_Edition_Manual_Jun72.pdf\u003e.\n\n## Repository Layout\n* `pages`\n    - OCR'd pages from the [Preliminary Release of UNIX Implementation Document](docs/PreliminaryUnixImplementationDocument_Jun72.pdf).\n* `patches`\n    - patches to rebuilt files to get kernel to run\n* `fs`\n    - userland binaries and files, used to make rf0.dsk and rk0.dsk\n* `src`\n    - source code for userland: there is not much available\n* `tools`\n    - tools and scripts to build the kernel and filesystem\n* `build`\n    - build area: patched kernel files, patched filesystems\n* `images`\n    - final disk and tape images to be used by the SIMH simulator\n* `notes`\n    - notes on the work done to get 1e UNIX to run again\n\n## License\n\nIn 2002, Caldera International made Unix V1 through V7 for PDP-11 and Unix 32V\nfor VAX available as free and open source software, adopting a permissive\nBSD-style license. Consequently, any work derived from Unix V1, as well as\nportions of V2 and V3, falls under this same BSD-style licensing.\n\nUse of this repository is governed by a BSD-style license that can be found in\nthe [LICENSE](LICENSE) file. Apout is redistributed under the MIT License,\nwhich can be found in the [LICENSE.Apout](LICENSE.Apout) file.\n\nCheck the [CREDITS](CREDITS) file to see who participated in the restoration.\n\n## Related Projects\n* [7th Edition Unix at 40](https://2019.eurobsdcon.org/slides/7th%20Edition%20Unix%20at%2040%20-%20Warner%20Losh.pdf) / [video](https://youtu.be/FTlzaDgzPY8)\n* [pdp7-unix](https://github.com/DoctorWkt/pdp7-unix) resurrects Unix on the PDP-7 from scans of the original assembly code.\n* [The Unix Heritage Society](https://www.tuhs.org/)\n* [Unix History Repository](https://github.com/dspinellis/unix-history-repo)\n* [Warner's History of Unix BSDCan 2020 Talk](https://github.com/bsdimp/bsdcan2020-demos)\n* [Research UNIX v7 for Raspberry Pi](https://github.com/r1mikey/research-unix-v7)\n* [ed Editor V1 Javascript Edition](https://github.com/dkkloimwieder/eded.js)\n* [pdp11-B](https://github.com/rswier/pdp11-B)  is an effort to recreate the B compiler for the PDP-11 as authentically as possible.\n* [B compiler](https://github.com/aap/b) is capable of compiling itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjserv%2Funix-v1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjserv%2Funix-v1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjserv%2Funix-v1/lists"}