{"id":41858804,"url":"https://github.com/dmarro89/go-dav-os","last_synced_at":"2026-01-25T11:09:23.499Z","repository":{"id":331699771,"uuid":"1119389777","full_name":"dmarro89/go-dav-os","owner":"dmarro89","description":"A 32-bit freestanding OS kernel written in Go, booted via GRUB/Multiboot, with VGA terminal, PS/2 keyboard, IDT/PIC/PIT, a debug shell, a bitmap page frame allocator, and an in-memory filesystem","archived":false,"fork":false,"pushed_at":"2026-01-10T21:01:27.000Z","size":47,"stargazers_count":61,"open_issues_count":13,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-11T06:29:21.552Z","etag":null,"topics":["bare-metal","bare-metal-programming","go","golang","grub","kernel","operating-system","operating-system-kernel","operating-system-learning","operating-systems-project","osdev","osdev-project","osdev-projects","qemu"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dmarro89.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-19T07:41:35.000Z","updated_at":"2026-01-10T22:23:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dmarro89/go-dav-os","commit_stats":null,"previous_names":["dmarro89/go-dav-os"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dmarro89/go-dav-os","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarro89%2Fgo-dav-os","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarro89%2Fgo-dav-os/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarro89%2Fgo-dav-os/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarro89%2Fgo-dav-os/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmarro89","download_url":"https://codeload.github.com/dmarro89/go-dav-os/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarro89%2Fgo-dav-os/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28752663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bare-metal","bare-metal-programming","go","golang","grub","kernel","operating-system","operating-system-kernel","operating-system-learning","operating-systems-project","osdev","osdev-project","osdev-projects","qemu"],"created_at":"2026-01-25T11:09:22.824Z","updated_at":"2026-01-25T11:09:23.488Z","avatar_url":"https://github.com/dmarro89.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-dav-os\n\nHobby project to dig deeper into how an OS works by writing the bare essentials of a kernel in Go. Only the kernel lives here (gccgo, x86_64 long mode); BIOS and bootloader are handled by battle-tested tools (GRUB with a Multiboot2 header). No reinvention of those pieces.\n\n## What’s inside\n\n- Boot: `boot/boot.s` exposes the Multiboot2 header and `_start`, sets up a 16 KB stack, enables long mode, and jumps into `kernel.Main`\n  - The Multiboot2 info pointer is passed to `kernel.Main(...)` in `RDI`\n  - Freestanding helpers live in `boot/` as well (minimal stubs + `memcmp` to keep the build libc-free)\n\n- Kernel: `kernel/` in Go, freestanding build with gccgo\n  - IDT + PIC remap + PIT init\n  - Tick counter from the PIT and a `hlt`-based idle loop when there’s no input\n\n- Terminal: `terminal/` writes to VGA text mode 80x25, manages cursor, scroll, and backspace\n\n- Keyboard: `keyboard/` reads from PS/2 and maps keys with the Italian layout only (temporary)\n\n- Tiny shell: interactive prompt + basic line editing, commands are mostly for debugging\n\n- Memory: `mem/`\n  - Multiboot2 memory map parsing (`mmap` and `mmapmax` commands)\n  - A minimal 4KB page frame allocator backed by a bitmap placed inside usable memory (`pfa/alloc/free`)\n\n- Filesystem: `fs/`\n  - Minimal in-memory FS backed by allocated pages (`ls/write/cat/rm/stat`)\n  \n## Architecture\n\n![DavOS Architecture](docs/architecture.png)\n\n## Project status\n\n- Experimental, single-core\n- 64-bit only (x86_64 long mode); 32-bit is no longer supported\n- Basic paging (identity map), no real storage drivers yet\n- Runs in x86_64 long mode, meant for QEMU/GRUB, no UEFI\n- Go runtime pared down: freestanding build (no standard library) with just the stubs the toolchain ends up expecting\n\n## Dependencies\n\n- Via Docker (recommended): Docker with `--platform=linux/amd64`\n- Native (if you want to do it manually): cross toolchain `x86_64-elf-{binutils,gccgo}`, `grub-mkrescue`, `xorriso`, `mtools`, `qemu-system-x86_64`\n\n## Build and run (Docker)\n\n```bash\ndocker build --platform=linux/amd64 -t go-dav-os-toolchain .\ndocker run --rm --platform=linux/amd64 \\\n  -v \"$PWD\":/work -w /work go-dav-os-toolchain \\\n  make            # builds build/dav-go-os.iso\nqemu-system-x86_64 -cdrom build/dav-go-os.iso\n```\n\nQuick targets from the Makefile\n- `make docker-build-only` builds the image and the ISO\n- `make run` (outside Docker) runs QEMU on an existing ISO\n\n## Build natively\n\nAssuming an `x86_64-elf-*` toolchain is installed\n\n```bash\nmake\nqemu-system-x86_64 -cdrom build/dav-go-os.iso\n```\n\nTo force cross binaries: `make CROSS=x86_64-elf`\n\n## What you’ll see on screen\n\n- On boot the prompt `\u003e ` shows up\n- `help` lists commands, `clear` wipes the screen, `about` prints kernel info\n- The kernel idles with `hlt` when nothing is happening\n\n### Shell commands (current)\n\n- `help`, `clear`, `about`, `echo`\n- `ticks` (PIT tick counter)\n- `mem \u003chex_addr\u003e [len]` (hexdump)\n- `mmap`, `mmapmax` (Multiboot memory map and highest usable end)\n- `pfa`, `alloc`, `free \u003chex_addr\u003e` (page allocator)\n- `ls`, `write \u003cname\u003e \u003ctext...\u003e`, `cat \u003cname\u003e`, `rm \u003cname\u003e`, `stat \u003cname\u003e` (filesystem)\n- `version` (OS name and version)\n\n## Other folder layout\n\n- `iso/`: GRUB config and ISO packaging bits (grub.cfg)\n- `boot/`: also contains the linker script (linker.ld) and a couple of freestanding helpers used by the build\n- `build/`: build output (ISO + ELF)\n\n## Contributing\n\nContributions are welcome! This project is still early-stage and intentionally minimal, so **small PRs** are the best way to help.\n\n- Review [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines\n- Check issues labeled [`good first issue`](../../labels/good%20first%20issue) or [`help wanted`](../../labels/help%20wanted)\n- Open a [Discussion](../../discussions) to propose an idea or ask a question\n  \n\n## Final note\n\nPersonal, open-source, work-in-progress. I’m building pieces as I learn them—the goal is understanding, not chasing modern-OS feature lists\n\n## Contribution\nThanks to:\n@metacatdud for taking care of the entire migration from 32 to 64 bit architecture - really amazing work!\n@ranjan42 for the useful documentation added and the implementation of the scheduled and the command history\n@jgafnea for improving the shell and documenting the contributing section\n@soorya38 for taking care of a missing part of the project - the unit tests!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarro89%2Fgo-dav-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmarro89%2Fgo-dav-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarro89%2Fgo-dav-os/lists"}