hi,
i just wanna design and implement an OS,i know C and a little about 8086 assemble,i have read some books about OS design and implementation,but where shall i start to write a new OS,boot?kernel?or anywhere else?
thanks a lot.
where to start?
-
jrfritz
Re:where to start?
Ok...before I say anthing about kernels...
[glow=red,2,300]People...PLEASE do not make this just like the other "where do I start thread"! That was just nuts![/glow]
Ok...now...
What OS are you going to use for OS development?
Also, I sugesst you use someones bootsector, and use it to load your kernel.
I have some example source if you would like...but it only installes on Linux. ( but people here know how to install it to a floppy using windows too )
Now...floppy I said? yea...for learning you can just make some binary files with the GNU GCC compiler...either DGJPP on Windows or GCC on linux. NASM from http://nasm.sourceforge.net is a good assembler...since you need some assembly in OS dev...you copy your files to the floppy...in other words...for starting your OS you put your OS on a floppy like DOS...instead of crashing your HD
[glow=red,2,300]People...PLEASE do not make this just like the other "where do I start thread"! That was just nuts![/glow]
Ok...now...
What OS are you going to use for OS development?
Also, I sugesst you use someones bootsector, and use it to load your kernel.
I have some example source if you would like...but it only installes on Linux. ( but people here know how to install it to a floppy using windows too )
Now...floppy I said? yea...for learning you can just make some binary files with the GNU GCC compiler...either DGJPP on Windows or GCC on linux. NASM from http://nasm.sourceforge.net is a good assembler...since you need some assembly in OS dev...you copy your files to the floppy...in other words...for starting your OS you put your OS on a floppy like DOS...instead of crashing your HD
-
DarylD
Re:where to start?
Couple of hints that helped me:
Use grub for the bootloader, don't be messing about
trying to write a bootsector and bootloader yet, its just not worth it. You will find plenty of examples on the net, how to.
Write to video memory at strategic points in your code, just write a letter A or B for example in the top left so you know how far youre code got.
Don't just test in bochs or VMWare, test on a real PC too.
Write your asm startup code first, this then boots a c kernel. Start with your memory manager, it will help keep a grip on things.
Use grub for the bootloader, don't be messing about
trying to write a bootsector and bootloader yet, its just not worth it. You will find plenty of examples on the net, how to.
Write to video memory at strategic points in your code, just write a letter A or B for example in the top left so you know how far youre code got.
Don't just test in bochs or VMWare, test on a real PC too.
Write your asm startup code first, this then boots a c kernel. Start with your memory manager, it will help keep a grip on things.
-
missdeer
Re:where to start?
hi Tom,
i have already know whatever you said,but still thanks all the same.
i hope that you tell me,for example,first make a bootloader,then kernel,and so on.
thanks again.
i have already know whatever you said,but still thanks all the same.
i hope that you tell me,for example,first make a bootloader,then kernel,and so on.
thanks again.
-
Whatever5k
Re:where to start?
No, that's not my oppinion. I use GRUB and yet I know how to make a boot loader. But it isn't worth the effort and just kills time. Go on with the more interesting part of Operating System. Have a look at [1].As for using somebody else's BootSector, i don't recommend this, make your own
1. http://www.gnu.org/software/grub/
-
Tim
Re:where to start?
I disagree with this too, quite strongly.Perica Senjak wrote:Using somebody else's code is the worst thing you can do, by making your own you learn
OK, I agree that writing a boot sector teaches you:
- 16-bit real-mode assembly. But you're going to use 32-bit protected mode, aren't you?
- How to write code to fit within 512 bytes. But why did you spend all that money on getting 512MB of RAM?
- How to use the BIOS disk routines. But you're going to write your own 32-bit drivers, right?
- How to write a really small and simple FAT driver. But it's a lot easier to make a better, more elegant FAT driver when you're not restrained by 16 bit code or the 512 byte limit.
- Things you'll virtually never need to know again, like real-mode address formation (how many people keep asking what the difference between ORG 0 and ORG 7C00 is?), the A20 gate (an IBM hack to keep compatibility with 20-year-old software), and just how long it takes just to write some code to switch to protected mode.
-
Curufir
Re:where to start?
I disagree, but then again I have before and will againTim Robinson wrote: Yep, writing a boot sector is a learning experience -- just not a valuable one.
This is one argument I'm not gonna win however, so I'd say use GRUB like everyone else and save yourself the effort.
