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.
The qemu emulator usr documentation said if I use "-vga std" qemu can provide a Standard VGA card with Bochs VBE extensions.
But I use this multiboot header,
There is no problem. Qemu does not support VBE with loading a kernel with --kernel. You need to use GRUB to load the kernel for the results you want, as that initializes VBE. Qemu with -vga std DOES support VBE, it just wont initialize it for you (like grub).
"Mulitboot knows VBE. we don't" eludes to this, as using sentence breaking would dictate two things
=> That the multiboot standard knows about VBE
=> Qemu, which is implementing the multiboot standard, does not.
Lionel wrote:There is no problem. Qemu does not support VBE with loading a kernel with --kernel. You need to use GRUB to load the kernel for the results you want, as that initializes VBE. Qemu with -vga std DOES support VBE, it just wont initialize it for you (like grub).
What version of grub are you using? I see your using a cross compiler (for i386... thats quite old, you know). How are you linking it? Whats your assembler? Could you post your Makefile (or build script) & linker script?
Lionel wrote:What version of grub are you using? I see your using a cross compiler (for i386... thats quite old, you know). How are you linking it? Whats your assembler? Could you post your Makefile (or build script) & linker script?
Er....First thank you for helping.But actually I just use my native gcc and grub2.00(I really don't want a cross-compiler because native gcc works well at least when I just using VGA text mode).
Here are my codes
I would suggest you to recompile with a cross-compiler. Its not that hard to make one. The problem might be caused by the fact you aren't using one. (if its not someone suggest the correct method to solve this) Take a look at the wiki for the steps to make a cross-compiler.
CookieOS. Want a cookie? Its only black and white for now though, probably as bad as my baking skills.
Read the Bare Bones tutorial. You are not building the kernel correctly with gcc, in particular you are not passing -ffreestanding and you don't appear to be linking the kernel correctly. Additionally, if this is a x86_64 kernel, you may wish to use -mno-red-zone and also disable sse and such if you don't support it.
hometue wrote:I would suggest you to recompile with a cross-compiler. Its not that hard to make one. The problem might be caused by the fact you aren't using one. (if its not someone suggest the correct method to solve this) Take a look at the wiki for the steps to make a cross-compiler.
I already build a i586-elf-gcc and x86_64-elf-gcc ,but i just don't want to use them.I ever used it and I know it works well.But I found when I'm just using VGA textmode,my native gcc works well too!So I just want to see if my gcc can do something I want.I 'll use my i586-elf-gcc and try again.Thank you.
sortie wrote:Read the Bare Bones tutorial. You are not building the kernel correctly with gcc, in particular you are not passing -ffreestanding and you don't appear to be linking the kernel correctly. Additionally, if this is a x86_64 kernel, you may wish to use -mno-red-zone and also disable sse and such if you don't support it.
When GRUB refuses to start an image, mbchk can sometimes give a hint. Did you try it?
Also, the Makefile looks like you're trying to keep the file system mounted all the time while you're running qemu? That's probably not a good idea. At the very least you need to do a 'sync', even if your VM doesn't write to the file system yet, but unmounting would be better.
ENTRY(start) isn't quite correct either, your kernel starts with executing the 16384 bytes of stack as code.