{"id":17835692,"url":"https://github.com/rob2309/simpleos2","last_synced_at":"2025-10-05T03:32:37.464Z","repository":{"id":71893961,"uuid":"165911751","full_name":"Rob2309/SimpleOS2","owner":"Rob2309","description":"SimpleOS2 is a very simple x86_64 OS I am creating for learning purposes.","archived":false,"fork":false,"pushed_at":"2021-04-23T12:01:46.000Z","size":3676,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T19:52:53.828Z","etag":null,"topics":["amd64","apic","apic-timer","asm","c","cpp","efi","efi-development","kernel","operating-system","operating-system-learning","process-management","uefi","uefi-boot","uefi-development","x86","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rob2309.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":"2019-01-15T19:36:53.000Z","updated_at":"2024-02-12T20:42:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"5196d1ec-d524-4dac-a6de-c2c232eb6820","html_url":"https://github.com/Rob2309/SimpleOS2","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/Rob2309%2FSimpleOS2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rob2309%2FSimpleOS2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rob2309%2FSimpleOS2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rob2309%2FSimpleOS2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rob2309","download_url":"https://codeload.github.com/Rob2309/SimpleOS2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006260,"owners_count":20382441,"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":["amd64","apic","apic-timer","asm","c","cpp","efi","efi-development","kernel","operating-system","operating-system-learning","process-management","uefi","uefi-boot","uefi-development","x86","x86-64"],"created_at":"2024-10-27T20:24:24.647Z","updated_at":"2025-10-05T03:32:32.444Z","avatar_url":"https://github.com/Rob2309.png","language":"C","readme":"# SimpleOS2\n\nThis is a very simple x86_64 OS I am creating for learning purposes.\n\n## Implemented features:\n- Simple UEFI Bootloader (to be replaced by GRUB in the future?)\n- Physical and Virtual memory management\n- Terminal that can print 32-Bit colored text and receive keyboard input\n- Interrupt handling\n- APIC Timer support\n- IOAPIC support\n- User mode processes\n- Kernel Threads\n- Multitasking \u0026 Multithreading\n- System calls via syscall instruction\n- Linux-like virtual file system (with mount support)\n- file system permissions with read, write, execute and setuid permissions\n- FileSystem driver API\n- Character- and BlockDevice driver API\n- Multi-Core support\n- Usermode SSE \u0026 FPU support\n- Basic shell that can run programs with command line arguments\n- Basic ACPI support using ACPICA (currently only shutdown supported)\n- Basic readonly Ext2 driver (used for ramdisk)\n- Usermode C++ library for basic interaction with the Kernel (Function definitions for all important syscalls)\n\n## Planned features:\n- HDD support (SATA)\n- USB support (madness)\n- IP Stack\n- Full C library support\n\n## Specs\nThis OS should basically run on any x86_64 machine that supports UEFI. If you find a machine that does not work with SimpleOS2, please contact me.\n\n## Building SimpleOS2\n### Prerequisites\n- Some kind of Linux environment (or WSL)\n- Standard 64-Bit Elf GCC\n- Standard 64-Bit mingw GCC\n- NASM\n- mtools\n- debugfs\n- parted\n### Build commands\n- ``make depcheck``:            check if all dependencies are installed\n- ``make partition``:           build a raw partition image that contains the OS\n- ``make disk``:                build a raw disk image that contains the OS\n- ``make diskvbox``:            build a virtualbox disk image (.vdi) that contains the OS\n- ``make clean``:               remove everything but the sources\n\n## Emulating SimpleOS2\n- ``make runkvm``:              run the OS in qemu (requires qemu-system-i86_64)\n- ``make runvbox``:             run the OS in VirtualBox (Requires a VirtualBox machine with name 'SimpleOS2' and partition.vdi as hard disk, chipset has to be ICH9)\n- ``make debug``:               run the OS in qemu and debug it in GDB\n\n## Configurations\n- every command above can be followed by ``config=Release`` or ``config=ReleaseDbg`` to use/build a Release configuration of the OS\n\n## Running on real Hardware\nI have run SimpleOS2 on my own hardware several times and never encountered any damage. Nevertheless, I do not take any responsibility for any kind of damage to your system! Since SimpleOS2 has no disk writing functionality yet, data corruption is pretty much impossible.\n\n## Modifying SimpleOS2\n[DEVELOPMENT.md](DEVELOPMENT.md) contains information for developers who want to have fun with SimpleOS2\n\n## Lessons learned\n- When your Code works on Qemu but triple faults on VirtualBox, you have missed some very important minor detail in the AMD64 spec\n- When your Code works on VirtualBox but triple faults on Qemu, chances are Qemu does not recognize that you've written to the KernelGSBase MSR (you have to write 0 to gs and fs)\n- When your SMP Code crashes when booting more that two Processor Cores, they are probably booting on the same stack (took 2 days to find this stupid bug)\n- *NEVER* *EVER* forget that stacks grow down. I spent multiple days searching seemingly random bugs, just to notice that I allocated a memory area for some stack and forgot that the stack should begin at the **end** of the allocated space\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob2309%2Fsimpleos2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frob2309%2Fsimpleos2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob2309%2Fsimpleos2/lists"}