{"id":13739902,"url":"https://github.com/dreamos82/Dreamos64","last_synced_at":"2025-05-08T19:35:07.344Z","repository":{"id":37891679,"uuid":"343241779","full_name":"dreamos82/Dreamos64","owner":"dreamos82","description":"My experiments with osdev... again","archived":false,"fork":false,"pushed_at":"2024-11-09T13:42:56.000Z","size":541,"stargazers_count":164,"open_issues_count":20,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-09T14:25:48.853Z","etag":null,"topics":["assembly","c","kernel","operating-system","operating-system-development","operating-system-kernel","operating-system-learning","operating-systems-project","osdev","x86-64"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreamos82.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":"dreamos82","patreon":"inuyasha82","open_collective":null,"ko_fi":"dreamos82","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-02-28T23:52:45.000Z","updated_at":"2024-11-08T13:29:48.000Z","dependencies_parsed_at":"2023-11-18T12:24:29.616Z","dependency_job_id":"dff9ab64-93cf-4427-95cf-8f567c6dbf3b","html_url":"https://github.com/dreamos82/Dreamos64","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/dreamos82%2FDreamos64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamos82%2FDreamos64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamos82%2FDreamos64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamos82%2FDreamos64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreamos82","download_url":"https://codeload.github.com/dreamos82/Dreamos64/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224758230,"owners_count":17364973,"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":["assembly","c","kernel","operating-system","operating-system-development","operating-system-kernel","operating-system-learning","operating-systems-project","osdev","x86-64"],"created_at":"2024-08-03T04:00:39.189Z","updated_at":"2025-05-08T19:35:07.302Z","avatar_url":"https://github.com/dreamos82.png","language":"C","readme":"# DreamOS64\n\n\n[![C/C++ CI](https://github.com/dreamos82/Dreamos64/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/dreamos82/Dreamos64/actions/workflows/c-cpp.yml) [![Discord Chat](https://img.shields.io/discord/578193015433330698.svg?style=flat)](https://discordapp.com/channels/578193015433330698/578193713340219392) ![](https://tokei.rs/b1/github/dreamos82/Dreamos64)\n\nDreamOS64 is just my recent attempt to write a kernel again after many years far from osdev,\nBut this time in 64bit.\n\nIt is not a real replacement of the original DreamOS, and i don't really have any long term plans for it at the moment.\n\nI started this project because i was missing the excitement of low-level programming :)\n\n## What it does\n\nActually not much! :D\n\nIt just prints the OS name, a logo and few other string.\n\nBut at kernel level several things have been implemented:\n\n* Long mode\n* Kernel load in higher half\n* Basic I/O functions (using the VGA bios)\n* Basic framebuffer support (it can print strings on the screen, but only on the first half of the screen, the second half will cause a #PF for now)\n* IDT Support\n* It can load the kernel using 4kb pages or 2Mb pages\n* Added support to access paging data structures with recursion tecnique.\n* Implemented basic physical memory manager\n* Enabled paging\n* Implement basic kheap memory manager\n* Added basic kmalloc, kfree\n* Support Acpi V1 and V2\n* Local Apic support\n* IO-Apic support (Keyboard IRQ enable)\n* Suppoort for PSF v1 and v2 fonts in framebuffer mode\n* Basic keyboard driver and keyboard map (most of the keys are mapped)\n* It prints the Epoch time! :)\n* Extremely basic multi-task/multi-thread support\n* Thread switching, thread_sleep and basic spinlock implementation\n* Basic Virtual Memory implementation\n* Initial Userspace support (so far can run only an idle userspace thread)\n* Basic syscall mechanism (altough no real syscalls are implemented, just one that prints the string \"example\")\n* Initial basic ELF support (from kernel module)\n\n## Prerequisites:\n\nThese are the packages required to build and run it:\n\n* nasm\n* qemu and qemu-kvm\n* grub-mkrescue\n* grub-pc-bin\n* xorriso\n* mtools\n* Gcc cross compiler or Clang\n\nTo build _Dreamos64_, a toolchain that supports the target architecture is required,  it can be either   `gcc`  (in our case `x86-64`) or `clang` installed.\n\nA complete guide on how to build the `gcc` cross-compiler, can be found [here](https://github.com/dreamos82/Osdev-Notes/blob/master/99_Appendices/E_Cross_Compilers.md), for `DreamOS64` the target architecture will be `x86-64`.\n\nFor `clang` we just need to install the `llvm`and the `lld` packages (the exact package name depends on the distribution used).\n\n## Compiling and Running the OS\n\nFor a  complete guide on how to build _DreamOS64_ and the parameters that are availables is in the docs folder: [docs/Building.md](docs/Building.md).\n\n### Build the OS\n\nBefore building the os we need to copy a PSF font (either v1 or v2) in the fonts folder, and change its name to `default.psf` (even if we are building with framebuffer off).\n\nOnce all the parameters in `build/Config.mk` are set, to build just type:\n\n```bash\n    make\n```\n\nIt will use the default goal `build` and produce a bootable iso in the `dist/` folder called.\n\n## Run and Debug\n\nTo launch the OS in qemu just use:\n\n```bash\n    make run\n```\n\nInstead if we type:\n\n```bash\n   make debug\n```\n\nIt will compile the OS with the debug symbols enabled, all the output logging information will be sent to stdio.\n\nFinally:\n\n```bash\n   make gdb\n```\n\nWill compile the OS with debug symbol, and launch qemu with remote debugging enabled and will wait connection from gdb to start.\n\n\n### Unit tests\n\nThere is a small set of tests implemented using asserts, if you want to run them just run:\n\n```bash\nmake tests\n```\n\n### Known issues\n\n* If at boot with qemu you get the following error message:\n\n```\n\tBooting from DVD/CD...\n\tBoot failed: Could not read from CDROM (code 0009)\n```\nThis means you are missing the grub-pc-bin package, and you need to install it.\n\n* If the linking steps fail with several errors message like:\n\n```\nsrc/kernel/framebuffer/framebuffer.c:122: undefined reference to `_binary_fonts_default_psf_start'\n```\n\nThis means that the fonts folder is missing (you need either a psf v2 or v1 font file in the fonts folder, the file has to be called default.psf)\n\n### And now show time! :)\n\n![image](https://github.com/dreamos82/Dreamos64/assets/59960116/6a572f8a-9229-4a7d-8f15-be4d2dbcb6d3)\n\n\n### Acknowledgements\n\nWell so far a big thank you goes to [DeanoBurrito](https://github.com/DeanoBurrito) that implemented several stuff for Dreamos64 (x2apic, fixed some bugs, logging, and more to come...) not to mention his precious help explaining things and reviewing my crappy code :)\nAnd his operating system is worth a mention too: [NorthPort](https://github.com/DeanoBurrito/northport)\n\nFinally if you are interested in how to develop your own kernel, you can head to [https://github.com/dreamportdev/Osdev-Notes/](https://github.com/dreamportdev/Osdev-Notes/) a project  mantained by me, and [DeanoBurrito](https://github.com/DeanoBurrito) on how to write a kernel from scratch.\n\n","funding_links":["https://github.com/sponsors/dreamos82","https://patreon.com/inuyasha82","https://ko-fi.com/dreamos82"],"categories":["Open Source Operating Systems"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamos82%2FDreamos64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreamos82%2FDreamos64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamos82%2FDreamos64/lists"}