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!
Booting error
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Booting error
what about compiling "kernel.cpp" into some binary format ?
(or am i misinterpreting ".cpp" == "C++ sources" ?)
(or am i misinterpreting ".cpp" == "C++ sources" ?)
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Booting error
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 ...
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 ...