[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EFI and multiboot2 devlopment work for Xen
From: |
Konrad Rzeszutek Wilk |
Subject: |
Re: EFI and multiboot2 devlopment work for Xen |
Date: |
Tue, 22 Oct 2013 10:57:24 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Oct 22, 2013 at 02:18:52PM +0000, Woodhouse, David wrote:
>
> > I wonder why Linux can't make the EFI calls to fetch them itself?
>
> It can. It does. It prefers to. This is what the "EFI boot stub" is all
> about. But grub2 is crack-inspired and likes to do all kinds of crap that it
> shouldn't. It is an exercise in complexity for complexity's sake. The
> 'linuxefi' method is actually not really Linux-specific; it just boots an EFI
> executable (which the bzImage *is* when compiled that way).
Perhaps I am reading the wrong code, but I am unable to find this
in the source.
I am looking in grub_cmd_linux in grub-core/loader/i386/efi/linux.c (Fedora 19
src RPM)
and I see:
if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh))
{
if (!grub_errno)
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
argv[0]);
goto fail;
}
if (lh.boot_flag != grub_cpu_to_le16 (0xaa55))
{
grub_error (GRUB_ERR_BAD_OS, N_("invalid magic number"));
goto fail;
}
if (lh.setup_sects > GRUB_LINUX_MAX_SETUP_SECTS)
{
grub_error (GRUB_ERR_BAD_OS, N_("too many setup sectors"));
goto fail;
}
.. snip..
if (!lh.handover_offset)
{
grub_error (GRUB_ERR_BAD_OS, N_("kernel doesn't support EFI handover"));
goto fail;
}
Which would imply that the header MUST have a Linux x86/boot header.
Which GRUB2 module can boot an non-Linux x86/boot header?
>
> Seriously, forget bootloaders (especially grub2) and make it a COFF/PE
> executable. Then everything should just work, including Secure Boot etc.
>
> And bootloaders can still load that, of course.
That 'that' is a standard PE/COFF image? Could you please point me
to the code that does that in GRUB2?
Thanks!
- Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen, (continued)
- Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen, Jan Beulich, 2013/10/23
- Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen, Jan Beulich, 2013/10/23
- Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/10/23
- Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen, Jan Beulich, 2013/10/24
- Re: EFI and multiboot2 devlopment work for Xen, Jan Beulich, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Woodhouse, David, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen,
Konrad Rzeszutek Wilk <=
- Re: EFI and multiboot2 devlopment work for Xen, Ian Campbell, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Konrad Rzeszutek Wilk, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Ian Campbell, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Ian Campbell, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Konrad Rzeszutek Wilk, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Woodhouse, David, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Matthew Garrett, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Woodhouse, David, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Daniel Kiper, 2013/10/22
- Re: EFI and multiboot2 devlopment work for Xen, Ian Campbell, 2013/10/22