Page 1 of 1
From scratch or not
Posted: Thu Mar 07, 2002 7:34 pm
by Dozzer
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)
Re: From scratch or not
Posted: Fri Mar 08, 2002 2:22 am
by Kernel Panic
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.)
Re: From scratch or not
Posted: Fri Mar 08, 2002 2:44 am
by The Legend
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 ...
Re: From scratch or not
Posted: Fri Mar 08, 2002 2:54 am
by _dozzer
How GRUB load modules and can it link it with kernel? or it just load kernel?
Re: From scratch or not
Posted: Fri Mar 08, 2002 3:09 am
by Tim
GRUB does the following:
- loads your kernel and a series of modules from a disk
- switches to protected mode
- jumps to your kernel
Re: From scratch or not
Posted: Fri Mar 08, 2002 3:16 am
by _dozzer
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
Re: From scratch or not
Posted: Mon Mar 11, 2002 12:17 am
by Tim
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