grub : loading below 1 mb not supported

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.
Post Reply
skoco

grub : loading below 1 mb not supported

Post by skoco »

hello guys,
  i have asked this question on alt.os.devel but nobody answered me yet...
i have linked my kernel (ELF) to LMA=0x100000 (1 meg), and VMA=0xC0000000 (3
gig) but when i want grub to load it, it says me : error 7 : loading below 1 mb
not supported. why? when I linked physical address to 2 megs grub told me the
same. also when I linked to binary file with -Ttext=0x100000 option. i dont
understant it.  please help ... thanks a lot ... skoco
carbonBased

RE:grub : loading below 1 mb not supported

Post by carbonBased »

My guess would be that, while .text may be starting at the 1MB mark, one or more sections may still be aligned at 0x0, which grub will refuse to do.

Check and make sure that all sections are accounted for, and where they reside.  I had to write a linker script to get my kernel linking exactly as I wanted it to.

Here's what I use:

SECTIONS {
  .text 0x00100000 :{
    *(.text)
  }
  textEnd = .;

  .data :{
    *(.data)
    *(.rodata)
  }
  dataEnd = .;

  .bss :{
    *(.common)
    *(.bss)
  }
  bssEnd = .;
}

Jeff

PS: I would imagine most put .rodata in .text... I really didn't care, and just tossed it in .data :)
Post Reply