Get the latest tech news
Writing a Unix clone in about a month
I needed a bit of a break from “real work” recently, so I started a new programming project that was low-stakes and purely recreational. On April 21st, I set out to see how much of a Unix-like operating system for x86_64 targets that I could put together in about a month.
PCI (legacy) AHCI block devices GPT and MBR partition tables PS/2 keyboards Platform serial ports CMOS clocks Framebuffers (configured by the bootloaders) ext4 and memfs filesystems Reasonably complete terminal emulator and somewhat passable termios support Some 40 syscalls, including for example clock_gettime, poll, openat et al, fork, exec, pipe, dup, dup2, ioctl, etc Colossal Cave Adventure (advent) dash (/bin/sh) Doom gzip less (pager) lok (/bin/awk) lolcat mandoc (man pages) sbase (core utils) tcc (C compiler) Vim 5.7
Or read this on Hacker News