This text is a practical guide to writing your own x86 operating system. It is designed to give enough help with the technical details while at the same time not reveal too much with samples and code excerpts. We’ve tried to collect parts of the vast (and often excellent) expanse of material and tutorials available, on the web and otherwise, and add our own insights into the problems we encountered and struggled with.
This is all very, very rudimentary, and touches only the very basics. I’m not sure whether it adds anything to the already existing texts on OS development.
I think it’s a nice starter site with a lot of information in one place. Most books on operating systems are much more theoretical.
I think that we are lacking basics tutorials even though a lot of more technical stuff has already been written. There are a lot of theory books and a lot of tools for people who know what they’re doing but not much exists for absolute beginners.
walid,
Anyone with a little ambition won’t remain a beginner for long
I found it to be quite strait forward in the days of DOS because writing BIOS/bootloader code was essentially the same as writing a binary .COM file. Everything from BIOS calls, video programming, hardware interrupts, and so on work the same way at bootup as they do under DOS. Obviously you have to abstain from using DOS calls, but other than that there were very few surprises.
It’s a far call from those days though. For one thing developers are no longer accustomed to programming at the system level as was frequently done with DOS – so even though it’s not difficult, modern programmers may lack those skill sets.
I suppose other things have changed since I was first learning. The proliferation of hardware living behind proprietary drivers&operating systems code makes it much harder even for experienced programmers to interact with modern commodity hardware. Modern hardware doesn’t follow industry standards like the NE2K network card or sound blaster, or vesa vga, etc. So modern hobby operating systems often get bogged down and ultimately defeated by the work of writing drivers – an activity that took significantly less effort back in the day.
This is one of the reasons I stopped chasing my hobby os and took up linux instead. I still think there are things that I could do better, but there’s just no way I can support the plethora of hardware that the linux community can. I still dream of OS deving some times, and to anyone trying to pursue it I’d love to discuss it and offer what help I can
On the contrary, I found the OSDev http://wiki.osdev.org/Bare_Bones just what I needed to bridge the gap into kernel mode programming.
I’m just amazed Linus managed to develop a kernel without the benefits of tools like qemu. I found it hard enough debugging triple faults under qemu with qemu telling me exactly where the triple fault occurred. My early kernel forays gave me a refreshed admiration for what Linus and others achieved.
Edited 2017-01-01 13:51 UTC
I used to be a programmer that also managed servers and vendors and everything else before I left that company and became a specialist. But back then I was both a PC and a mainframe programmer working on mortgage and banking software mostly. But I also wrote drivers for DOS and Windows and OS/2 (a GREAT OS that is now known as eComstation) as well as with Linux (I cut my teeth on Corel Linux, yes the company that now owns WordPerfect and Corel Draw and so forth) on more than a dozen different distributions.
If you want to learn about writing an OS I would strongly push someone to look into Linux. EVERYTHING is there and available to look at. All the way down to the how Linux interacts when booting up including how it recognizes hardware. Yes there is a LOT of source code, millions of lines of it in fact. But if you figure out the very basics of what you want to do and focus on that, there are people on the internet that will help you too, and you can read that code and learn from it. If you have questions there are forums where people with chat with you as it (in a good way most of the time) feeds their ego so they are happy to help.
There are plenty of OSs out there. But Linux is the only one that is very successful for a lot of different uses and you can get your hands on every single line of code.
Yes it will be VERY painful in the beginning. But by focusing on part part at a time and keeping notes about what the code is and what it does in their own words it will help them later if they start to write their own OS.
Actually they don’t have to start from scratch. They can use the boot loader from Linux and take only what you want and change whatever you want and get rid of what you don’t want. It might make it hard to get it to boot but if you don’t want stress then it is best to get out early because it will be stressful while you are starting out. But it will be worth it in the end if you stick it out.
Programming is hard. Programming an OS is MUCH harder than programming an application on top of an OS.
My example would be. An application is like building a table and setting it into a room. While building an OS is like building the foundation and framing of a house. It’s that big of a difference. So you better be a really good programmer already or expect to learn a lot about EVERYTHING and be willing to put in the time and energy to do so.