Begininng an OS?
Begininng an OS?
Hi All,
I know this may seem extremely dumb, but here goes...
I have NO experience with OS Development,but with other kinds of programming, yes, i.e. ASP .NET 2.0 with C#, PHP, C++, Java etc.
But I have never tried the write my own OS, so, I's love to learn, keeping in mind, that I unfortunately don't have a clue on where to begin.
Would anyone be kind enough to give me a helping hand in starting my OS Development interests off?
Much thanks
Kr33
I know this may seem extremely dumb, but here goes...
I have NO experience with OS Development,but with other kinds of programming, yes, i.e. ASP .NET 2.0 with C#, PHP, C++, Java etc.
But I have never tried the write my own OS, so, I's love to learn, keeping in mind, that I unfortunately don't have a clue on where to begin.
Would anyone be kind enough to give me a helping hand in starting my OS Development interests off?
Much thanks
Kr33
A man's dream's are an index to his greatness!
a couple links to help you (these are of course in addition to what solar said):
make sure you get the ## ---- ----- ------ Intel Manuals
these (esp volume 3a) contain important information about the workings of the x86 family of CPUs, i certainly recommend getting hard-copies of all 5 books (even though volume 3a, and 2a&b are the most useful)
the OSRC gives lots of documents about standard components
Bochs is an emulator which is very helpful -- esp in the early part
MS and VMWare also make products in the same catagory -- but unfortunately my links are out-of-date
BonaFide OS Dev hosts a lot of tutorials, can be very helpful
and of course this site: where you can ask any questions, and we will try to help you if we can
make sure you get the ## ---- ----- ------ Intel Manuals
these (esp volume 3a) contain important information about the workings of the x86 family of CPUs, i certainly recommend getting hard-copies of all 5 books (even though volume 3a, and 2a&b are the most useful)
the OSRC gives lots of documents about standard components
Bochs is an emulator which is very helpful -- esp in the early part
MS and VMWare also make products in the same catagory -- but unfortunately my links are out-of-date
BonaFide OS Dev hosts a lot of tutorials, can be very helpful
and of course this site: where you can ask any questions, and we will try to help you if we can
[obvious tip]Plan Ahead[/obvious tip]
If you just start writing code, as I did, think of your first attempt as a Toy OS - just for fun.
In the early stages, I would read up on a new aspect of OS dev that I hadn't considered and found that a re-write was on the cards for proper implementation. This was mainly because of the scattered-ness of my code!
Good luck,
Adam
If you just start writing code, as I did, think of your first attempt as a Toy OS - just for fun.
In the early stages, I would read up on a new aspect of OS dev that I hadn't considered and found that a re-write was on the cards for proper implementation. This was mainly because of the scattered-ness of my code!
Good luck,
Adam
I would go a step further: Anything, anything where you "just start writing code" should never be considered a "project". Never make a package of it. Never let it leave your local hard drive. It's a scratchbook doodle, a "proof of concept" at the best of times.AJ wrote:If you just start writing code, as I did, think of your first attempt as a Toy OS - just for fun.
Let it escape into the wild, and it will keep coming back to haunt you.
Every good solution is obvious once you've found it.
This is good advice. I say start playing around to get used to coding without any support structures. As your playing start thinking of your main goal for your OS ie. Network support?(DNS, DHCP, Other), General Use?, Real Time Applications? After this is established, then decide what your kernel will look like ie. Monolithic, Micro, Other? At this point you should have a pretty good idea of what your API should look like so you can start implementing your managers with all of this in mind. So your API should be easy to pull together.AJ wrote:If you just start writing code, as I did, think of your first attempt as a Toy OS - just for fun.
For the record I have only played around with freestanding code and have never worked on an OS project. Well, up until two months ago, I'm starting to plan one out now.
I spend all of my working hours a-patching and a-fixing code written by self-acclaimed "professionals" for which "escaped" is a compliment. And I have spend quite some of my spare time hours doing the same for other people's code, too. I don't want to picture what a mess it makes when you transpose that to the tripple-fault paradise that is kernel space.AJ wrote:...you obviously have a past experience in mind!
Every good solution is obvious once you've found it.
Oh - just thought of something:
When I first wrote my OS, I wrote a few non-standard support functions to aid development. When the time came to develop a libc, I realised that using standard function names for functions with non-standard behaviour was not a good idea!
If your major OS and application development are going to be in C (or C++), I have now found it is useful to link kernel and libc development fairly closely. All you need are a few careful #defines for functions which will need to be slightly different for user and kernel mode.
Cheers,
Adam
When I first wrote my OS, I wrote a few non-standard support functions to aid development. When the time came to develop a libc, I realised that using standard function names for functions with non-standard behaviour was not a good idea!
If your major OS and application development are going to be in C (or C++), I have now found it is useful to link kernel and libc development fairly closely. All you need are a few careful #defines for functions which will need to be slightly different for user and kernel mode.
Cheers,
Adam
If the OSKit contains components that suit the kernel you want, go ahead and use it. Implement only custom features. Once you have a complete kernel, you can go back over and slowly replace the OSKit code with your own.AhlyM wrote:Hello
I am writing my OS in pascal
for better don't write your own bootloader but use grub
also use a toolkit as a beginning in your OS ,i my self use libosdk.
Thanks
On the other hand, using COM to keep a kernel together doesn't sound like a great idea.
-
- Member
- Posts: 155
- Joined: Fri Oct 27, 2006 5:11 am
- Location: Oberbayern
- Contact:
As AJ says, think of your first efforts as a toy -- just some experimentation. Writing an OS is incredibly complicated, albeit hugely rewarding. Look at some of the projects developed by regulars here (eg DexOS) and see what it takes to get that far. My own OS is pretty simple by comparison but it has still required a lot of graft.
Start with the basics -- write a bootloader to get the feel of assembly and controlling a PC directly, without languages or compilers. Write simple stuff to draw graphics to the screen and print text. Knock together a floppy drive loader (easier than working with hard drives).
If you get that far and are still loving OS hacking, congratulations: you're off to a great start. Think of it as the world's biggest Lego set. Sure, it takes ages to create a Boeing 747 from Lego bits, but as you build up the cockpit, landing gear, passenger seats etc., you get a great feeling of accomplishment.
M
--
http://mikeos.sourceforge.net
Start with the basics -- write a bootloader to get the feel of assembly and controlling a PC directly, without languages or compilers. Write simple stuff to draw graphics to the screen and print text. Knock together a floppy drive loader (easier than working with hard drives).
If you get that far and are still loving OS hacking, congratulations: you're off to a great start. Think of it as the world's biggest Lego set. Sure, it takes ages to create a Boeing 747 from Lego bits, but as you build up the cockpit, landing gear, passenger seats etc., you get a great feeling of accomplishment.
M
--
http://mikeos.sourceforge.net