{"id":13753682,"url":"https://github.com/r9os/r9","last_synced_at":"2025-05-09T21:35:27.183Z","repository":{"id":161247082,"uuid":"617646028","full_name":"r9os/r9","owner":"r9os","description":"The R9 operating system","archived":false,"fork":false,"pushed_at":"2025-05-02T06:31:43.000Z","size":320,"stargazers_count":557,"open_issues_count":6,"forks_count":19,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-05-02T07:41:07.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r9os.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,"zenodo":null}},"created_at":"2023-03-22T20:17:55.000Z","updated_at":"2025-05-02T06:31:48.000Z","dependencies_parsed_at":"2024-02-28T23:23:02.529Z","dependency_job_id":"88b2c526-4687-46ab-8121-6a4794519f72","html_url":"https://github.com/r9os/r9","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/r9os%2Fr9","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r9os%2Fr9/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r9os%2Fr9/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r9os%2Fr9/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r9os","download_url":"https://codeload.github.com/r9os/r9/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253328972,"owners_count":21891559,"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":[],"created_at":"2024-08-03T09:01:27.247Z","updated_at":"2025-05-09T21:35:26.855Z","avatar_url":"https://github.com/r9os.png","language":"Rust","funding_links":[],"categories":["Rust","General Operating System","Influenced by Plan9"],"sub_categories":["Kernels"],"readme":"# r9\r\n[Plan 9](https://plan9.io/plan9/) in Rust\r\n\r\nR9 is a reimplementation of the plan9 kernel in Rust.  It is\r\nnot only inspired by but in many ways derived from the original\r\n[Plan 9](https://plan9.io/plan9/) source code.\r\n\r\n## Building\r\n\r\nWe use `cargo` and the `xtask` pattern to build the kernel.\r\n\r\nTo build r9 for x86_64, we assume you have cloned the git repository\r\nsomewhere convenient.  Then simply change into the top-level\r\ndirectory and, `cargo xtask build --arch x86-64`.\r\n\r\nTo build for aarch64, run `cargo xtask build --arch aarch64` (Currently only Raspberry Pi 3 is supported).\r\n\r\nThere are other useful `xtask` subcommands; run\r\n`cargo xtask help` to see what is available.\r\n\r\nRight now, r9 is not self-hosting.\r\n\r\n## Runtime Dependencies\r\n\r\n`cargo xtask dist`, which `cargo xtask qemu` depends on, requires `llvm-objcopy`. \r\nThis is expected to live in the rust toolchain path.  You can install by running:\r\n```\r\nrustup component add llvm-tools\r\n```\r\n\r\nIf you get `No such file or directory (os error 2)` messages, \r\nthen install `llvm` separate from the rust toolchain and set:\r\n```\r\nOBJCOPY=$(which llvm-objcopy) cargo xtask qemukvm\r\n```\r\n\r\nIf `No such file or directory (os error 2)` messages persist, \r\ncheck to ensure `qemu` or `qemu-kvm` is installed and the \r\n`qemu-system-x86_64` binary is in your path (or `qemu-system-aarch64` in the case of aarch64).\r\n\r\n## Running on Qemu\r\n\r\nR9 can be run using qemu for the various supported architectures:\r\n\r\n|Arch|Platform|Commandline|\r\n|----|--------|-----------|\r\n|aarch64|raspi3b|cargo xtask qemu --arch aarch64 --verbose|\r\n|aarch64|raspi4b|cargo xtask qemu --arch aarch64 --config raspi4b --verbose|\r\n|x86-64|q35|cargo xtask qemu --arch x86-64 --verbose|\r\n|x86-64 (with kvm)|q35|cargo xtask qemu --arch x86-64 --kvm --verbose|\r\n|riscv|virt|cargo xtask qemu --arch riscv64 --verbose|\r\n\r\n## Running on Real Hardware™️\r\n\r\nR9 has been run on the following hardware to a greater or lesser degree:\r\n- Raspberry Pi 4 (Gets as far as printing 'r9' via the miniuart)\r\n\r\n### Raspberry Pi, Netboot\r\n\r\nAssuming you can set up a TFTP server (good luck, it's incredibly fiddly, but for what it's worth, dnsmasq can work occasionally), and assuming the location of your netboot directory, you can build and copy the binary using the following command:\r\n```\r\ncargo xtask dist --arch aarch64 --verbose \u0026\u0026 cp target/aarch64-unknown-none-elf/debug/aarch64-qemu.gz ../netboot/kernel8.img\r\n```\r\n\r\nThis copies a compressed binary, which should be much faster to copy across the network.\r\n\r\nThe Raspberry Pi firmware loads `config.txt` before the kernel.  Here we can set which UART to use, amongst other things.  The following contents will set up to use the miniuart:\r\n```\r\nenable_uart=1\r\ncore_freq_min=500\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr9os%2Fr9","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr9os%2Fr9","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr9os%2Fr9/lists"}