3 ms·
It would be great if there were more hobby OS resources targetting something other than X86. It is common and everything, but all the bootstrapping and device c
by dokyun 2y ago
It would be great if there were more hobby OS resources targetting something other than X86. It is common and everything, but all the bootstrapping and device cruft involved isn't something you should need to get in your head, and 386 assembly by itself is terribly frustrating and obtuse to write by hand. I think most people might be better off starting out with a RISC microcontroller. There isn't nearly as much bullshit involved between getting a running kernel and talking some simple serial, and you can get an instruction set reference, assembler manual, and processor datasheet that will tell you everything you need to know. And it's easy to have fun hardware hacking that way too, making your own peripherals and such.
- qwerty59 2y agoYou mean something like this: https://operating-system-in-1000-lines.vercel.app/en/ https://operating-system-in-1000-lines.vercel.app/en/
- anta40 2y agoPerhaps this one: https://github.com/mit-pdos/xv6-riscv https://github.com/mit-pdos/xv6-riscv ? The old xv6 is x86-based and it's not officialy maintained anymore. Or Xinu: https://xinu.cs.purdue.edu https://xinu.cs.purdue.edu. There's a BeagleBone (ARM) port.
- dokyun 2y agoI think working with a ready-made Unix isn't as friendly to the idea of 'hobbying' an OS. For studying how Unix works, it's great. But if I wanted to make experimenting with my own bespoke system worth it, I would try to not have preconceived notions about how it should work, or copy an entire design. There are dime-a-dozen Unix-workalike hobby OSes out there, and in the shoes of an experimentalist there's a lot to weigh you down in the Unix ecosystem, and a lot of things worth trying that break from the way Unix does things. If you really did want to work with an existing OS for actual research/experimentation purposes, and you're a fan of C, I would go with Plan 9/9front. There's a reason Bell Labs ditched Unix--because it wasn't a worthy research platform anymore.
- anta40 2y agoFair enough. I know some open source hobbyist OSes which are non-DOS/Unix variants... sadly they are X86 only, like Visopsys or Kolibri. For something non-X86, try digging at: http://wiki.osdev.org/Projects http://wiki.osdev.org/Projects Perhaps you can find something suits your preference.
- snvzz 2y ago>The old xv6 is x86-based and it's not officially maintained anymore. Which is sensible. There's way too much legacy crap and ugliness that needs to be dealt with in that ISA to distract from the purpose of the project, which is to teach OS development.
- junon 2y agoHonestly here's how you do e.g. ARM: - Get multitasking working in x86 since there are a ton of guides for that. Learn OSdev concepts. - Read the ARMARM. It's many thousands of pages of dense technical material, nearly everything you need to get started. The only parts it doesn't cover are boot media/formats and peripherals. There aren't good resources for ARM osdev because the environment is not standardized at all. ARM chips are used everywhere and you're often targeting specific boards, not chips. Writing the ARM-specific stuff is only half the battle.