{"id":20637074,"url":"https://github.com/travorlzh/foos","last_synced_at":"2025-04-15T21:50:22.529Z","repository":{"id":162217234,"uuid":"143869928","full_name":"TravorLZH/foos","owner":"TravorLZH","description":"FOOS's Overcoming Operating System","archived":false,"fork":false,"pushed_at":"2019-07-13T09:19:20.000Z","size":220,"stargazers_count":26,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T01:51:37.463Z","etag":null,"topics":["kernel","operating-system"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TravorLZH.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","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":"2018-08-07T12:26:42.000Z","updated_at":"2024-05-29T01:13:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3fc25b2-3b11-4425-ad9f-329e6b94b7fe","html_url":"https://github.com/TravorLZH/foos","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TravorLZH%2Ffoos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TravorLZH%2Ffoos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TravorLZH%2Ffoos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TravorLZH%2Ffoos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TravorLZH","download_url":"https://codeload.github.com/TravorLZH/foos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249161104,"owners_count":21222468,"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":["kernel","operating-system"],"created_at":"2024-11-16T15:12:54.504Z","updated_at":"2025-04-15T21:50:22.521Z","avatar_url":"https://github.com/TravorLZH.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FOOS's Overcoming Operating System\n[![AppVeyor Branch][appveyor]](https://ci.appveyor.com/project/TravorLZH/foos)\n[![Github Tag][tag]](https://github.com/TravorLZH/foos/releases)\n[![Github License][license]](LICENSE)\n\nFOOS still remains as a **hobbyist research purpose** operating system, so use\nit _wisely_.\n\n## Currently implemented\n\n* Bootloader\n* 32-bit C kernel\n* Interrupts and Interrupt Requests\n* Programmable Interval Timer\n* Teletype Device (Both printing and keyboard\n* Memory Management (Paging and Page Frame Allocator)\n* Hardware Abstraction Layer (`dev_write()`, `dev_read()`, etc.)\n* Simple `malloc()` from scratch that is `free()`able\n* Virtual File System\n* RAM Drive\n* Serial Ports\n\n## Currently wished to implement\n* Loading kernel with BIOS's extended read\n* Floppy Disk Controller\n* Loadable Kernel Module\n* Multitasking\n* User Space\n\n## Build\nThe process of building FOOS is not that complicated since it has not been a\nhuge, powerful, and charming operating system.\n\u003e However, without the support of a decent home-brewed toolchain, the difficulty\nwill be increased\n\n### Prerequisites\nThis OS is targeting x86 processors, so you need to have `i386-elf` toolchain\ninstalled before building.\n\u003e **libgcc** is optional in this case\n\nChange `Makefile`'s `CC`, `AS`, and `LD` to your toolchain and run:\n```shell\n$ make dep\n$ make\n```\nYou can also type `make run` to play the OS if you have `qemu-system-i386`\ninstalled.\n\n\u003e Due to the convenience, the GNU's command line tools are preferred over BSD's,\n\u003e so make sure [`sed`][sed] in the host system is a GNU software.\n\n## Images\nHarddisk images are supported:\n* *bootdisk.img:* 1st hard disk channel (DAP is used to load _system_)\n* *ramdisk.img:* 2nd hard disk channel\n\n## RAM Disk\nFOOS has two filesystem models. One is made from scratch that does not support\nsubdirectories, and the other is implemented through an ancient standard (TAR\nfilesystem).\n\n### RAMFS\n```c\nstruct rd_header {\n\tuint16_t signature;\n\tuint16_t nfiles;\n};\n\nstruct rd_fileheader {\n\tuint32_t magic;\n\tchar name[32];\n\tuint32_t offset;\n\tuint32_t size;\n};\n```\n\u003e Detailed declarations can be found in [`include/foos/ramfs.h`][1]\n\nThe first structure is the header of the whole ramdisk image, and it tells\nhow many files this filesystem has. After this header, an array of fileheaders\nfollows. Most of the fields are self-explanatory, but `offset` tells where the\ncontent of a files starts, so `offset + size` is where the file ends\n\n### TAR filesystem\n\nThis filesystem is apparently more powerful than the one shown above, in which\nit supports subdirectory and more unix fields. The structure of its header\nshould look like this:\n```c\nstruct tar_header {\n\tchar filename[100];\n\tchar mode[8];\n\tchar uid[8];\n\tchar gid[8];\n\tchar size[12];\n\tchar mtime[12];\n\tchar chksum[8];\n\tchar type;\t// Identify what type the file is\n\tchar linkname[100];\n\tchar ustar[6];\n\tchar ustar_ver[2];\n\tchar owner[32];\n\tchar group[32];\n\tchar padding[183];\n\tchar data[];\t// To access the content if it is a file\n};\n```\nI am not going to explain this, but you can find more information in\n[Wikipedia][2]\n\n[appveyor]: https://ci.appveyor.com/api/projects/status/github/TravorLZH/foos?svg=true\n[tag]: https://img.shields.io/github/tag/TravorLZH/foos.svg\n[license]: https://img.shields.io/github/license/TravorLZH/foos.svg\n[sed]: https://www.gnu.org/software/sed\n[1]: include/foos/ramfs.h\n[2]: https://en.wikipedia.org/wiki/Tar_(computing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravorlzh%2Ffoos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravorlzh%2Ffoos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravorlzh%2Ffoos/lists"}