All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: Pavel Roskin <proski@gnu.org>
Cc: The development of GRUB 2 <grub-devel@gnu.org>,
	Jan Nieuwenhuizen <janneke-list@xs4all.nl>
Subject: Re: Testing on PowerMac G4
Date: Thu, 3 Jan 2008 13:11:12 +0100	[thread overview]
Message-ID: <20080103121112.GB6169@thorin> (raw)
In-Reply-To: <20080103030917.jl75lsuhkc8gk4w8@webmail.spamcop.net>

On Thu, Jan 03, 2008 at 03:09:17AM -0500, Pavel Roskin wrote:
> Quoting Robert Millan <rmh@aybabtu.com>:
> 
> >just take the grub-mkimage.c part of it and try to revert it on CVS HEAD,
> >that would confirm it's a grub-mkimage problem.  Then apply the hunks
> >selectively untill you find the exact change that broke it.  And finally
> >it's just a matter of "looking hard" at that hunk untill it's coerced to
> >reveal the problem :-)
> 
> OK, here's what I have so far.  The patch tries to make the memory  
> layout more compact.  Two changes are make to the layout.  kernel.elf  
> is loaded at 64k instead of 2M and the modules are loaded at the  
> lowest 4k boundary after kernel.elf rather that at 3M.
> 
> Moving the kernel.elf load address is fine.  Moving the modules is not.
> 
> The module base address is calculated separately in kernel.elf and in  
> grub-mkimage.  kernel.elf uses the "_end" symbol, whereas grub-mkimage  
> looks for the ELF segment with the highest end address.

Ok, so you mean this setting:

  phdr->p_vaddr = grub_host_to_target32 (modbase);
  phdr->p_paddr = grub_host_to_target32 (modbase);

is not what it's used to calculate _end ?

I thought _end was calculated by the ELF loader (our own ELF loader,
multiboot.c seems to calculate _end and pass it to its payload).

> One problem in grub-mkimage is the infamous build ID, which is present  
> in kernel.elf.  It is located in a loadable segment starting at  
> 0x10000d4 (i.e. just about 256M).  That's what confuses objcopy, and  
> it must be confusing grub-mkimage as well.

Isn't build ID a recent change in binutils?  We had this problem for a while.

> I actually doubt that it's the right behavior to go through segments.   

No idea about that I'm afraid :-(

> Linux style description.  The first line is the synopsis.  If it  
> doesn't fit 72 characters, the patch is a candidate for splitting.   
> Then an empty line.  Then a more detailed description of the patch,  
> including the motivation behind the changes.  The list of the affected  
> files can be generated by the version control system.

Looks good.  But I guess you'll have to convince Marco and Okuji about this :-)

> The linear ChangeLog with everybody changing it in the same place (in  
> the beginning) doesn't work well with parallel development.

It's not that much of a problem, I just write them in the patch header and
copy them at the last minute before commit.

> >>disk/ieee1275/ofdisk.c:65: Opening `ide1/disk:0'.
> >>disk/ieee1275/ofdisk.c:74: Opened `ide1/disk:0' as handle 0xff9d1c00.
> >>kern/disk.c:299: Opening `ide1/disk' failed.
> >>kern/disk.c:312: Closing `ide1/disk'.
> >
> >This seems to be contradictory.  If OF returned a handle, why does the
> >open fail ?  Looks like GRUB doesn't like something but isn't telling you
> >what.  I'd investigate that part;  at the least it can mean our error
> >handling isn't good enough.
> 
> Actually, there are no "failures" with the version from 2007-02-20.   

Does a snapshot from 2007-02-21 also have this problem?

> But maybe it's because in the normal mode with all modules loaded,  
> unlike bare kernel.elf.

But you don't need modules for ofdisk to work, it's built into the kernel.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)



  reply	other threads:[~2008-01-03 12:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-31  8:12 Testing on PowerMac G4 Pavel Roskin
2007-12-31  8:45 ` Jan Nieuwenhuizen
2007-12-31 22:37   ` Pavel Roskin
2007-12-31 23:34     ` Robert Millan
2008-01-02  6:46       ` Pavel Roskin
2008-01-02 10:32         ` Robert Millan
2008-01-03  8:09           ` Pavel Roskin
2008-01-03 12:11             ` Robert Millan [this message]
2008-01-03 15:28               ` Pavel Roskin
2008-01-03 15:57                 ` Robert Millan
2008-01-03 16:23                   ` Pavel Roskin
2008-01-04 12:32                     ` Robert Millan
2008-01-04 12:54                       ` Robert Millan
2008-01-04 18:26                       ` Pavel Roskin
2008-01-04 20:37                         ` Robert Millan
2008-01-05  1:45                           ` Yoshinori K. Okuji
2008-01-05 11:43                             ` Robert Millan
2008-01-05  2:10                           ` Pavel Roskin
2008-01-05 11:45                             ` Robert Millan
2008-01-05  1:27                 ` Yoshinori K. Okuji
2008-01-05  2:02                   ` Pavel Roskin
2008-01-05 10:31                     ` Yoshinori K. Okuji
2008-01-05 11:46                   ` Robert Millan
2007-12-31 14:04 ` Robert Millan
2007-12-31 22:58   ` Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080103121112.GB6169@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    --cc=janneke-list@xs4all.nl \
    --cc=proski@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.