grub-devel
[Top][All Lists]
Advanced

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

[PATCH] move prefix initialisation to grub-mkimage (Re: grub_prefix)


From: Robert Millan
Subject: [PATCH] move prefix initialisation to grub-mkimage (Re: grub_prefix)
Date: Wed, 13 Jun 2007 19:01:59 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Wed, Jun 13, 2007 at 01:37:15AM +0800, Bean wrote:
> On Tue, Jun 12, 2007 at 03:54:12PM +0200, Robert Millan wrote:
> > 
> > Is there any reason why grub_prefix is in boot.img rather than core.img ?
> > 
> > This brings problems when the following conditions are met:
> > 
> >   - core.img is loaded directly without boot.img (via GRUB Legacy)
> >   - grub is not in /boot/grub (typicaly, when /boot is a separate partition)
> > 
> > If grub_prefix is moved to core.img, then grub-mkimage could be modified to
> > override prefix, supporting this setup.
> > 
> > Is this a good way to fix it?
> > 
> 
> I believe grub_prefix IS in core.img. It begins at 0x21C from the beginning
> of core.img. You may also want to modify the variable grub_install_dos_part
> at 0x214, for example, if booting from the first partition, set it to 0.
> 
> The above variables are defined in kern/i386/pc/startup.S.

Ah, somehow I got the impression that startup.S was part of boot.img :-)

Here's a patch to add a --prefix option for the pc and efi version of
grub-mkimage, that moves initialisation of grub_prefix from kernel image
to grub-mkimage, possibly overriding it.

I tested it and is known to work, but does this look right?  Can someone
comment?

-- 
Robert Millan

My spam trap is address@hidden  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.

Attachment: move_prefix_initialisation_to_mkimage.diff
Description: Text Data


reply via email to

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