$ cat ~/devlog/wallos-first-post.md

WallOS v0.4.1

This is the first development log for WallOS, covering the work that went into the most recent release, v0.4.1.

This version includes:


Development

XHCI

I decided to start with XHCI when implementing USB because it seemed "easier" in the sense that the controller handles a lot of the work that would otherwise have to be done manually with USB 1/2. That said, that's about the only thing that was "easy" about this.

XHCI was a nightmare to get working, and some of my test devices have non-compliant hardware, which didn't help. It works with HID keyboards now, which is good enough for the moment.

This driver needs a big cleanup. There's a TON of bad code in it. I restarted the implementation three times over structure problems (I was writing usb_core alongside this), so it isn't too awful, but after a few weeks I just wanted to get it done, and the quality dropped off quickly.

HID

The main reason I wrote a USB driver at all is that one of my test devices has no PS/2 emulation or serial I/O, so a USB keyboard is the only practical way to interact with it.

The HID layer currently only really supports boot-protocol keyboards, but it can identify controllers and mice. Those devices don't do anything useful yet, though.

Input Layer

Implementing HID required me to remove the input system's dependence on the PS/2 layer.

I tried to make this layer's interface as flexible and extensible as possible, and it should be fairly easy to add additional input devices in the future.

Filesystems

As a sort of side project while I was getting burned out working on XHCI, I wrote ISO9660 and FAT filesystem drivers, with support for FAT12, FAT16, and FAT32.

I also wrote a small filesystem layer that sits alongside the VFS and helps manage mounting and interacting with filesystems.

As part of this, I essentially rewrote the entire command layer relating to filesystems and drives. WallOS now has more "normal" versions of filesystem commands such as cd, ls, cat, etc.

WallShell

I added a ton of new features to WallShell and finally "ported" the standalone version of WallShell that I had been maintaining separately into WallOS.

This includes things such as:

  • Dedicated argument extraction
    • Had to change basically all commands in the OS to work with this new format
  • Current working directory support
  • Proper input handling
  • Keybinds
  • Various other shell improvements

I will likely write a devlog for WallShell itself for the general update information. I had to change a lot to this from the base, and some of it will likely make it back into WallShell proper (like CWD).

Timing

I added a proper timer interface that abstracts the timer subsystem away from x86_64. It's designed to support many different timers serving different purposes within the system, while staying as platform-agnostic as possible.

I also added HPET support, which I probably should have done a long time ago.

Ported Kilo

I wanted a way to actually edit files from within WallOS, but I had no interest in writing my own text editor.

I ended up porting Kilo, one of the most minimal text editors I could find. It took a decent amount of work to make it play nicely with the display and input APIs (it needed VT100 escape codes and used termios), but it works incredibly well considering how small the original editor is.

← all devlog entries