Hacker News new | ask | show | jobs
by ilovecookiestoo 3271 days ago
Say I want to create an independent, 100% compatible implementation of Linux which can just drop-in to any Linux installation, no matter how it is configured and have it work?

Where can I download the precise set of requirements for this, so that I don't have to peek at the Linux source code?

What is Linux?

Really, this doesn't make sense.

3 comments

GNU/Linux implemented Unix without working with proprietary source code from AT&T. Those people documented their stuff thoroughly and even created international standards.

A good many of the Linux system calls and glibc functions are documented by POSIX. That doesn't cover 100%.

We can start by looking here:

https://www.kernel.org/doc/

The Linux man pages project covers system calls:

http://man7.org/linux/man-pages/dir_section_2.html

Many of these don't correspond to anything in POSIX, or not directly, so this documentation is crucial to anyone wanting to replicate Linux.

Microsoft seems to have done such a thing:

https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux

"WSL provides a Linux-compatible kernel interface developed by Microsoft (containing no Linux kernel code) [...]"

However, in all likelihood, they peeked at Linux code here and there.

Say I want to create an independent, 100% compatible implementation of Unix which can just drop-in to work on any X86 processor, no matter how it is configured and have it work?

FTFY

How can people drop a comparison between a kernel and a supposed init and not stop and go "wait, what?!".

Having a would be second kernel metastasizing in userspace is no a good thing, full stop.