I have pondered this for a while. The smallest I could think of was something that fits into a boot sector, and lets you read and write raw bytes from the disk. In theory you could rewrite and expand the OS from that. Though I wonder the same for say 32bit PM or 64bit LM. Any thoughts for those two?
My thoughts:
I suppose for 32bit PM and 64bit LM it would be pretty similar, assuming we allow legacy hardware that is, if not then we need to parse ACPI and it instantly becomes huge (beyond 8KB easily with full AML parsing IMO). You would also need to build your own everything really compared to 16bit mode. I suppose the most minimalist 32bit system would poll the keyboard for inputs, parse them, and allow writing and reading from disk to program the manual bytes over ATA. Same could go for a 64bit system using legacy hardware, though the moment you drop legacy hardware you would need ACPI, IOAPIC and LAPIC, GSI routing, and of course the almighty USB stack (unless you use the (usually) shoddy PS/2 emulation provided by most firmwares), and of course no VGA text mode means you need some form of framebuffer from the bootloader used, you would also need a full SATA and M.2 driver to even get to writing bytes to the disk.
What could the smallest selfhosting OS be?
- AnotherIdiot
- Member

- Posts: 31
- Joined: Sat Sep 28, 2024 8:00 pm
- Location: Ohio, USA
- GitHub: https://github.com/apixeldev
- Contact:
What could the smallest selfhosting OS be?
Every CPU manufacturer sucks, make your own CPU 