8 ms·
SkiftOS: Simple, handmade operating system for the x86 platform
- spicybright 6y agoI honestly love how more people are rolling their own OS's. But it stinks how difficult hardware support is. I wish there was a nice wrapper dedicated to abstracting hardware support better so developers can focus on the interesting parts instead of arguing with wi-fi cards.
- cjdell 6y agoCompletely agree. Something like Project Treble, but for PC hardware. Thinking about it, this is what the BIOS was originally for: to provide a bare minimum abstraction to the hardware. I hoped that UEFI would extend this abstraction in a meaningful way, making OS development easier. Instead it has made it even more complex.
- hapless 6y agoThe original EFI spec very much did extend that abstraction. You can do a lot in an EFI environment if the hardware plays ball: network, disk, video etc UEFI, sadly, added support for raw x86 option ROMs, to some extent casting us back into the "old" world.
- userbinator 6y agoIn the earlier days of the x86 PC, the hardware was far more documented, but now a lot of manufacturers are notoriously secretive about it. Nonetheless, standards still exist (HDA,ATA/ATAPI/SATA,OHCI/UHCI/EHCI/XHCI,etc.) and much of the backwards compatibility is still there. You bring up wi-fi cards and that is definitely one category of hardware with little standardisation/documentation (I suspect due to FCC regulations and such.) Wired ethernet is a bit better --- Realtek and Intel NICs are both quite well-documented, with the latter being more complex. The other difficult one is GPU acceleration (but a VESA framebuffer is usually available, which gets you at least a GUI if not a fast one.)
- Koshkin 6y ago> a nice wrapper Are Linux device drivers not nice enough? Hell, why couldn’t one think, for that matter, of a minimal Linux kernel as some kind of BIOS. Incidentally, we already use it as a hypervisor, so you could probably even include support for the devices you want in the hypervisor itself.
- juancampa 6y agoThat's the approach urbit has taken
- tenebrisalietum 6y agoThere are projects that load Linux as a UEFI DXE, and coreboot pretty much can be configured to initialize the platform and then hand over to a Linux payload immediately.
- skissane 6y ago> I wish there was a nice wrapper dedicated to abstracting hardware support better so developers can focus on the interesting parts The University of Utah had a research project back in the late 1990s which offered exactly that – the OSKit project [0]. A set of libraries for common (at the time) x86 hardware so OS developers and researchers could focus on what was original about their OS instead of writing yet another hard disk or Ethernet driver Unfortunately, the research project ended circa 2000 and it is dead now. No support for contemporary devices like Wifi and USB. But, if you just want something to run in a VM (QEMU or VirtualBox or whatever) it probably still works. [0] https://www.cs.utah.edu/flux/oskit/ https://www.cs.utah.edu/flux/oskit/
- tooltower 6y agoToday, when I build a custom Linux kernel, and am playing with config vars to decide what is our isn't included in the build, I very much tend to think of it as assembling a kernel from various library pieces. How was OSkit different?
- skissane 6y agoLinux isn't written with the use case of using bits of it in isolation in mind. Sure, you can do that, but the Linux developers don't have making that easy as a design goal, so it will often be quite hard, and even when it isn't so hard that is just an accident. By contrast, the OSKit developers had as an explicit design goal to make it easy to use bits of their code in isolation from the rest. Linux gives no API stability guarantees for its internal APIs, only for the system call interface. By contrast, the OSKit developers intended the API of each component to be a stable documented interface. The Linux developers don't want Linux's internal APIs to be stable documented interfaces because that has a cost in that it slows down refactoring, which in turn reduces the various benefits that refactoring can produce (better performance, better maintainability, new features, etc)
- octorian 6y ago> The Linux developers don't want Linux's internal APIs to be stable documented interfaces It also has the "benefit" of making it extremely difficult to actually distribute stable device drivers that are closed source, or are simply not part of the actively-maintained kernel source tree.
- vxNsr 6y agoI always thought that was kinda the point of an OS, it differentiates itself based on how it does drivers and hardware management, it wraps it all in neat apis so that developers can focus on making over-engineered resource intensive chat clients.
- Koshkin 6y ago> the point of an OS, it differentiates itself based on how it does drivers Not really; also, the freedom to do something "different" in the device driver space is extremely limited: all you can do is decide on the packaging, kernel space vs. userspace and not much more.
- spijdar 6y agoI think what GP was getting at is a big part of an OS is resource management (process permissions and isolation) and providing abstract interfaces over hardware (filesystems vs raw block storage). So beyond the low level drivers that directly interact with hardware, an OS differs in how you ... drive the drivers. What your HAL looks like, and then what the abstractions above that look like. It's by that definition that e.g. Android is considered a different OS from GNU/Linux. Same kernel, but the hardware is exposed much differently to end-user applications.
- ronsor 6y agoUEFI sort of handles this, even if the spec is absurdly huge. It contains portions referring to standardized ways of interacting with Wi-Fi cards and other devices, even if not all firmware supports it. I started an OS project[1] a while ago based on it. [1] https://github.com/HidamariProject/Hidamari https://github.com/HidamariProject/Hidamari
- jonjacky 6y ago> I wish there was a nice wrapper dedicated to abstracting hardware support There is NopSys, about 3500 lines of C and 600 lines of assembler for booting, accessing device registers, and responding to interrupts. So you can write the rest of the OS on top of that. CogNOS is a Smalltalk system written on top of NopSys. https://github.com/nopsys/nopsys https://github.com/nopsys/nopsys https://github.com/nopsys/CogNOS https://github.com/nopsys/CogNOS https://charig.github.io/assets/papers/SCDE-DLS.pdf https://charig.github.io/assets/papers/SCDE-DLS.pdf
- scroot 6y agoDo you have an update on the status of this work? Seems like it hasn't been worked on recently
- cfallin 6y ago> I wish there was a nice wrapper dedicated to abstracting hardware support The NetBSD kernel has the ability to be built as a library, letting various drivers be used in other ways -- it's called a "rump kernel" [0]. I've never played with it myself but my understanding is that this would be sufficient to provide drivers in one's own kernel, given enough plumbing and shims and such. (With enough shims one could borrow drivers from any kernel -- see ndiswrapper to use Windows network-card drivers in Linux -- but the rump kernel scaffolding is supposed to make it easier.) [0] https://www.netbsd.org/gallery/presentations/justin/2015_AsiaBSDCon/justincormack-abc2015.pdf https://www.netbsd.org/gallery/presentations/justin/2015_Asi...
- m463 6y agoI've wondered about this and thought - wouldn't this be easier with two very early decisions about the OS: - OO support / modularity - microkernel If this decision was made and adhered to early then: - new drivers could just import and inherit, filling in only the specifics - new drivers would be self-contained and (hopefully) not affect stability of the system I guess the problem is that most drivers have already been implemented in C and would require redesign or at least porting.
- kowsheek 6y agoThis is the approach Windows 10 should have taken.
- breakfastduck 6y agoCould you expand?
- kowsheek 6y agoInstead of trying to shoehorn Linux into Windows, they could have launched another product with some of the ideas here. Then Windows 10 would not be in limbo (in terms of UI and features). I don't understand why Apple and Microsoft feel stuck to one OS.
- geocrasher 6y agoIf MS were to write a new bespoke OS that requires new everything and maintains no backward compatibility (that's the point of a new OS, isn't it?) and launch it to the world, the amount of people who'd rush out and buy it can be counted on one hand. It could be absolutely revolutionary, but it would lack one major thing: Momentum. Look at every OS that's on the market right now. It solves a problem. Right now there are very few people who can't pick an OS off the shelf that will solve their particular problem. Be it an RTOS or a fancy gui that your grandma is comfortable with, the software already exists. I guess what I'm really trying to say is that unless you can upend the current OS landscape while maintaining compatibilty, then a new OS for the masses doesn't solve a problem. It creates one.
- kowsheek 6y agoThough in name it's not a new OS, Windows 8, 10 are new experiences for anyone who uses them since Windows 7. I think you're right about momentum, MS isn't able to come out of it's momentum of the old into the new. For example, Apple transitions to a new OS with confidence and takes the ecosystem with it in a blink of an eye because they are trying control their momentum instead of being driven by it. Edit: Windows can maintain backward compatibility with its ecosystem if they did it well, like Apple has done.
- ah- 6y agoYou can try it in the browser here: https://copy.sh/v86/?profile=skift https://copy.sh/v86/?profile=skift
- unixhero 6y agoThe user interface looks beautiful! Even with a hamburger menu. Congrats to the team.
- camdenlock 6y agoWhich operating systems are not “handmade”?
- unforeseen9991 6y agoRight?
- edgyquant 6y agoThe dozens of Linux distros perhaps?
- cheph 6y agoDid people use their feet to make them?
- prewett 6y agoAIOS! It analyzes your usage of features in your current operating system, and uses Deep Learning to provide you with source code with just those features as efficiently as possible (uses approximate solutions to NP-complete algorithms), scoured from open source projects meeting your specified license requirements. Paid features include finding the fastest + bug free drivers. For substantially more money you can get a machine-generated proof of theoretical correctness of a component, including Deeply Learned bug fixes. (Not to be confused with AIX, which is still handmade, or with AIX11 which uses convolved neural networks run on the hn-x11-complaints BigData-set to write a custom X11 server that is still remoteable but also Modernly Designed)
- 29athrowaway 6y agoThis looks like a lot of progress compared to Redox OS, an OS built in Rust which has about 5 years now. And this one has been around for much less time.
- adamnemecek 6y agoRedox had to rebuild a lot of things from scratch. People have been writing OSs in C++ since forever.
- catblast 6y agoNot sure I buy that explanation. Looking through this repo, the kernel, drivers, and many core libraries seem to be written from scratch with no dependencies. There are some deps for reading images, and other things outside of kernel/driver function, but this seems mostly written from ground up (A rust based OS could bind to a C/C++ png or sound file library in the same way). Writing an OS is a fiddly task to say the least. It's one thing to be motivated to create an OS regardless of language (such as this), vs let's create one to showcase a language. It's harder to recruit people for the latter frankly, and having written OS and kernel code, it's fiddly work that more people talk about then actually enjoy doing it over the long haul. Also in defense of Redox, I think it has far different goals, rather than getting something up and running with interactivity quickly. SkiftOS is much more "toy"/fun hacking vibe.
- spijdar 6y agoNot to belabor the point, but what OSes are actually written in C++? Most will avoid using many if any C++ features even if they ostensibly use a C++ compiler, and most OSes I've seen (Linux, Windows, Darwin) have kernels written in explicitly C. Skift appears (at a very quick glance) to be using more "C++-ish" features than typical, though it's still more "C-ish" than your average C++ code.
- adamnemecek 6y agoBoth XNU and Windows have a decent amount of C++ in it. Sure, people avoid some parts of C++, however there is a reason why they use C++.
- monax 6y agoI did it mom, I'm on hacker news Joking but this is kind of sureal to see my small handmade project on the front page of hacker news.When I started the project I was kinda at the bottom just dropped of university, and now it's a growing community full of really cool people :)
- trymas 6y ago> small handmade project Congrats for the work and the front-page, though you seem to live in alternative universe. The last time I checked, a project with ~2250 commits, ~30 contributors, a website and dozens of releases is by no means "small".
- InvOfSmallC 6y agoI just recovered from my basement a fully working IBM Thinkpad R60. I installed Crunchbag++ as debian based OS and it's working like a charm. I wanted to use as a development machine. I was able to configure everything but an editor with golang support. The only 32bit editor I found is Sublime Text 3 and that's it. Atom and VSCode don't support 32 bit images of their app anymore :( (and no, I didn't want to waste time compiling the atom version - there is a guide but looks not updated) Anyway, I will try this OS now! UI looks beautiful.
- dustymcp 6y agoIn danish it translates to: change os just thought it was funny
- pqb 6y agoWhat touches me the most is how much I like the GUI applications look [0][1]. As a person, who use GNOME Shell DE on daily basis I really miss to see the titlebars condensed with the menu just like VSCode does. It was what I liked in the very last Unity DE and I happy to see this once again. I am also amazed how simple the TextEditor is [2][3][4] and how handy looks your libwidget components [5]. Congratulations! [0]: https://www.reddit.com/r/osdev/comments/ky7igd/my_handmade_widget_library_is_becoming_quite/ https://www.reddit.com/r/osdev/comments/ky7igd/my_handmade_w... [1]: https://www.youtube.com/watch?v=Za0oHBFr9zo https://www.youtube.com/watch?v=Za0oHBFr9zo [2]: https://github.com/skiftOS/skift/blob/main/apps/text-editor/main.cpp https://github.com/skiftOS/skift/blob/main/apps/text-editor/... [3]: https://github.com/skiftOS/skift/blob/main/libraries/libwidget/TextEditor.h https://github.com/skiftOS/skift/blob/main/libraries/libwidg... [4]: https://github.com/skiftOS/skift/blob/main/libraries/libwidget/TextEditor.cpp https://github.com/skiftOS/skift/blob/main/libraries/libwidg... [5]: https://github.com/skiftOS/skift/tree/main/libraries/libwidget https://github.com/skiftOS/skift/tree/main/libraries/libwidg...
- monax 6y agoGlad you like it :)