• dlachausse 3 months ago |
    Very cool hobby OS project! MIT license and an impressive list of software that is supported…

    https://www.fiwix.org/packages.html

  • giantrobot 3 months ago |
    ...it won't be big and professional like HURD.
  • notorandit 3 months ago |
    Looks somehow similar to Minix.

    I like the idea of people tinkering with os stuff.

  • kragen 3 months ago |
    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
    • yjftsjthsd-h 3 months ago |
      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.
      • kragen 3 months ago |
        yeah, i'm pretty sure that's working, though i've been out of touch with the live-bootstrap project for a few months
      • ryan77627 3 months ago |
        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.

        [1]: https://github.com/fosslinux/live-bootstrap

        • yjftsjthsd-h 3 months ago |
          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:)
      • alganet 3 months ago |
  • rurban 3 months ago |
    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.
    • dlachausse 3 months ago |
      I think a lot of it is availability of software. If you support enough POSIX things compile with minimal patches.
      • rurban 3 months ago |
        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
        • dmitrygr 3 months ago |
          I look forward to the kernel, user space, compilers, and web browser you will author from scratch
          • kragen 3 months ago |
            you're about halfway there yourself, as i recall

            it's an appealing project, and i think there's potential to do better than posix, but it's easier to do worse

            • dmitrygr 3 months ago |
              > it's easier to do worse

              Bingo. Personally, i always disliked POSIX and preferred NT's way of doing things. Synchronous IO by default is silly.

              • kragen 3 months ago |
                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?
        • hnlmorg 3 months ago |
          They’re also insanely old. Plus the entire reason for Unix was because it was smaller and simpler than Multics.

          I do get your sentiment though. But it’s an unrealistic ask. Particularly for a hobby project.

        • kelnos 3 months ago |
          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.
        • kragen 3 months ago |
          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)?
          • kragen 3 months ago |
            (admittedly newlib is about 350kloc)
          • amszmidt 3 months ago |
            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).

            • kragen 3 months ago |
              i greatly appreciate your very informed opinion!
      • userbinator 3 months ago |
        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.)
        • shiomiru 3 months ago |
          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.)

        • jeroenhd 3 months ago |
          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.
    • alganet 3 months ago |

        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.
      
      There are plenty of valid reasons.
    • screcth 3 months ago |
      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.

    • kragen 3 months ago |
      this is relevant to my interests! where can i read about the design you favor?
    • benchloftbrunch 3 months ago |
      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.

  • chriscappuccio 3 months ago |
    Similar to early/mid 90s Linux or BSD
  • dajtxx 3 months ago |
    Very impressive!
  • userbinator 3 months ago |
    "Unix-like kernel for the i386 architecture" is exactly what Linux started out as. Good to see others following in Torvalds' footsteps.
    • f1shy 3 months ago |
      Should we say AST steps?!
      • kragen 3 months ago |
        minix didn't start out on the i386
  • justanother 3 months ago |
    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.