[v3,3/4] * util/grub.d/20_linux_xen.in: Add support of the XEN boot on aarch64

Message ID CADyBb7vNYwhiODgqJhc=WPfxNXf13WE8zfiCVin4jnRefjNgZQ@mail.gmail.com
State New
Headers show

Commit Message

Fu Wei Oct. 30, 2015, 8:44 a.m.
Hi Vladimir,

Great thanks for your suggestion! :-)

On 29 October 2015 at 23:25, Vladimir 'φ-coder/phcoder' Serbinenko
<phcoder@gmail.com> wrote:
>> +if [ "x$machine" != xaarch64 ]; then
>> +     multiboot_cmd="multiboot"
>> +     module_linux_cmd="module"
>> +     module_initrd_cmd="module --nounzip"
>> +else
>> +     multiboot_cmd="xen_hypervisor"
>> +     module_linux_cmd="xen_linux"
>> +     module_initrd_cmd="xen_initrd"
>> +fi
>> +
> Please do not hardcode an assumption that grub-mkconfig is executed on
> the same machine as GRUB is booted. I know that we have instances of
> such assumption in some cases but we'd like to eliminate them. Alternatives:
> - Check arch on boot time


> - Check that new xen commands are supported (define a new feature)
> Please add xen_* aliases on x86 as well
I would like to go this way, but could you provide some help or a
little example for :
(1) How to check the new xen commands(or xen_boot module)
(2)add xen_* aliases on x86, is that like something below?

But how to deal with xen_initrd ?
Could you help me ?

Great thanks !!

>
>

Patch hide | download patch | download mbox

diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c
index c4d9689..b88d51b 100644
--- a/grub-core/loader/i386/xen.c
+++ b/grub-core/loader/i386/xen.c
@@ -696,10 +696,14 @@  GRUB_MOD_INIT (xen)
                                   0, N_("Load Linux."));
   cmd_multiboot = grub_register_command ("multiboot", grub_cmd_xen,
                                         0, N_("Load Linux."));
+  cmd_multiboot = grub_register_command ("xen_hypervisor", grub_cmd_xen,
+                                        0, N_("Load Linux."));
   cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
                                      0, N_("Load initrd."));
   cmd_module = grub_register_command ("module", grub_cmd_module,
                                      0, N_("Load module."));
+  cmd_module = grub_register_command ("xen_linux", grub_cmd_module,
+                                     0, N_("Load module."));
   my_mod = mod;
 }