Hacker News new | ask | show | jobs
by tejaswiy 3163 days ago
I started on this path, got through the boot-up, interrupts etc. and to a simple shell. Once that was done, instead of targeting something simpler like malloc(), I wanted to get a VGA driver working. VGA drivers are notoriously hard and I really wanted my OS to have a UI so after a couple of weeks of studying and getting nowhere, I gave up on the whole project.

I think the one major thing that caused me to give up on the project was whenever it became time to refactor or to think about the big picture (for ex. where do the drivers live? what about a libc implementation - can you just get glibc to work on your OS? Or do you have to rewrite the whole of libc?), I found that I was just copying whatever linux had already done. The feeling that I wasn't really doing any original work and am making a shittier version of an existing system demotivated me for some reason even though this was just supposed to be a learning exercise. So some advice for anyone attempting this - be prepared to go out of your way to rewrite significant amounts of helper code that has nothing to do with actually building your OS.

1 comments

For a libc on a weird OS I would recommend newlib (https://sourceware.org/newlib/), which is a libc for embedded systems and so has a well-defined way to implement the basic stuff that it needs to run.