qemu keeps restarting after grub menu

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.
leledumbo
Member
Member
Posts: 103
Joined: Wed Apr 23, 2008 8:46 pm

Re: qemu keeps restarting after grub menu

Post by leledumbo »

It doesn't boot correctly. It executes random code, which happens to have you end up in main() and make it appear that it works. For the time being.
Hmm... OK. In the debug info (see previous post) Start is located at 0x10000c but it boots at 0x100000, I guess that's the problem. I should examine my linker script, I remember doing something to it a few months (or weeks) ago.
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: qemu keeps restarting after grub menu

Post by Firestryke31 »

What you might consider doing is changing "start" to "realStart" (or something similar) and then before the multiboot structure just have something like this:

Code: Select all

global start
start:
  jmp realStart

;; Multiboot structure

;; realStart which was previously start
That way the code just jumps over the multiboot structure, and GRUB will still be able to find it.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
leledumbo
Member
Member
Posts: 103
Joined: Wed Apr 23, 2008 8:46 pm

Re: qemu keeps restarting after grub menu

Post by leledumbo »

OK, it works when I rename the entry point from Start to _start. This was exactly what I've done, but perhaps I didn't recheck it after recompilation. Is this an ld limitation?
Post Reply