OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 6:19 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: From scratch or not
PostPosted: Thu Mar 07, 2002 7:34 pm 
How do you think; it is better to write OS from scratch or re-use ready-to-use kernel with source to add possibilities we need?
I think that write it from scratch better, cuz may be we have another style of programming and another ideas about code organization...
But from the other side when you rewrite ready kernel you can write your OS faster... except situation when kernel will be buggy and we'll need additional time to catch them..
I need your advice what is faster:
1. Writing kernel from scratch
2. Adding possibilies we need in ready-to-use kernel + time for bugs catching (that were in this kernel)


Top
  
 
 Post subject: Re: From scratch or not
PostPosted: Fri Mar 08, 2002 2:22 am 
Writing a kernel from scratch is definitely faster, but you won't know what certain parts of code do. It may be also buggy, and it will be much harder to fix the bugs in an already working system than in the one you're writing yourself. Furthermore, you will most probably want to redesign the kernel you use in some way, and that's gonna be really difficult.
It's much easier to write your own one, using some code from other sources.
(See my post on our mailing list.)


Top
  
 
 Post subject: Re: From scratch or not
PostPosted: Fri Mar 08, 2002 2:44 am 
But if you something _really_ fits into your concept you should use it.

I don't think that writing a boot sector is neccessary (but a good training), GRUB is really cool in my opinion.

I don't think that you'll find a kernel that will fullfil your ideas ...


Top
  
 
 Post subject: Re: From scratch or not
PostPosted: Fri Mar 08, 2002 2:54 am 
How GRUB load modules and can it link it with kernel? or it just load kernel?


Top
  
 
 Post subject: Re: From scratch or not
PostPosted: Fri Mar 08, 2002 3:09 am 
GRUB does the following:
  • loads your kernel and a series of modules from a disk
  • switches to protected mode
  • jumps to your kernel


Top
  
 
 Post subject: Re: From scratch or not
PostPosted: Fri Mar 08, 2002 3:16 am 
I need to know the following information:
1. Where is grub GDT located?2. Where are modules located?

Can i do following:
1. grub loads kernel, modules and init module
jumps to init module
2. init module links kernel and modules together
jumps to kernel module


Top
  
 
 Post subject: Re: From scratch or not
PostPosted: Mon Mar 11, 2002 12:17 am 
GRUB gives you a pointer to a multiboot info structure in the EBX register when it passes control to your kernel. In there, there are pointers to a linked list of module information structures (which give you the locations and sizes of each module), as well as pointers to the kernel's command line and the BIOS memory map.

Read this:
http://www.execpc.com/~geezer/osd/boot/grub-how.txt


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 317 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group