ok, here is a link to my code, i had to do i this way cuz it was too big for the attachments.
http://www.terraquad.com/OmegaOS.zip
Grub and a kernel
Re:Grub and a kernel
Not true. GRUB can boot virtually any kernel in any file format as long as it has a correct multiboot header. I've used GRUB to succesfully boot kernels in binary, coff, pe, elf, and aout formats. As long as the multiboot header is correct, it'll work.grub requires ELF
K.J.
Re:Grub and a kernel
I second this. I've used GRUB to boot ELF, DJGPP COFF, and Win32 PE COFF kernels.K.J. wrote:Not true. GRUB can boot virtually any kernel in any file format as long as it has a correct multiboot header. I've used GRUB to succesfully boot kernels in binary, coff, pe, elf, and aout formats. As long as the multiboot header is correct, it'll work.grub requires ELF
It's certainly a lot simpler than trying to re-compile DJGPP or MinGW to make them support ELF.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Grub and a kernel
well, things seems to have evolved ... i apologize for my lack of knowledge ...
Re:Grub and a kernel
ok, on a turtorial on http://osdev.neopages.net about grub there is a multibootheader for aout kludge, i tryed to compile that thing but it came up with errors saying that it cant use an oporand and there is a prob with the folowing 3 lines:
dd code ; start of kernel .text (code) section
dd edata ; end of kernel .data section
dd end ; end of kernel BSS
dd code ; start of kernel .text (code) section
dd edata ; end of kernel .data section
dd end ; end of kernel BSS
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Grub and a kernel
@omegaice (pretty silly question, but who knows ...) did you define code, edata and end symbols properly ? the best way to do this is probably through the linker script (and declare them extern in the assembly file ... not tested though ...)
@KJ ...
From the tutorial i've read at osdev.neopages.net, it appears to me that GRUB has only builtin support for ELF files. If you want to load anything else, you have to give an "AOUT" header extension which will tell GRUB explicitely where code, data, etc. are located... correct ?
@KJ ...
From the tutorial i've read at osdev.neopages.net, it appears to me that GRUB has only builtin support for ELF files. If you want to load anything else, you have to give an "AOUT" header extension which will tell GRUB explicitely where code, data, etc. are located... correct ?