gedd wrote:
The information seems to be missing in the Grub multiboot info for non elf or a.out kernel.
Of course it is. As has been pointed out already, and is painfully obvious if you bother to read the multiboot spec at all, GRUB only knows the ELF format. The a.out kludge is provided so that GRUB can load and properly zero the BSS section of any other kind of binary file, such as COFF or even PE (which you are constantly complaining about). If you'd properly fill in the values in the a.out kludge structure then perhaps you'd have much better luck here. As it is, GRUB doesn't even know about your BSS section so isn't bothering to zero it for you. I hope you're able to do that yourself, although it's much easier to just tell GRUB where it is and how big it is.
gedd wrote:
As it can be seen on the picture (but not be readed in the text
), i have no ELF header because my kernel is a PE file.
And because i use VS2008 i have not LD script of course so i don't use
barebones script but the excellent
Booting non-ELF kernel with GRUB tutorial
I'd hardly call that an "excellent tutorial" if it doesn't cover half the things you need to know, like how to get the size of the kernel loaded in memory.
From your own tutorial:
Code:
multiboot_header:
dd(MULTIBOOT_HEADER_MAGIC) ; magic number
dd(MULTIBOOT_HEADER_FLAGS) ; flags
dd(CHECKSUM) ; checksum
dd(HEADER_ADRESS) ; header address
dd(LOADBASE) ; load address
dd(00) ; load end address : not used
dd(00) ; bss end addr : not used
dd(HEADER_ADRESS + 0x20) ; entry_addr : equ kernel entry
; 0x20 is the size of multiboot heeader
Are you stupid, or just lazy? Actually, nevermind; I don't want to know. Either one isn't a proper excuse.
You've been given proper answers to this "question" of yours already. I've just given you another. Pick something and implement it. If you can't be bothered to learn how to properly use your compiler toolchain (which seems to be the case), you've
broken forum rule #3. As far as I'm concerned, you also broke rule #4.
Since GRUB doesn't work for you, perhaps you should just extend it so that it does, or write a bootloader yourself to make sure you get absolutely everything you want in a bootloader. GRUB isn't for everyone, but at least most people here follow the advice they are given and move on, rather than complaining about the same old crap day in and day out.