Live data from Hacker News

Show HN: Banan-OS, an Unix-like operating system written from scratch

github.com

41–50 of 65 posts

Re: Show HN: Banan-OS, an Unix-like operating system written from scratch

#41
post #21

This is awesome! Can I ask what development looks like? Do you run this in a VM or on bare metal? When you sit down and work on this, what does it look like? 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

I do maybe 95% of testing on a VM. It is way faster and much more convenient. I do test on real hardware regularly though. It's always cool to see stuff actually running on bare metal and bare metal is not as forgiving as VMs can be. 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 som…

> 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).

This was me for a very long time. I started making notes now, knowing that I will most likely forget (some of it). I still have all sorts of files scattered around though with my notes, i.e. the notes are disorganized (to some extent). I thought of using Obsidian for them and I have tried it but I do not use it consistently, I just go for my XTerm window with emacs or vim.

Re: Show HN: Banan-OS, an Unix-like operating system written from scratch

#43
post #5

Earlier quoted context omitted.

You surely mean that it's a hobby project and probably won't be big and professional like GNU?

I can't see anyone seriously suggesting to management that they run Banan-OS. Probably the same self-inflicted handicap of CockroachDB.

Agreed. We run a respectable Freax shop around here.

Re: Show HN: Banan-OS, an Unix-like operating system written from scratch

#45

Earlier quoted context omitted.

There was a need for linux, and that's why it took off. The Unix wars, the provenance of the 4.3 BSD code, the cred of running a Unix (or Unix-alike). Not to trash this guy's project, but there's no similar perfect storm going on right now.

I don't think it was a perfect storm going on , but rather since today Linux is popular & strong , you are retracing it to it having a perfect storm and nothing can come close to it . That being said , I still think that this wouldn't reach mass adoption "just for being an alternative to linux" and that this has to have a specific purpose For example serenity os has a really cool old - ui and some people think its a…

Not really. I don't see how Linux being popular & strong today had any bearing on people's willingness to contribute 33 years ago.

Writing an operating system is challenging. Not as challenging as a compiler, but certainly more work (so much hardware, so many specifications ugh).

In 91-92, people were clamoring for a free, unencumbered 386 Unix. Enter Linux.

Every successful (non-commercial) OS undertaking needs and has a hook.

Redox? Rust (enough said).

Serenity? Live coding and mental health (no knock there).

And on the flip side, look at ReactOS. Languishing. Painfully slow 15+ years in development, and people would still rather pay Microsoft or roll the dice running applications under Wine. It's hook just isn't strong enough.

Again, not to knock this guy, because just the fact that he wrote his own AML interpreter is super impressive to me (I've floundered around in those same ACPI specs for far, far (far, far) too many sleepless nights), and never put out 1 line of AML code. So mad props.

But there's just no hook. C++? Passe. No microkernel / hypervisor / ? No capability model?

It'll be tough. But I know that OS'ing is a labor of love, even if not a single other person cares. Cheers.

Re: Show HN: Banan-OS, an Unix-like operating system written from scratch

#46
How does one even begin to write drivers for nvme, ata, rtl nics, etc? I know mice and keyboards use HID which is a standard, but are there similar standard protocols for all other devices?

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?

Re: Show HN: Banan-OS, an Unix-like operating system written from scratch

#47
post #46

How does one even begin to write drivers for nvme, ata, rtl nics, etc? I know mice and keyboards use HID which is a standard, but are there similar standard protocols for all other devices? 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 somethin…

Yeah basically every commonly used device has its protocol standardized. Although there exist some devices where the manufacturer has to provide the drivers. All of the devices I have written drivers have had their specifications publicly available for free (e.g. NVMe at https://nvmexpress.org/specifications).

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.

Re: Show HN: Banan-OS, an Unix-like operating system written from scratch

#49
post #23

This is so cool! I especially applaud you for managing to implement USB drivers from scratch! By the way, I broke it by typing "cat doom1.wad" :)

Thank you! Yeah there isn't really any data serialization done to data written into the TTY, so can break if you feed it arbitrary binary data :D

Re: Show HN: Banan-OS, an Unix-like operating system written from scratch

#50

Earlier quoted context omitted.

There hasn't been any overly difficult parts. I'd say the most difficult one has to be either AML interpreter because the ACPI specs are very badly written or the USB stack just because the size of the specifications is so large with a lot of cross referencing. 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.

I would anticipate that you only have support for boot-mode keyboard and mouse now, considering the complexity of the full USB-HID spec. Otherwise I'd be very impressed.

I do actually support USB keyboard and mouse with USB-HID. There are some parts I don't support, like mouse specifying its movement with physical units (I haven't encountered any of those yet). Also I only have support for xHCI USB controller so PC's with older UHCI, EHCI or AHCI controllers are not yet supported.
Post reply on HN