Show HN: Banan-OS, an Unix-like operating system written from scratch
333 points| Bananymous | 1 year ago |github.com
Currently I have basic TTY and GUI environment with some of the basic UNIX utilities like cp, ls and stat. I have basic support for USB (keyboard/mouse/storage), disks (NVMe, AHCI), custom networking stack with TCP and UDP support, and a UNIX-like filesystem with /dev /tmp /proc filesystems.
The whole project is written in C++ except for my BIOS bootloader that is written in 16-bit real mode assembly. I have been testing the OS mainly on virtual machines but also frequently on real hardware.
DigiEggz|1 year ago
Bananymous|1 year ago
There hasn't been any major roadblocks. Sometimes I give up on a feature and come back to it maybe month or two later though.
bsimpson|1 year ago
sedatk|1 year ago
Bananymous|1 year ago
dvh|1 year ago
bityard|1 year ago
38|1 year ago
spiffyk|1 year ago
You say you're a student on your profile - does that mean university? If so, have you also worked on the OS directly as part of your studies?
Bananymous|1 year ago
How much time I put to this really depends on what else is happening in my life at the moment. There has been months where I've put total of 5 hours into this and some weeks alone I may reach close to 40 hours.
mrbungie|1 year ago
p0w3n3d|1 year ago
whartung|1 year ago
What stand out challenges have you encountered?
Bananymous|1 year ago
savgore|1 year ago
I bet you learned a lot with this - how do you keep notes and track your development? Or is the OS your live journal. Thanks
Bananymous|1 year ago
Generally I decide a feature I want to add. Then I do a general overview of the corresponding specifications and sometimes look at how already existing OSs handle that. I try to make some kind of mental model about the system and what it needs. Then I basically just write what ever I come up on the spot.
I have a really bad habit of not writing docs or taking notes. Basically I just hold everything in my head (and forget about it when I would need that information again). For some more complex stuff I do draw diagrams and write notes but I pretty much only keep those locally for myself.
kortex|1 year ago
Is this how linux manages to avoid needing to "install drivers" in the vast majority of cases? And if there are standard device APIs, why does windows have to go through that whole install driver routine every time I plug something in?
Bananymous|1 year ago
I'm not really familiar with how Linux nor Windows handle drivers. While compiling the Linux kernel you specify which drivers you want to build into the kernel and which ones you want as modules. Usually most common ones compiled along side the kernel so there isn't really need to install them later, just load the driver modules. There are also devices that work with just a generic driver but would have more features with a specific one (e.g. led settings on a gaming mouse). I think Windows is maybe installing these optional drivers.
notawolf|1 year ago
Bananymous|1 year ago
torlok|1 year ago
udev4096|1 year ago
VagabundoP|1 year ago
Do you plan on porting more software?
Bananymous|1 year ago
I have some ports locally that are not yet working. I have git, binutils, gcc, make all compiling but they are giving some weird errors. Probably a bug in my libc or syscalls.
stevekemp|1 year ago
It looks like ".." entries don't exist beneath /proc.
Bananymous|1 year ago
MomsAVoxell|1 year ago
What do you think it will take to target RISC-V?
Bananymous|1 year ago
I'm not familiar with other architectures than x86 so I can't really say what it will take. At least a lot of work :D
nunobrito|1 year ago
Doom wasn't loading for me (Brave browser on Ubuntu without javascript disablers).
Very good work. It was fun without doubt.
Bananymous|1 year ago
ajxs|1 year ago
jart|1 year ago
PTOB|1 year ago
keyvank|1 year ago
Bananymous|1 year ago