Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
hi, i've been toying around with OS dev for awhile, and recently decided to scrap all of my code and do a rewrite. however, this time around, i ran into multiboot trouble, but haven't been able to find errors. when i try to run my kernel through GRUB, it gives the "Invalid or unsupported executable format" error. i'm a bit unsure as to why, i can't find any errors within my multiboot header or lnkscript (which was pretty much copied verbatim from the bare bones tutorial). here they are:
apples wrote:hi, i've been toying around with OS dev for awhile, and recently decided to scrap all of my code and do a rewrite. however, this time around, i ran into multiboot trouble, but haven't been able to find errors.
The code looks fine to me. Could you post the output of "hexdump -C yourkernel.bin" (or something similar)?
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
i know i'm using PE/COFF as my executable format, but AFAIK GRUB supports that too and that should not be the issue as long as i provide my AOUT kludge. i wouldn't like to have to rebuild an i386-elf cross compiler, but i guess i will if i have to.
i'm on windows so i don't have access to the mbchk command.
That looks like a PE format file to me. I didn't know if GRUB supported PE (or COFF) so I did a google search hoping to find some GRUB documentation or something, and found Combuster's post saying GRUB doesn't support PE.
If GRUB loads the file into RAM as a flat binary, then most of these addresses will be wrong. For e.g. the address of the header would be 0x00100200, the load end address would be 0x00100e28, etc.
If it was me, I'd try to use "objcopy --output-target binary" to convert it into a flat binary file and see if that works...
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
The message was that PE doesn't work with GRUB. You can still use PE, just not for your kernel (which should be a flat binary in that case).
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]