Why use an existing operating system if you can bake your own? Well, for one thing, writing an OS is not an easy feat. It requires a lot of knowledge in a lot of areas regarding OS development.
And it will take a long time (for some folks, anyway) to get it to the point where it even comes close to existing OSs. But it can be done, if you have the requisite coding skills, time and patience.
If you have all three requirements, and you own or can acquire a Raspberry Pi, a guide has been published to help you along. Published by Alex Chadwick of the University of Cambridge, Baking Pi – Operating Systems Development, provides a step-by-step guide on how to code your own Raspberry Pi operating system.
Here is the introduction:
This course takes you through the basics of operating systems development in assembly code. I have tried not to assume any prior knowledge of operating systems development or assembly code. It may be helpful to have some programming experience, but the course should be accessible without. This course is divided into a series of ‘lessons’ designed to be taken in order as below. Each ‘lesson’ includes some theory, and also a practical exercise, complete with a full answer.
Rather than leading the reader through the full details of creating an Operating System, these tutorials focus on achieving a few common tasks separately. Hopefully, by the end, the reader should know enough about Operating Systems that they could try to put together everything they’ve learned and make one.
Although the lessons are generally focused on creating very specific things, there is plenty of room to play with what you learn. Perhaps, after reading the lesson on functions, you imagine a better style of assembly code. Perhaps after the lessons on graphics you imagine a 3D operating system. Since this is an Operating Systems course, you will have the power to design things how you like. If you have an idea, try it! Computer Science is still a young subject, and so there is plenty left to discover!
And here is the link. Happy code! If you attempt it, successfully or not, let us know about it.