Next Step
Re:Next Step
That depends on just how much you've already done. Assuming that what you have is a boot block that prints "Hello, world!" without loading anything, then what you'll need next is a boot loader that can read your actual kernel off of the disk. This is a subject of some controversy; some argue that the process of writing a boot loader is a distraction from the actual work of kernel design, and recommend using an existing bootloader like GRUB. Others argue that, even if you end up using GRUB, actually writing your own boot loader is a good warmup to the kernel work, and that skipping that step cheats you of useful insights. How you proceed with it is your call, but it should be pointed out that the booting is the reef on which the overwhelming majority of would-be OS developers founder on. If you can get passed it, you're doing pretty well, no matter how you did it.xxchrisxx wrote: After getting past the "Hello, World" kernel stage, what is the next step in writing a kerenl (Microkernel design)? What needs to be implemented first?
There are tutorials on reading from both floppy and hard disks in real mode listed on the .:QuickLinks:. thread, at Bona Fide OS Development, and at OSRC, among other places.
Assuming that you mean to write a 32-bit protected mode OS, then addition to loading the kernel into memory, you'll need to set the A20 memory address line so that you can access upper memory. You then need to set up a starting Global Descriptor Table and Interrupt Descriptor Table before switching into protected mode. Actually switching modes is fairly simple, but getting the tables right is a serious hazard. Tutorials on setting the A20 line and switching into and out of p-mode can be found in the places listed above.
If you choose to use GRUB, it will get you to this stage automatically. Tutorials on using GRUB can be found in the usual places.
If you're already using GRUB, or have already written a boot loader that gets you into p-mode, the next step usually is to re-map the interrupt vectors and add your 32-bit interrupt and exception handlers. You'll probably need to write code for handling call gates or task gates as well, to support system calls. Tutorials on these can be found in the locations listed above.
Oh, and somewhere around there you'll want to write some simple kernel-mode text and keyboard drivers, so you can see what the system is doing and interact with it. These will probably be stopgaps, and quite different from your final versions; but you'll still want to do the best you can with them. You'd be amazed how much throwaway code ends up hanging around forever.
Then usually comes setting up memory management, including handling paging and virtual memory. Here you're getting a bit out the league of tutorials, and a good book on OS design and theory is a must; still, information on these subjects is still readily available. You will want to have a clear understanding of the memory model you are using, which in most cases will be the 'flat' model.
After this would most likely come process scheduling and synchronization. Again, this is a complex issue which you will want a solid theoretical backgound on before proceeding.
The next step in most cases will be basic drivers, especially disk drivers. This is a less theoretically complex issue, but requires deep technical knowledge of the peripherals in question.
Next will probably be the file system, which is both theoretically and technically hairy. However, if you've gotten this far, you've already outdone 99.9% of all other OS projects, and you are probably up to the challenge. Again, a solid OS text is a must.
Next will probably be the program linkage-loader, which has to be able to read the file format you are using and handle any relocation patching before loading the program into memory and starting it. This deceptively simple-seeming task is fraught with odd quirks. An excellent book on the subject, Linkers and Loaders by Jon Levine, is available online; see the Book Recommendations thread for details.
You've now climbed the mountain; at this point, you have a working OS. You will need a few more things however, starting with a user interface. My advice is that even if you mean to use a GUI exclusively, start out with a simple text shell first. This will allow you to work in the system and flush out many of the bugs before going ahead with the GUI. Because graphical interfaces tend to be much more sensitive to system bugs, this is a very Good Idea.
You'll notice I've been pretty vague about the details of these, and that I've hedged on the order in which things are done. This is because these are only recommendations, not rules; you are free to proceed however you wish. This is just an outline of the most likely steps you'll need to take. The rest is up to you.
Re:Next Step
Thank you for that reply, at least now I know i'm pointed in the right direction
Re:Next Step
print routines
string routines
IDT
GDT
exceptions
PIC remap
PIT init frequency
keyboard isr
timer isr
mouse isr
bios32 pci detection
MB detection
Mhz detection
Try that stuff. You might also get some ideas from www.osdever.net in the tuts section. Try my xosdev tutorials. look in the table of contents for a list of stuff that i tackled in order.
btw- osdever's server is down(neopages.net)
string routines
IDT
GDT
exceptions
PIC remap
PIT init frequency
keyboard isr
timer isr
mouse isr
bios32 pci detection
MB detection
Mhz detection
Try that stuff. You might also get some ideas from www.osdever.net in the tuts section. Try my xosdev tutorials. look in the table of contents for a list of stuff that i tackled in order.
btw- osdever's server is down(neopages.net)
Re:Next Step
Why not use your 'Inexpensive Hosting' firm? Anyway I thought you'd transfered to some other company frmo Neopages when you were after donations.btw- osdever's server is down(neopages.net)
Pete
Re:Next Step
pete, might want to read the news. We have had problems transferring because our pwd was lost. Our registrar would not let us access it unless we reset the account. We lost 2 months of paid for hosting. We finally just got access back and are switching to namecheap.com then we will change the DNS servers.
I would use the EVhosting but we already paid for 1 year of hosting at dot5. Plus we are still working to get the servers setup perfectly.
NP is back up now, temporary delay.
We still have ~24 USD left over from the fund raiser, and we are EXTREMELY greatful, thank you.
We aren't conmen you know >:( ???
I would use the EVhosting but we already paid for 1 year of hosting at dot5. Plus we are still working to get the servers setup perfectly.
NP is back up now, temporary delay.
We still have ~24 USD left over from the fund raiser, and we are EXTREMELY greatful, thank you.
We aren't conmen you know >:( ???
Re:Next Step
Sorry if that's the impression I gave but I didn't mean it like that at all. I am truely grateful for all the work you put into your site.We aren't conmen you know
Pete
Re:Next Step
yeah no prob, i'm a little paranoid about some comments because as it is text and not tone it is hard to discern the message people are trying to get across.
Thanks, btw, kj and i enjoy people who enjoy the site
Thanks, btw, kj and i enjoy people who enjoy the site