{"id":13339092,"url":"https://github.com/jrbuchanan02/garbage-os","last_synced_at":"2025-03-11T12:31:16.041Z","repository":{"id":43045669,"uuid":"341970643","full_name":"jrbuchanan02/garbage-os","owner":"jrbuchanan02","description":"Operating System focusing on documenting itself and supporting as many systems as possible.","archived":false,"fork":false,"pushed_at":"2024-10-08T16:22:00.000Z","size":7446,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-24T00:22:28.566Z","etag":null,"topics":["operating-system-kernel"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrbuchanan02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-02-24T16:56:38.000Z","updated_at":"2024-10-07T22:42:15.000Z","dependencies_parsed_at":"2024-10-30T22:35:11.328Z","dependency_job_id":null,"html_url":"https://github.com/jrbuchanan02/garbage-os","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrbuchanan02%2Fgarbage-os","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrbuchanan02%2Fgarbage-os/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrbuchanan02%2Fgarbage-os/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrbuchanan02%2Fgarbage-os/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrbuchanan02","download_url":"https://codeload.github.com/jrbuchanan02/garbage-os/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243034825,"owners_count":20225411,"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":["operating-system-kernel"],"created_at":"2024-07-29T19:19:01.180Z","updated_at":"2025-03-11T12:31:16.026Z","avatar_url":"https://github.com/jrbuchanan02.png","language":"Makefile","readme":"# Garbage OS\nGarbage OS is an open-source operating system that:\n1. Does not take itself seriously\n2. Is intended to possibly educate on the functionality of Operating Systems\n3. Intends to support as many architectures as possible\n\nGarbage OS is distributed under the LGPL version 2.1 with the hopes that\nit will be useful. See the LICENSE file for more details.\n\n## Roadmap\n\nAll unchecked boxes are subject to change.\n\n1. [ ] Create a basic Kernel (version 0.x)\n    - [ ] Kernel version which spins the CPU indefinitely (0.0.x)\n    - [ ] Kernel version which features preemptive multitasking through an idle process and an init process that spins in place (0.1.x)\n    - [ ] Kernel version with preemptive multitasking and memory protections but nothing else (init process can be configured at compile-time to intentionally cause a kernel panic) (0.2.x)\n    - [ ] Kernel version with preemptive multitasking, memory protections, and the ability to load drivers (init process contains a list of drivers to start) (0.3.x)\n2. [ ] Create a commandline-based, self-hosted Operating System (version 1.x)\n    - [ ] Implement an ext2 filesystem driver that the kernel can correctly read and write to (1.0.x)\n    - [ ] Implement an installer which can set up a disk such that the kernel loads from that disk on startup (1.1.x)\n    - [ ] Write a command-processor program which runs (last) on startup and responds to user commands by either interpreting them\n          directly as a command or running the appropriate executable file (1.2.x)\n    - [ ] Port over programs necessary for the Garbage OS build process (1.3.x)\n\n## Why The Name Garbage OS?\n\nIt's kind of unprofessional, right? Originally, I intended for Garbage OS to be\nwritten in the D programming language and feature an OS-wide garbage collection\nservice. Later I realized just how complex a garbage collector would make the \noperating system! However, the name \"Garbage OS\" kind of stuck: it's ironically\nfunny to load a kernel named \"garbage.bin\" and have it run properly.\n\n## Ports\n\n| Instruction Set | Version Added | Status |\n| :-------------- | :-----------: | :----: |\n| i386            | 0.0.0         | in development |\n| ~~x64~~             | ~~0.0.0~~         | ~~in development~~ delayed |\n| RISC-V 32       | 0.0.0         | in development |\n| RISC-V 64       | 0.0.0         | in development |\n\nSupport notes:\n\ni386: Garbage OS assumes its kernel receives control in protected mode with ring 0 privileges.\n\nx64: Garbage OS assumes its kernel receives control in long mode with ring 0 privileges.\n\nRISCV-32: Garbage OS requires the RV32I base instruction set, control status registers (Zicsr),\nand Sv32 (i.e., Supervisor mode, User mode, and 32-bit paging). Most RISC-V processors will run\nthe RISC-V 32-bit version of the kernel.\n\nRISCV-64: Garbage OS requires the RV64I base instruction set, control status registers (Zicsr),\nand Sv39 (i.e., Supervisor mode, User mode, and 39-bit paging). Most 64-bit RISC-V processors\nwill run the RISC-V 64-bit version of the kernel. \n\n## Version Naming\n\nGarbage OS versions come in three numbers. The first number represents the major milestone of\nGarbage OS development. Versions where the first number is zero represent just the basic kernel, for example.\nThe second number in the version is the phase of that major milestone, for example versions starting\nwith 0.0 contain a kernel that (should) successfully load up on the target system and proceed to \nhold the processor in an infinite loop. The third number in the version represents any other updates: a larger\nnumber is a later version. This numbering scheme means the imaginary version 69.420.5678 is newer (and possibly\nmore stable or feature-rich) than 69.420.1234.\n\n## How to Build Garbage OS\n\nSince Garbage OS builds a cross compilation toolchains from source, Garbage OS requires the following tools installed\nand on the path to build properly:\n\n1. Git (if you cloned this repository, you should already have this)\n2. make (or some other tool capable of running the makefile)\n3. a C/C++ compiler capable of building GCC and GNU Binutils (included as packages together in most linux distributions)\n4. Bison\n5. Flex\n6. GMP (libgmp)\n7. MPC (libmpc)\n8. MPFR (libmpfr)\n9. Texinfo\n\nTo initialize the internal repositories, cloning GCC and binutils, run `make init`. Be warned: GCC and binutils are\nvery large repositories, `make init` will take some time. You can run `make init` on multiple threads, however, since\nthe makefile is only cloning two repositories, you will only benefit from allowing two jobs to run in make.[^1]\n\nTo build all cross toolchains, run `make build_toolchains`. This command will configure and build all necessary\nversions of the cross compiler. First building all binutils versions then building all GCC versions. The makefile\nprocesses architectures in alphabetical order (so riscv32 is between i386 and x86_64). The build_toolchains command\ndoes not speed up with multiple threads, however, it does run the make process for the toolchains with multiple \nthreads (currently programmed at 16).\n\n[^1]: `make superclean` removes the dependencies folder. You should never need this command but it's there.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrbuchanan02%2Fgarbage-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrbuchanan02%2Fgarbage-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrbuchanan02%2Fgarbage-os/lists"}