bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about multiboot-elf


From: Maciek Nowacki
Subject: Re: Question about multiboot-elf
Date: Mon, 14 May 2001 00:29:47 -0600
User-agent: Mutt/1.3.17i

Hi!

On Mon, May 14, 2001 at 06:38:07AM +0800, Rogelio Serrano wrote:
> 
> > Alternately, I suppose that GRUB could be hacked to map 
> > 0xc0000000-0xffffffff
> > to the physical range 0x00000000-0x30000000. 
> 
> I think that this would violate the multiboot standard. There is a 
> linker option to change the Load Memory Adress to 0x100000 and leave the 
> Virtual Memory Address wherever it is.

I have done this, after reading the bug-grub archives. It seems GRUB handles
things properly after applying your patch. Thanks!

> I used a ldscript for my kernel 
> but a linker option could do it for the linux kernel. GRUB does not 
> handle this correctly though and i have submitted patches to the grub 
> mailing list to correct this.
> 
> Additionally you have to modify head.S at arch/i386/boot to include the 
> multiboot header. I have tried this and it works but I did not do the 
> LMA and VMA thing yet. I might later tonight. And actually try to boot it.

My attempt at doing this failed, probably from changing the location of
startup32 by a few bytes. A second attempt, to work around this, fails since
multiboot_header is offset too far into the kernel image.

It seems that multiboot_header belongs in a non-loaded section of the file
in any case, and this would solve problems with bumping the kernel aside.
However, I'm having trouble convincing the linker to place my section at the
beginning of the file, where GRUB will see it. Supposedly, GNU ld will place
sections into the output file in the order they are mentioned. There must be
something else overriding that since '_multiboot_header' comes in at the
sixteenth place or so, far beyond GRUB's header scan.

I'd love to hear that I'm missing something obvious :-)

Maciek



reply via email to

[Prev in Thread] Current Thread [Next in Thread]