On 30.10.2015 09:44, Fu Wei wrote: > Hi Vladimir, > > Great thanks for your suggestion! :-) > > On 29 October 2015 at 23:25, Vladimir 'φ-coder/phcoder' Serbinenko > 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? > see grub-core/normal/main.c the features array. > 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; > } > > But how to deal with xen_initrd ? > Could you help me ? > Just another alias to module. Possibly you might want to add a code to xen_initrd tto check that xen_linux was already run > Great thanks !! > >> >> > > >