Page 1 of 1
Booting error
Posted: Fri Nov 05, 2004 9:01 am
by Tehy
I have make a floppy: A:\boot\grub\
there is menu.lst, stage1, stage2 and kernel.ccp.
When I'm booting from the floppy first all works perfect I can choose my os but when it try loads my kernel I got error, ERROR 13: Invalid or unsupported executable format.
Can someone tell me what is wrong?
Thanks!
Re:Booting error
Posted: Fri Nov 05, 2004 9:03 am
by Pype.Clicker
what about compiling "kernel.cpp" into some binary format ?
(or am i misinterpreting ".cpp" == "C++ sources" ?)
Re:Booting error
Posted: Fri Nov 05, 2004 9:15 am
by Tehy
yes it is c++ source. can I use that or what I need to do?
Re:Booting error
Posted: Fri Nov 05, 2004 9:34 am
by Pype.Clicker
oh no, i'm afraid you can't use it just like that ...
GRUB expect to be given an ELF file (that is unix-styled compiled executable). You at least need to compile the sources (gcc / cygwin) into some machinecode, perhaps to link them with other compiled stuff (ld) before you finally get something GRUB can use.
Moreover, you need to know that you'll have virtually NO support code, that means no standard library of whatever form you could imagine, no exception support (which is part of the so-called "runtime library"), etc.
I suggest you check out
http://www.osdev.org/osfaq2/index.php/BareBonesC%2B%2B and
http://www.osdev.org/osfaq2/index.php/D ... %20C%2B%2B to get an idea of what you're facing ...