So, this weekend I'm playing with Fiwix. Fiwix (https://fiwix.org/) is a small hobbyist operating system for i386 that aims to be Linux 2.0 compatible while being small enough that a single human could understand it as a whole (it's ~30k SLOC, self-hosted, and can be built with tcc).

A couple of years ago Fiwix was used in a fun project of "let's bootstrap a Linux system with only tiny tools that can be understood by a single person": https://github.com/fosslinux/live-bootstrap/blob/master/parts.rst

My refreshed interest in it comes from multiple sources: first, there is now a TCP/IP stack (still WIP). Second, GNU/Linux is *gestures ambiguously* in a strange state, so it is interesting to see how far one could get with a completely non-BSD non-standard tiny, toy-like operating system.

The installation is quite straightforward. "Please keep in mind this kernel is not yet suited for production. Use at your own risk!" is, in itself, a proof of reliability.

This is a beginning of a slow-going🧵

FiwixOS comes with quite a few ports, and will require close to 1GB on a disk. I suppose this is because the packages are not particularly optimised in size. The biggest packages beyond the base and GCC are Python3, Perl, ZX Spectrum emulator and Doom/Heretic.

Also, look at this Halt message, so cute!

The system is small, but functional. At the same time, there are quite a few sharp corners, unfinished and untested things.

The list of packages/ports is small, so I want to bring a few things in. Is it going to be easy? Let's find out!

🧵 cont

The first fun challenge is exchanging files with Fiwix. You see, Fiwix only supports ext2 (3?), Minix, and ISO9600 (CD drives).

My daily driver is (still) MacOS, so I cannot just mount the ext2 partition to send files over. I can create an ISO image with the files, but this is a one-way trip. Would be nice to add the support for FAT16/32 disks to Fiwix, right?

Well! First, I simply created a new CD image with mtools-4.0.49.tar.gz. Fiwix recognised the CD, and I was able to unpack mtools archive. Then I ran `configure`, and then edited a few things here and there (mostly mis-configurations in the config file). Then I ran `make`, and few minutes later I got myself a working set of tools to access FAT-formatted disks. Now I can copy files between Fiwix and MacOS, neat.

🧵 cont

Fiwix understandably misses a few important tools here and there. Having an emulator capable of running different systems would be nice, right?

Qemu is generally quite portable, but DosBox is smaller, and is good enough for running a large chunk of software I might want to run on my system.

FiwixOS has an SDL1.2 port, so compiling DosBox for it was not difficult at all (a couple of patches are still required). I've thrashed around the video card settings a little bit, until I got it mostly working. I need to figure out why the keyboard is buggy, but I can start Windows under Fiwix, and play a game of solitaire.

So, uh, viva FOSS? Great stuff, hobbyists! It is super duper awesome that I can just get a random toy-like OS, and simply compile the stuff I use regularly for it, and it would work. Extra kudos when the toy OS can boot with as little as 8 megs of RAM. Not gigs, megs.

🧵cont?

@nina_kali_nina Very neat!

How do the graphics work on fwix? Is this ye olden times Linux 2.x as well? As in, give a root running process access to the VGA and cross your fingers? :)

@hp I believe so :) There's no X port just yet. And while there's no X port yet, maybe I should compile MGR for it...

@nina_kali_nina Ohhh, that sounds very fitting!

It might not be that hard to run an older xfree86 vesa server, it also expects to just poke at the VGA directly. It should work, theoretically. I think all it really needs from the os is PCI access and a VT. And I think the VT might be optional?

@hp all the necessary parts should be in place, in theory. But having it compiling might not necessarily be trivial for someone who didn't work with old UNIX-like systems day and night in the recent past

@nina_kali_nina maybe I still remember how to do that! I definitely used to install my own x servers from source in the day.

I might be misremembering whether that was or was not a cluster fuck. I'm remembering it as "not that terrible".

I'll see if I can find some time to try! It'd be a fun exercise. If that works maybe...

CDE?

😱

@hp ha ha! Maybe:)
I tried to compile tinyx/Kdrive from sources, but even after bringing a bunch of undocumented dependencies it still refuses to compile. And my emulation speed is akin to Pentium MMX 166, so it's not like I'm super interested in rebuilding a bunch of stuff from scratch until I do something about my rig

@nina_kali_nina I'd probably go with Xfree86 pre-driver, and try XVesa.

I seem to recall the only truly exotic thing it wanted was libpciaccess, which may or may not be vendoered in the older monolithic trees.

@hp good point! I'll try to install an old Linux and see if I can salvage something from it.

@hp @nina_kali_nina the MirBSD CVS repo has pretty much the last XFree86 release, in the X11 module, if that helps you. I never got a kdrive or tinyx to work, but the regular servers work.

You might have even more luck with the XF3 module OpenBSD used to have. I wonder what happened to it, it’s not on the mirrors any more.