fiwix is a crucial part of bootstrapping the modern software environment from a small enough 'seed' binary that you can hand-verify the binary; it's a kernel that you can compile without a kernel to run the compiler on. as such, its importance goes far beyond the hobby project its unassuming readme paints it as
Can it do a (cross-?)compile of Linux and enough userland to bootstrap up to a Linux system? I see that it says gcc 4.7 so I'd guess that it should be possible, but I'm curious if anyone's actually done it.
I believe so! I did some messing around with the whole "bootstrappable" suite of repos a few months ago and I remember there was a repo [1] that automated the chain of bootstrapping from a project known as hex0 to Linux 4.9 (iirc) inside qemu using fiwix as an intermediary. I didn't have the time to experiment past running it and verifying it works (it did, took my poor laptop around 10 or so hours to run from start to finish), but I presume I would have been able to compile the latest versions of GCC and Linux from the final state of the VM it made. I may still have the image it made lying around somewhere.
I agree that it's sufficient to bootstrap to an older Linux-based system, since the path from there to a full modern system is well-trodden. That's very cool then, thanks for the link:)
I wonder why you want POSIX compatibility when you start a new OS from scratch. All this broken and weird stuff, like signals, buffered synchronous IO, strings, locale, ... can be written in a functional, safe and modern way, enabling safety and performance, which is just not possible with POSIX.
1. You want to run POSIX-compatible software in a context that existing kernels won't support.
2. You want to understand how POSIX works.
3. You want to write a kernel but not design it, and POSIX offers plenty of references.
4. You want to optimize something about POSIX implementations and needs a bottom-up approach.
If you're going purely for availability of software, then the Win32 API would probably be a good target, but it's much bigger than POSIX (largely due to including GUI features.)
With how little even projects like Wine cover, I don't think full coverage of the Windows API is happening. You could target an older subset (3.1, 9x) but then you'd probably also need to implement fake DOS behaviour and weird hardware to get many applications to run.
Wouldn't you need ABI compatibility too? POSIX stuff is normally available in a source form, but that's much more rare in Win32 stuff.
The good thing about POSIX is that you can theoretically port wine too at some point, and then you get both. (Though I am aware that this is not very easy either, would be interested in the opinion of somebody with wine porting experience.)
It's better to write everything from scratch when the foundation is broken. Look at the lisp machine or Concurrent PASCAL. These systems were insanely small
blocking i/o makes simple things simpler, but it also makes hard things harder. having only blocking i/o can make hard things much harder. maybe it would make more sense to put blocking i/o in a library instead of the system call interface?
Better is subjective. And if I were to take on a hobby kernel project, I might not have the time or energy to also write my own compiler, shell, basic utilities, windowing system, browser, etc. from scratch.
genera is kind of big actually (fiwix is only 50kloc, and some of that is the fault of the hardware), but there were a lot of different lisp machines. which ones do you mean? do you have one running (presumably in emulation)?
Genera is quite a bit larger than that, the rel-8-5 tree is 1.2 MLOC (though this includes other things, like Pascal, Fortran and a C compiler).
But even if we take the MIT Lisp Machine system, which is smaller, it is still 450 KLOC. Just the microcode that implements the Lisp Machine on the CADR around 25 KLOC.
The Lisp Machine system is also _very_ complicated under the hood when it comes to the core system, and one of the reasons why Unix succeeded.
It is also a system that is a total PITA to modify in incompatible ways, since you are always modifying the running system. There is no such thing as an executable file in the same sense as on Unix that you can copy and keep around, e.g. if you modify the compiler on Unix you can easily keep a backup copy of 'cc' and keep running that when you screw up.
On the Lisp Machine you can't keep two compilers around at the same time without essentially creating a fork of it with all new names (and even then it might not work).
Because an OS is useless without applications that run on it and POSIX compatibility means that existing software can be ported to it with minimal changes.
If it had a custom interface, then porting large projects would be an enormous undertaking.
I too am curious about the, imo, overemphasis on Unix clones in research and hobbyist OS development.
All the shenanigans with modern Windows aside, I am genuinely a fan of NT's design, think it does several things better than POSIX and Linux in particular (notably, the things you mentioned, plus anything to do with device drivers) and wish the open source OS world took more inspiration from it.
Yeah I know ReactOS exists, but it's held back by its lofty goal of being a complete, bug for bug compatible Windows clone with full Win32 userland, when I'd be happy with just an open source NT-like kernel.
Not sure if this was intended, but in Belizean creole, "Fi Wi" (pronounced "fee wee", not like WiFi) means "ours" or "for us." Good name for an MIT-licensed kernel project.