Goofy OS is a lightweight, feature-rich operating system built from scratch in Rust. It aims to provide a modern computing experience while showcasing advanced OS concepts and design principles.
We feature:
- Memory management
- Interrupt handling
- I/O Handling
- Userspace and ELF loading
- A fully working desktop env
(This might seem very unclear, please check the repo for more details here: https://github.com/RetrogradeDev/goofy-os)
Galaxic dev
Check their projects out: J.A.W.I.E. - Intelligent AI Jarvis like assistant , BattleBot, IoT Waterpit sensor, Restock
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
More time spent on docs, polishing the UI a bit, media, ...
I think I'm ready to ship but I'm sort of scared, it feels like I'm gambling with almost 90h...
So I finished the docs and they are up and running: https://retrogradedev.github.io/goofy-os/
I hate Jekyll and this theme I picked, but I don't really have time to make something else
As you might have seen, I attached the wrong image in the previous commit. I indeed created some docs using Claude, and now spent some time correcting and editing them, although they covered most of our codebase
I added a TicTacToe game and refactored our window management. I think we're almost ready to ship?
I tried adding a userland again! I used eduOS as a reference. Things started well, but once we tried actually executing the code in user mode, we got stuck again. I really don't know what to do. I disabled processes again, but I can't keep avoiding it...
Big FS update! We update the lastaccessdate field on file read, but more importantly, we support copying, moving and renaming files! Most of the time spent on this was making the moving/renaming more efficient (instead of copying+deleting the file, we just change the metadata)
So I made the backbuffer optional and measured the timing difference, and damn it's fast. I can't upload more than one screenshot, but it's also much more stable. This screenshot is a comparison of the original fb (top) and new backbuffer (bottom), based on 2 new screen recordings, taken at exact the same moment. The framebuffer is 10-40x times faster (depends on how many pixels have changed).
I finally implemented a basic backbuffer for the VGA framebuffer. The VGA buffer is quite slow, so we write to this second (faster) buffer and copy all the dirty regions when needed. It's still a bit slow so I have to find our whether this is the user->bb or bb->fb part, but I'll start with making this configurable, so I can test the performance impact.
IT'S WORKING! Finally, after all this time, context switching is WORKING with CPU register saving/restoring. The only weird thing: it doesn't work when I turn my battery saver on (I have no idea why lol).
I'm gonna try to merge my old branch where I develop process support with my main branch, maybe slower interrupts fix it?
I tried working on my userand again, but this context switching errors every single time. I'm thinking about rewriting this entire task sheduler (again)
I rewrote our entire config handling so everything (including Uefi/Bios) is handled from a single config file. I also changed the README a bit
We now support both UEFI and the Legacy BIOS! It was quite difficult to get the APIC to work, but now we have 200% faster boot times, a slightly faster and slightly larger framebuffer, but more importantly: support for more hardware!
LFN (Long file name) support! You can now create files and folders in other formats and longer than the 8.3 format.
Ladies and gentlemen we have a…. FILESYSTEM (and a extremely basic file explorer)
We have a basic FAT32 implementation and an ATA disk driver, so we can read, write and update files like a real OS! We can forward a FAT32 formatted .img file to QEMU which our ATA driver can read. The FAT32 parser will parse and process all data or send data back to the ATA driver, which will write it to the disk, so we can reboot and still access our files!
The next bunch of updates will include:
- update to the file explorer GUI to support folders
- parse and write long names (currently we only support the 8.3 format)
- parse metadata time and dates
- parse hidden and read only flags
- make our notepad able to write to the FS
- and FS data to the sysinfo app
Sysinfo app! This was actually quite hard to make, because I had to find a way to get info about our CPU, memory, stack, heap, ... The rust raw_cpuid handles all the hard work related to our CPU. Stack tracking is quite simple: at the entry point save our stack pointer. When we want to get the ucrrent usage, simply fetch the pointer again and calculate the difference.
For the heap: we just change a var each time we do alloc/dealloc
Spent some time polishing our UI. The biggest improvement is probably our way cleaner way of rendering text (you probably won't see this on the screenshot unless you zoom it, but it's WAY smoother). This was actually quite a simple fix: instead of doing color = text_color * pixel_opacity, we do color = text_color * pixel_opacity + bg_color * (1 - pixel_opacity)
I implemented dirty rectangle tracking so we only redraw parts of the screen that actually changed (which is way, WAY faster, for some reason the VGA framebuffer is slower than my grandma)
I'm here to present: the CALCULATOR!!! I implemented a window manager that keeps track of all apps open and forwards events to them, and this is a example app made with it!
Next up: maybe add a notepad/sysinfo app, improve our Surface* api to rerender only changed parts and polish colors.
Surface API = the piece of code that makes us able to render shapes without rendering them pixel per pixel to the framebuffer
A new, very cool mouse cursor! We also calculate the amount of storage needed for the mouse bg at compile time now
Spend a lot of time refactoring our framebuffer to be able to render text when not in console mode, so we now render the time and date in our taskbar
After spending a lot of time on trying to save CPU registers (which didn't work), I decided to try to make a GUI. Of course I'm still working on userland, but a GUI is something nice to have (the red will be the taskbar)
We got mouse input working! I also found out x86_64 has a faster syscall instruction so I will need to adapt my code to that.
We finally have user processes! This took me so long. The final fix was running kernel code using JUMP instead of just calling the entry point. I'm so happy lol, this feature took me 15h (!).
I also installed Zed editor, it's blazing fast but for some reason didn't it log all my time...
I got the ELF loading to work, but when the program sends the exit syscall, we can't return to kernel mode for some reason. I spent for 3h debugging it, without a result. I even asked Claude (my original plan was no AI 🥺), but that made it worse, so I think I'll just revert all commits...
I tried implementing user processes, but our syscalls always end up with a page fault. I have no idea what I'm doing wrong...
Upgraded the bootloader. This was the most terrible problem in the world, I hate the GDT, but at least we have better graphics now...
Completed 11/12 chapters of the blog
This looks really cool already, congrats :D
Are you following some tutorial?
Wrong attachment :) As you might see, I’m gonna document everything (the AI docs were trash)