Bug#940628: grub-efi-{non-i386/amd64}-bin: Missing multiboot.mod

Colin Watson cjwatson at debian.org
Wed Sep 18 07:06:49 BST 2019


On Tue, Sep 17, 2019 at 04:29:37PM -0700, Elliott Mitchell wrote:
> In particular grub-efi-arm-bin should have
> /usr/lib/grub/arm-efi/multiboot.mod and grub-efi-arm64-bin should have
> /usr/lib/grub/arm64-efi/multiboot.mod

Well, to be clear, it's not just that the file is missing; multiboot and
multiboot2 have simply not yet been ported to ARM in GRUB upstream.  See
grub-core/Makefile.core.def, whose "enable" declarations indicate which
platforms these modules work on:

  module = {
    name = multiboot2;
    cppflags = "-DGRUB_USE_MULTIBOOT2";
  
    common = loader/multiboot.c;
    common = loader/multiboot_mbi2.c;
    enable = x86;
    enable = i386_xen_pvh;
    enable = mips;
  };
  
  module = {
    name = multiboot;
    common = loader/multiboot.c;
    x86 = loader/i386/multiboot_mbi.c;
    i386_xen_pvh = loader/i386/multiboot_mbi.c;
    extra_dist = loader/multiboot_elfxx.c;
    enable = x86;
    enable = i386_xen_pvh;
  };

(My guess would be that if anything would make sense to port it would be
multiboot2, not multiboot.  But I don't know ARM platforms at the
necessary level.)

> This makes it impossible for GRUB to load Xen on any platform that is not
> either i386 or amd64.  Xen has support for running on ARM platforms, but
> with no bootloader...
> 
> For example there is known to be working UEFI third-stage firmware for
> the Raspberry PI:
> https://github.com/tianocore/edk2-platforms/tree/master/Platform/RaspberryPi/RPi3
> 
> The absence of /usr/lib/grub/arm64-efi/multiboot.mod means entries
> generated by /etc/grub.d/20_linux_xen cannot work.

I don't understand this point.  20_linux_xen looks like this:

    if ($grub_file --is-arm64-efi $current_xen); then
        xen_loader="xen_hypervisor"
        module_loader="xen_module"
    else
        if ($grub_file --is-x86-multiboot2 $current_xen); then
            xen_loader="multiboot2"
            module_loader="module2"
        else
            xen_loader="multiboot"
            module_loader="module"
        fi
    fi

So on ARM (64-bit, anyway) it should use xen_hypervisor, not multiboot.

-- 
Colin Watson                                       [cjwatson at debian.org]



More information about the Pkg-grub-devel mailing list