[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiboot specification for PowerPC
From: |
Peter Bruin |
Subject: |
Re: Multiboot specification for PowerPC |
Date: |
Mon, 2 Aug 2004 13:10:04 +0200 |
User-agent: |
Internet Messaging Program (IMP) 3.2.1 |
Marco Gerards <address@hidden> wrote:
> So we will need some architecture specific information anyway. If you
> can help with that part please do. Johan (if he is still interested)
> and I planned working on this. I can contact you to ask for your
> opinion on the PPC version.
OK, I'll read what has been written about this on the mailing list and see if I
can add something useful to the discussion (but I probably won't have a lot of
time).
> > By the way, I compiled GRUB 2, and it seems to work on my machine (eMac).
> > I haven't tried to boot a Linux kernel with it yet, though. There were
> > two small compilation problems, for which I have included a patch below.
> > (I'm not entirely sure about the change to grub_linux_init; I remember
> > reading a discussion about the two functions involved on the mailing list,
> > but grub_rescue_cmd_linux doesn't appear to exist.)
>
> It is nice to hear that it works. Actually, you are the first person
> testing it. What kind of machine is that eMac of yours?
It's a PPC 7455 (G4) with boot ROM version 4.8.2f1 (that might be the
OpenFirmware version, but I'm too lazy to reboot my computer to check - OF calls
itself OF 3, but there must be a real version number somewhere) and 256 MB RAM.
> > 2004-08-02 Peter Bruin <address@hidden>
> >
> > * loader/powerpc/ieee1275/linux.c (grub_load_linux): Remove
> > superfluous checks for validity of ELF header.
>
> Why do you want to remove these checks?
They don't break anything (yes, I know, if it ain't broke don't fix it...), but
they are never executed, because if the ELF header is invalid this is already
detected in the first if-statement:
if (!((ehdr.e_ident[EI_MAG0] == ELFMAG0)
&& (ehdr.e_ident[EI_MAG1] == ELFMAG1)
&& (ehdr.e_ident[EI_MAG2] == ELFMAG2)
&& (ehdr.e_ident[EI_MAG3] == ELFMAG3)
&& (ehdr.e_ident[EI_CLASS] == ELFCLASS32)
&& (ehdr.e_ident[EI_DATA] == ELFDATA2MSB)
&& (ehdr.e_ident[EI_VERSION] == EV_CURRENT)
&& (ehdr.e_type == ET_EXEC) && (ehdr.e_machine == EM_PPC)
&& (ehdr.e_version == EV_CURRENT)))
{
grub_error (GRUB_ERR_UNKNOWN_OS, "No valid ELF header found");
goto fail;
}
Thanks,
Peter