All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/3] arm64,xen: add xen_boot support into grup-mkconfig
@ 2017-05-02  7:06 ` fu.wei
  0 siblings, 0 replies; 44+ messages in thread
From: fu.wei @ 2017-05-02  7:06 UTC (permalink / raw)
  To: dkiper, grub-devel, arvidjaar, phcoder
  Cc: xen-devel, Ian.Campbell, jcm, leif.lindholm, julien.grall,
	sstabellini, linaro-uefi, Fu Wei

From: Fu Wei <fu.wei@linaro.org>

This patchset add xen_boot support into grup-mkconfig for
generating xen boot entrances automatically

Also update the docs/grub.texi for new xen_boot commands.

ChangeLog:
v7: http://lists.gnu.org/archive/html/grub-devel/2017-05/
    Delete patch 0001(v6) which is wrong.
    Improve the commit message of 0002(v6).
    Use "machine" variable instead of "feature_xen_boot" mechanism to
    determine which xen boot commands we should use.
    Update the introduction of xen_module commands in docs/grub.texi,
    emphasize xen_hypervisor and xen_module are only for AArch64.

v6: http://lists.gnu.org/archive/html/grub-devel/2016-07/msg00034.html
    Fix Coding style of util/grub.d/20_linux_xen.in, use soft tab.

v5: http://lists.gnu.org/archive/html/grub-devel/2016-07/msg00008.html
    Update the introduction of xen_module commands in docs/grub.texi,
    according to the suggestion from Julien Grall

v4: http://lists.gnu.org/archive/html/grub-devel/2016-05/
    according to the XSM loading mechanism of Xen(upstreamed),
    update the introduction of xen_module commands in docs/grub.texi

v3: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00314.html
    reorder the patches
    update the introduction of xen_module commands in docs/grub.texi

v2: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00282.html
    add "--nounzip" option support in xen_module
    use "feature_xen_boot" instead of "grub_xen_boot"
    update the introduction of xen boot commands in docs/grub.texi

v1 :first upstream patchset:
    http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00264.html
Fu Wei (3):
  arm64: add "--nounzip" option support in xen_module command
  * util/grub.d/20_linux_xen.in: Add xen_boot command support for
    aarch64
  arm64: update the introduction of xen boot commands in docs/grub.texi

 docs/grub.texi                    | 38 +++++++++++++-------------------------
 grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
 util/grub.d/20_linux_xen.in       | 13 ++++++++++---
 3 files changed, 40 insertions(+), 28 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [PATCH v7 0/3] arm64,xen: add xen_boot support into grup-mkconfig
@ 2017-05-02  7:06 ` fu.wei
  0 siblings, 0 replies; 44+ messages in thread
From: fu.wei @ 2017-05-02  7:06 UTC (permalink / raw)
  To: dkiper, grub-devel, arvidjaar, phcoder
  Cc: linaro-uefi, Ian.Campbell, julien.grall, xen-devel, jcm,
	leif.lindholm, sstabellini, Fu Wei

From: Fu Wei <fu.wei@linaro.org>

This patchset add xen_boot support into grup-mkconfig for
generating xen boot entrances automatically

Also update the docs/grub.texi for new xen_boot commands.

ChangeLog:
v7: http://lists.gnu.org/archive/html/grub-devel/2017-05/
    Delete patch 0001(v6) which is wrong.
    Improve the commit message of 0002(v6).
    Use "machine" variable instead of "feature_xen_boot" mechanism to
    determine which xen boot commands we should use.
    Update the introduction of xen_module commands in docs/grub.texi,
    emphasize xen_hypervisor and xen_module are only for AArch64.

v6: http://lists.gnu.org/archive/html/grub-devel/2016-07/msg00034.html
    Fix Coding style of util/grub.d/20_linux_xen.in, use soft tab.

v5: http://lists.gnu.org/archive/html/grub-devel/2016-07/msg00008.html
    Update the introduction of xen_module commands in docs/grub.texi,
    according to the suggestion from Julien Grall

v4: http://lists.gnu.org/archive/html/grub-devel/2016-05/
    according to the XSM loading mechanism of Xen(upstreamed),
    update the introduction of xen_module commands in docs/grub.texi

v3: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00314.html
    reorder the patches
    update the introduction of xen_module commands in docs/grub.texi

v2: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00282.html
    add "--nounzip" option support in xen_module
    use "feature_xen_boot" instead of "grub_xen_boot"
    update the introduction of xen boot commands in docs/grub.texi

v1 :first upstream patchset:
    http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00264.html
Fu Wei (3):
  arm64: add "--nounzip" option support in xen_module command
  * util/grub.d/20_linux_xen.in: Add xen_boot command support for
    aarch64
  arm64: update the introduction of xen boot commands in docs/grub.texi

 docs/grub.texi                    | 38 +++++++++++++-------------------------
 grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
 util/grub.d/20_linux_xen.in       | 13 ++++++++++---
 3 files changed, 40 insertions(+), 28 deletions(-)

-- 
2.9.3



^ permalink raw reply	[flat|nested] 44+ messages in thread

* [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command
  2017-05-02  7:06 ` fu.wei
@ 2017-05-02  7:06   ` fu.wei
  -1 siblings, 0 replies; 44+ messages in thread
From: fu.wei @ 2017-05-02  7:06 UTC (permalink / raw)
  To: dkiper, grub-devel, arvidjaar, phcoder
  Cc: xen-devel, Ian.Campbell, jcm, leif.lindholm, julien.grall,
	sstabellini, linaro-uefi, Fu Wei

From: Fu Wei <fu.wei@linaro.org>

This patch adds "--nounzip" option support in order to
be compatible with the module command of multiboot on other architecture,
by this way we can simplify grub-mkconfig support code.

This patch also allow us to use zip compressed module(like Linux kernel
"vmlinuz*" for Dom0).

Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
 grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
index a914eb8..0878364 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -20,6 +20,7 @@
 #include <grub/charset.h>
 #include <grub/command.h>
 #include <grub/err.h>
+#include <grub/env.h>
 #include <grub/file.h>
 #include <grub/fdt.h>
 #include <grub/list.h>
@@ -379,6 +380,20 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),
 
   struct xen_boot_binary *module = NULL;
   grub_file_t file = 0;
+  int nounzip = 0;
+
+  if (!argc)
+    {
+      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
+      goto fail;
+    }
+
+  if (grub_strcmp (argv[0], "--nounzip") == 0)
+    {
+      argv++;
+      argc--;
+      nounzip = 1;
+    }
 
   if (!argc)
     {
@@ -403,6 +418,8 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),
 
   grub_dprintf ("xen_loader", "Init module and node info\n");
 
+  if (nounzip)
+    grub_file_filter_disable_compression ();
   file = grub_file_open (argv[0]);
   if (!file)
     goto fail;
-- 
2.9.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command
@ 2017-05-02  7:06   ` fu.wei
  0 siblings, 0 replies; 44+ messages in thread
From: fu.wei @ 2017-05-02  7:06 UTC (permalink / raw)
  To: dkiper, grub-devel, arvidjaar, phcoder
  Cc: linaro-uefi, Ian.Campbell, julien.grall, xen-devel, jcm,
	leif.lindholm, sstabellini, Fu Wei

From: Fu Wei <fu.wei@linaro.org>

This patch adds "--nounzip" option support in order to
be compatible with the module command of multiboot on other architecture,
by this way we can simplify grub-mkconfig support code.

This patch also allow us to use zip compressed module(like Linux kernel
"vmlinuz*" for Dom0).

Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
 grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
index a914eb8..0878364 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -20,6 +20,7 @@
 #include <grub/charset.h>
 #include <grub/command.h>
 #include <grub/err.h>
+#include <grub/env.h>
 #include <grub/file.h>
 #include <grub/fdt.h>
 #include <grub/list.h>
@@ -379,6 +380,20 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),
 
   struct xen_boot_binary *module = NULL;
   grub_file_t file = 0;
+  int nounzip = 0;
+
+  if (!argc)
+    {
+      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
+      goto fail;
+    }
+
+  if (grub_strcmp (argv[0], "--nounzip") == 0)
+    {
+      argv++;
+      argc--;
+      nounzip = 1;
+    }
 
   if (!argc)
     {
@@ -403,6 +418,8 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),
 
   grub_dprintf ("xen_loader", "Init module and node info\n");
 
+  if (nounzip)
+    grub_file_filter_disable_compression ();
   file = grub_file_open (argv[0]);
   if (!file)
     goto fail;
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-02  7:06 ` fu.wei
@ 2017-05-02  7:06   ` fu.wei
  -1 siblings, 0 replies; 44+ messages in thread
From: fu.wei @ 2017-05-02  7:06 UTC (permalink / raw)
  To: dkiper, grub-devel, arvidjaar, phcoder
  Cc: xen-devel, Ian.Campbell, jcm, leif.lindholm, julien.grall,
	sstabellini, linaro-uefi, Fu Wei

From: Fu Wei <fu.wei@linaro.org>

This patch adds the support of xen_boot command for aarch64:
    xen_hypervisor
    xen_module
These two commands are only for aarch64, since it has its own protocol and
commands to boot xen hypervisor and Dom0, but not multiboot.

For other architectures, they are still using multiboot and module
commands.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
 util/grub.d/20_linux_xen.in | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index c48af94..9777719 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -122,16 +122,16 @@ linux_entry ()
         else
             xen_rm_opts="no-real-mode edd=off"
         fi
-	multiboot	${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
+	${xen_loader}	${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
 	echo	'$(echo "$lmessage" | grub_quote)'
-	module	${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
+	${module_loader}	${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
 EOF
   if test -n "${initrd}" ; then
     # TRANSLATORS: ramdisk isn't identifier. Should be translated.
     message="$(gettext_printf "Loading initial ramdisk ...")"
     sed "s/^/$submenu_indentation/" << EOF
 	echo	'$(echo "$message" | grub_quote)'
-	module	--nounzip   ${rel_dirname}/${initrd}
+	${module_loader}	--nounzip   ${rel_dirname}/${initrd}
 EOF
   fi
   sed "s/^/$submenu_indentation/" << EOF
@@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
     if [ "x$is_top_level" != xtrue ]; then
 	echo "	submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
     fi
+    if [ "x$machine" != xaarch64 ]; then
+	xen_loader="multiboot"
+	module_loader="module"
+    else
+	xen_loader="xen_hypervisor"
+	module_loader="xen_module"
+    fi
     while [ "x$list" != "x" ] ; do
 	linux=`version_find_latest $list`
 	gettext_printf "Found linux image: %s\n" "$linux" >&2
-- 
2.9.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-02  7:06   ` fu.wei
  0 siblings, 0 replies; 44+ messages in thread
From: fu.wei @ 2017-05-02  7:06 UTC (permalink / raw)
  To: dkiper, grub-devel, arvidjaar, phcoder
  Cc: linaro-uefi, Ian.Campbell, julien.grall, xen-devel, jcm,
	leif.lindholm, sstabellini, Fu Wei

From: Fu Wei <fu.wei@linaro.org>

This patch adds the support of xen_boot command for aarch64:
    xen_hypervisor
    xen_module
These two commands are only for aarch64, since it has its own protocol and
commands to boot xen hypervisor and Dom0, but not multiboot.

For other architectures, they are still using multiboot and module
commands.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
 util/grub.d/20_linux_xen.in | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index c48af94..9777719 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -122,16 +122,16 @@ linux_entry ()
         else
             xen_rm_opts="no-real-mode edd=off"
         fi
-	multiboot	${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
+	${xen_loader}	${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
 	echo	'$(echo "$lmessage" | grub_quote)'
-	module	${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
+	${module_loader}	${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
 EOF
   if test -n "${initrd}" ; then
     # TRANSLATORS: ramdisk isn't identifier. Should be translated.
     message="$(gettext_printf "Loading initial ramdisk ...")"
     sed "s/^/$submenu_indentation/" << EOF
 	echo	'$(echo "$message" | grub_quote)'
-	module	--nounzip   ${rel_dirname}/${initrd}
+	${module_loader}	--nounzip   ${rel_dirname}/${initrd}
 EOF
   fi
   sed "s/^/$submenu_indentation/" << EOF
@@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
     if [ "x$is_top_level" != xtrue ]; then
 	echo "	submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
     fi
+    if [ "x$machine" != xaarch64 ]; then
+	xen_loader="multiboot"
+	module_loader="module"
+    else
+	xen_loader="xen_hypervisor"
+	module_loader="xen_module"
+    fi
     while [ "x$list" != "x" ] ; do
 	linux=`version_find_latest $list`
 	gettext_printf "Found linux image: %s\n" "$linux" >&2
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH v7 3/3] arm64: update the introduction of xen boot commands in docs/grub.texi
  2017-05-02  7:06 ` fu.wei
@ 2017-05-02  7:06   ` fu.wei
  -1 siblings, 0 replies; 44+ messages in thread
From: fu.wei @ 2017-05-02  7:06 UTC (permalink / raw)
  To: dkiper, grub-devel, arvidjaar, phcoder
  Cc: xen-devel, Ian.Campbell, jcm, leif.lindholm, julien.grall,
	sstabellini, linaro-uefi, Fu Wei

From: Fu Wei <fu.wei@linaro.org>

delete: xen_linux, xen_initrd, xen_xsm
add: xen_module

This update bases on
    commit 0edd750e50698854068358ea53528100a9192902
    Author: Vladimir Serbinenko <phcoder@gmail.com>
    Date:   Fri Jan 22 10:18:47 2016 +0100

        xen_boot: Remove obsolete module type distinctions.

Also bases on the module loading mechanism of Xen code:
488c2a8 docs/arm64: clarify the documention for loading XSM support
67831c4 docs/arm64: update the documentation for loading XSM support
ca32012 xen/arm64: check XSM Magic from the second unknown module.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
---
 docs/grub.texi | 38 +++++++++++++-------------------------
 1 file changed, 13 insertions(+), 25 deletions(-)

diff --git a/docs/grub.texi b/docs/grub.texi
index e935af3..a0c4b9e 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -3873,11 +3873,9 @@ you forget a command, you can run the command @command{help}
 @comment * vbeinfo::                     List available video modes
 * verify_detached::             Verify detached digital signature
 * videoinfo::                   List available video modes
-@comment * xen_*::              Xen boot commands
-* xen_hypervisor::              Load xen hypervisor binary
-* xen_linux::                   Load dom0 kernel for xen hypervisor
-* xen_initrd::                  Load dom0 initrd for dom0 kernel
-* xen_xsm::                     Load xen security module for xen hypervisor
+@comment * xen_*::              Xen boot commands for AArch64
+* xen_hypervisor::              Load xen hypervisor binary (only on AArch64)
+* xen_module::                  Load xen modules for xen hypervisor (only on AArch64)
 @end menu
 
 
@@ -5153,32 +5151,22 @@ List available video modes. If resolution is given, show only matching modes.
 Load a Xen hypervisor binary from @var{file}. The rest of the line is passed
 verbatim as the @dfn{kernel command-line}. Any other binaries must be
 reloaded after using this command.
+This command is only available on AArch64 systems.
 @end deffn
 
-@node xen_linux
-@subsection xen_linux
+@node xen_module
+@subsection xen_module
 
-@deffn Command xen_linux file [arguments]
-Load a dom0 kernel image for xen hypervisor at the booting process of xen.
+@deffn Command xen_module [--nounzip] file [arguments]
+Load a module for xen hypervisor at the booting process of xen.
 The rest of the line is passed verbatim as the module command line.
+Modules should be loaded in the following order:
+ - dom0 kernel image
+ - dom0 ramdisk if present
+ - XSM policy if present
+This command is only available on AArch64 systems.
 @end deffn
 
-@node xen_initrd
-@subsection xen_initrd
-
-@deffn Command xen_initrd file
-Load a initrd image for dom0 kernel at the booting process of xen.
-@end deffn
-
-@node xen_xsm
-@subsection xen_xsm
-
-@deffn Command xen_xsm file
-Load a xen security module for xen hypervisor at the booting process of xen.
-See @uref{http://wiki.xen.org/wiki/XSM} for more detail.
-@end deffn
-
-
 @node Networking commands
 @section The list of networking commands
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH v7 3/3] arm64: update the introduction of xen boot commands in docs/grub.texi
@ 2017-05-02  7:06   ` fu.wei
  0 siblings, 0 replies; 44+ messages in thread
From: fu.wei @ 2017-05-02  7:06 UTC (permalink / raw)
  To: dkiper, grub-devel, arvidjaar, phcoder
  Cc: linaro-uefi, Ian.Campbell, julien.grall, xen-devel, jcm,
	leif.lindholm, sstabellini, Fu Wei

From: Fu Wei <fu.wei@linaro.org>

delete: xen_linux, xen_initrd, xen_xsm
add: xen_module

This update bases on
    commit 0edd750e50698854068358ea53528100a9192902
    Author: Vladimir Serbinenko <phcoder@gmail.com>
    Date:   Fri Jan 22 10:18:47 2016 +0100

        xen_boot: Remove obsolete module type distinctions.

Also bases on the module loading mechanism of Xen code:
488c2a8 docs/arm64: clarify the documention for loading XSM support
67831c4 docs/arm64: update the documentation for loading XSM support
ca32012 xen/arm64: check XSM Magic from the second unknown module.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
---
 docs/grub.texi | 38 +++++++++++++-------------------------
 1 file changed, 13 insertions(+), 25 deletions(-)

diff --git a/docs/grub.texi b/docs/grub.texi
index e935af3..a0c4b9e 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -3873,11 +3873,9 @@ you forget a command, you can run the command @command{help}
 @comment * vbeinfo::                     List available video modes
 * verify_detached::             Verify detached digital signature
 * videoinfo::                   List available video modes
-@comment * xen_*::              Xen boot commands
-* xen_hypervisor::              Load xen hypervisor binary
-* xen_linux::                   Load dom0 kernel for xen hypervisor
-* xen_initrd::                  Load dom0 initrd for dom0 kernel
-* xen_xsm::                     Load xen security module for xen hypervisor
+@comment * xen_*::              Xen boot commands for AArch64
+* xen_hypervisor::              Load xen hypervisor binary (only on AArch64)
+* xen_module::                  Load xen modules for xen hypervisor (only on AArch64)
 @end menu
 
 
@@ -5153,32 +5151,22 @@ List available video modes. If resolution is given, show only matching modes.
 Load a Xen hypervisor binary from @var{file}. The rest of the line is passed
 verbatim as the @dfn{kernel command-line}. Any other binaries must be
 reloaded after using this command.
+This command is only available on AArch64 systems.
 @end deffn
 
-@node xen_linux
-@subsection xen_linux
+@node xen_module
+@subsection xen_module
 
-@deffn Command xen_linux file [arguments]
-Load a dom0 kernel image for xen hypervisor at the booting process of xen.
+@deffn Command xen_module [--nounzip] file [arguments]
+Load a module for xen hypervisor at the booting process of xen.
 The rest of the line is passed verbatim as the module command line.
+Modules should be loaded in the following order:
+ - dom0 kernel image
+ - dom0 ramdisk if present
+ - XSM policy if present
+This command is only available on AArch64 systems.
 @end deffn
 
-@node xen_initrd
-@subsection xen_initrd
-
-@deffn Command xen_initrd file
-Load a initrd image for dom0 kernel at the booting process of xen.
-@end deffn
-
-@node xen_xsm
-@subsection xen_xsm
-
-@deffn Command xen_xsm file
-Load a xen security module for xen hypervisor at the booting process of xen.
-See @uref{http://wiki.xen.org/wiki/XSM} for more detail.
-@end deffn
-
-
 @node Networking commands
 @section The list of networking commands
 
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 0/3] arm64, xen: add xen_boot support into grup-mkconfig
  2017-05-02  7:06 ` fu.wei
@ 2017-05-02  7:24   ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-02  7:24 UTC (permalink / raw)
  To: dkiper, The development of GNU GRUB, arvidjaar, Vladimir Serbinenko
  Cc: xen-devel, Jon Masters, ian.campbell, Leif Lindholm,
	Julien Grall, Stefano Stabellini, Linaro UEFI Mailman List,
	Fu Wei

Sorry for the typo

On 2 May 2017 at 15:06,  <fu.wei@linaro.org> wrote:
> From: Fu Wei <fu.wei@linaro.org>
>
> This patchset add xen_boot support into grup-mkconfig for
                                                                   ^
grub2-mkconfig
Also in the subject.

> generating xen boot entrances automatically
>
> Also update the docs/grub.texi for new xen_boot commands.
>
> ChangeLog:
> v7: http://lists.gnu.org/archive/html/grub-devel/2017-05/
>     Delete patch 0001(v6) which is wrong.
>     Improve the commit message of 0002(v6).
>     Use "machine" variable instead of "feature_xen_boot" mechanism to
>     determine which xen boot commands we should use.
>     Update the introduction of xen_module commands in docs/grub.texi,
>     emphasize xen_hypervisor and xen_module are only for AArch64.
>
> v6: http://lists.gnu.org/archive/html/grub-devel/2016-07/msg00034.html
>     Fix Coding style of util/grub.d/20_linux_xen.in, use soft tab.
>
> v5: http://lists.gnu.org/archive/html/grub-devel/2016-07/msg00008.html
>     Update the introduction of xen_module commands in docs/grub.texi,
>     according to the suggestion from Julien Grall
>
> v4: http://lists.gnu.org/archive/html/grub-devel/2016-05/
>     according to the XSM loading mechanism of Xen(upstreamed),
>     update the introduction of xen_module commands in docs/grub.texi
>
> v3: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00314.html
>     reorder the patches
>     update the introduction of xen_module commands in docs/grub.texi
>
> v2: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00282.html
>     add "--nounzip" option support in xen_module
>     use "feature_xen_boot" instead of "grub_xen_boot"
>     update the introduction of xen boot commands in docs/grub.texi
>
> v1 :first upstream patchset:
>     http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00264.html
> Fu Wei (3):
>   arm64: add "--nounzip" option support in xen_module command
>   * util/grub.d/20_linux_xen.in: Add xen_boot command support for
>     aarch64
>   arm64: update the introduction of xen boot commands in docs/grub.texi
>
>  docs/grub.texi                    | 38 +++++++++++++-------------------------
>  grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
>  util/grub.d/20_linux_xen.in       | 13 ++++++++++---
>  3 files changed, 40 insertions(+), 28 deletions(-)
>
> --
> 2.9.3
>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 0/3] arm64, xen: add xen_boot support into grup-mkconfig
@ 2017-05-02  7:24   ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-02  7:24 UTC (permalink / raw)
  To: dkiper, The development of GNU GRUB, arvidjaar, Vladimir Serbinenko
  Cc: Linaro UEFI Mailman List, Julien Grall, xen-devel, Jon Masters,
	Leif Lindholm, Stefano Stabellini, Fu Wei, ian.campbell

Sorry for the typo

On 2 May 2017 at 15:06,  <fu.wei@linaro.org> wrote:
> From: Fu Wei <fu.wei@linaro.org>
>
> This patchset add xen_boot support into grup-mkconfig for
                                                                   ^
grub2-mkconfig
Also in the subject.

> generating xen boot entrances automatically
>
> Also update the docs/grub.texi for new xen_boot commands.
>
> ChangeLog:
> v7: http://lists.gnu.org/archive/html/grub-devel/2017-05/
>     Delete patch 0001(v6) which is wrong.
>     Improve the commit message of 0002(v6).
>     Use "machine" variable instead of "feature_xen_boot" mechanism to
>     determine which xen boot commands we should use.
>     Update the introduction of xen_module commands in docs/grub.texi,
>     emphasize xen_hypervisor and xen_module are only for AArch64.
>
> v6: http://lists.gnu.org/archive/html/grub-devel/2016-07/msg00034.html
>     Fix Coding style of util/grub.d/20_linux_xen.in, use soft tab.
>
> v5: http://lists.gnu.org/archive/html/grub-devel/2016-07/msg00008.html
>     Update the introduction of xen_module commands in docs/grub.texi,
>     according to the suggestion from Julien Grall
>
> v4: http://lists.gnu.org/archive/html/grub-devel/2016-05/
>     according to the XSM loading mechanism of Xen(upstreamed),
>     update the introduction of xen_module commands in docs/grub.texi
>
> v3: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00314.html
>     reorder the patches
>     update the introduction of xen_module commands in docs/grub.texi
>
> v2: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00282.html
>     add "--nounzip" option support in xen_module
>     use "feature_xen_boot" instead of "grub_xen_boot"
>     update the introduction of xen boot commands in docs/grub.texi
>
> v1 :first upstream patchset:
>     http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00264.html
> Fu Wei (3):
>   arm64: add "--nounzip" option support in xen_module command
>   * util/grub.d/20_linux_xen.in: Add xen_boot command support for
>     aarch64
>   arm64: update the introduction of xen boot commands in docs/grub.texi
>
>  docs/grub.texi                    | 38 +++++++++++++-------------------------
>  grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
>  util/grub.d/20_linux_xen.in       | 13 ++++++++++---
>  3 files changed, 40 insertions(+), 28 deletions(-)
>
> --
> 2.9.3
>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-02  7:06   ` fu.wei
@ 2017-05-03 19:13     ` Andrew Cooper
  -1 siblings, 0 replies; 44+ messages in thread
From: Andrew Cooper @ 2017-05-03 19:13 UTC (permalink / raw)
  To: fu.wei, dkiper, grub-devel, arvidjaar, phcoder
  Cc: xen-devel, jcm, leif.lindholm, julien.grall, sstabellini, linaro-uefi

On 02/05/17 08:06, fu.wei@linaro.org wrote:
> From: Fu Wei <fu.wei@linaro.org>
>
> This patch adds the support of xen_boot command for aarch64:
>     xen_hypervisor
>     xen_module
> These two commands are only for aarch64, since it has its own protocol and
> commands to boot xen hypervisor and Dom0, but not multiboot.
>
> For other architectures, they are still using multiboot and module
> commands.
>
> Signed-off-by: Fu Wei <fu.wei@linaro.org>

Sorry if I am jumping in late and asking awkward questions, but what is
special about Xen/aarch64 here?  Why is it using a non-standard entry
mechanism?

~Andrew

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-03 19:13     ` Andrew Cooper
  0 siblings, 0 replies; 44+ messages in thread
From: Andrew Cooper @ 2017-05-03 19:13 UTC (permalink / raw)
  To: fu.wei, dkiper, grub-devel, arvidjaar, phcoder
  Cc: xen-devel, jcm, leif.lindholm, julien.grall, sstabellini, linaro-uefi

On 02/05/17 08:06, fu.wei@linaro.org wrote:
> From: Fu Wei <fu.wei@linaro.org>
>
> This patch adds the support of xen_boot command for aarch64:
>     xen_hypervisor
>     xen_module
> These two commands are only for aarch64, since it has its own protocol and
> commands to boot xen hypervisor and Dom0, but not multiboot.
>
> For other architectures, they are still using multiboot and module
> commands.
>
> Signed-off-by: Fu Wei <fu.wei@linaro.org>

Sorry if I am jumping in late and asking awkward questions, but what is
special about Xen/aarch64 here?  Why is it using a non-standard entry
mechanism?

~Andrew


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-03 19:13     ` Andrew Cooper
@ 2017-05-03 20:53       ` Stefano Stabellini
  -1 siblings, 0 replies; 44+ messages in thread
From: Stefano Stabellini @ 2017-05-03 20:53 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: grub-devel, xen-devel, arvidjaar, phcoder, linaro-uefi,
	leif.lindholm, julien.grall, sstabellini, fu.wei, jcm, dkiper

On Wed, 3 May 2017, Andrew Cooper wrote:
> On 02/05/17 08:06, fu.wei@linaro.org wrote:
> > From: Fu Wei <fu.wei@linaro.org>
> >
> > This patch adds the support of xen_boot command for aarch64:
> >     xen_hypervisor
> >     xen_module
> > These two commands are only for aarch64, since it has its own protocol and
> > commands to boot xen hypervisor and Dom0, but not multiboot.
> >
> > For other architectures, they are still using multiboot and module
> > commands.
> >
> > Signed-off-by: Fu Wei <fu.wei@linaro.org>
> 
> Sorry if I am jumping in late and asking awkward questions, but what is
> special about Xen/aarch64 here?  Why is it using a non-standard entry
> mechanism?

Multiboot is not available on ARM. The boot protocol we have on ARM is
FDT based:

http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt

We often refer to it as "multiboot for arm" but in fact it is not
related to the x86 multiboot in any way.

In Grub, the two protocols (multiboot and
docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
(55A687E5.4070106@gmail.com). Hence, the need for this patch.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-03 20:53       ` Stefano Stabellini
  0 siblings, 0 replies; 44+ messages in thread
From: Stefano Stabellini @ 2017-05-03 20:53 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: fu.wei, dkiper, grub-devel, arvidjaar, phcoder, xen-devel, jcm,
	leif.lindholm, julien.grall, sstabellini, linaro-uefi

On Wed, 3 May 2017, Andrew Cooper wrote:
> On 02/05/17 08:06, fu.wei@linaro.org wrote:
> > From: Fu Wei <fu.wei@linaro.org>
> >
> > This patch adds the support of xen_boot command for aarch64:
> >     xen_hypervisor
> >     xen_module
> > These two commands are only for aarch64, since it has its own protocol and
> > commands to boot xen hypervisor and Dom0, but not multiboot.
> >
> > For other architectures, they are still using multiboot and module
> > commands.
> >
> > Signed-off-by: Fu Wei <fu.wei@linaro.org>
> 
> Sorry if I am jumping in late and asking awkward questions, but what is
> special about Xen/aarch64 here?  Why is it using a non-standard entry
> mechanism?

Multiboot is not available on ARM. The boot protocol we have on ARM is
FDT based:

http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt

We often refer to it as "multiboot for arm" but in fact it is not
related to the x86 multiboot in any way.

In Grub, the two protocols (multiboot and
docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
(55A687E5.4070106@gmail.com). Hence, the need for this patch.


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 0/3] arm64, xen: add xen_boot support into grup-mkconfig
  2017-05-02  7:06 ` fu.wei
@ 2017-05-04 16:00   ` Daniel Kiper
  -1 siblings, 0 replies; 44+ messages in thread
From: Daniel Kiper @ 2017-05-04 16:00 UTC (permalink / raw)
  To: fu.wei
  Cc: grub-devel, xen-devel, Ian.Campbell, arvidjaar, phcoder,
	leif.lindholm, julien.grall, sstabellini, linaro-uefi, jcm,
	dkiper

Hey,

On Tue, May 02, 2017 at 03:06:24PM +0800, fu.wei@linaro.org wrote:
> From: Fu Wei <fu.wei@linaro.org>
>
> This patchset add xen_boot support into grup-mkconfig for
> generating xen boot entrances automatically
>
> Also update the docs/grub.texi for new xen_boot commands.

Slowly recovering after long weekend in Poland.
I will take a look at this probably next week.

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 0/3] arm64, xen: add xen_boot support into grup-mkconfig
@ 2017-05-04 16:00   ` Daniel Kiper
  0 siblings, 0 replies; 44+ messages in thread
From: Daniel Kiper @ 2017-05-04 16:00 UTC (permalink / raw)
  To: fu.wei
  Cc: dkiper, grub-devel, arvidjaar, phcoder, linaro-uefi,
	Ian.Campbell, julien.grall, xen-devel, jcm, leif.lindholm,
	sstabellini

Hey,

On Tue, May 02, 2017 at 03:06:24PM +0800, fu.wei@linaro.org wrote:
> From: Fu Wei <fu.wei@linaro.org>
>
> This patchset add xen_boot support into grup-mkconfig for
> generating xen boot entrances automatically
>
> Also update the docs/grub.texi for new xen_boot commands.

Slowly recovering after long weekend in Poland.
I will take a look at this probably next week.

Daniel


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 0/3] arm64, xen: add xen_boot support into grup-mkconfig
  2017-05-04 16:00   ` Daniel Kiper
@ 2017-05-05  8:52     ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-05  8:52 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: The development of GNU GRUB, xen-devel, Ian Campbell, arvidjaar,
	Vladimir Serbinenko, Leif Lindholm, Julien Grall,
	Stefano Stabellini, Linaro UEFI Mailman List, Jon Masters

Hi Daniel,

On 5 May 2017 at 00:00, Daniel Kiper <dkiper@net-space.pl> wrote:
> Hey,
>
> On Tue, May 02, 2017 at 03:06:24PM +0800, fu.wei@linaro.org wrote:
>> From: Fu Wei <fu.wei@linaro.org>
>>
>> This patchset add xen_boot support into grup-mkconfig for
>> generating xen boot entrances automatically
>>
>> Also update the docs/grub.texi for new xen_boot commands.
>
> Slowly recovering after long weekend in Poland.
> I will take a look at this probably next week.

OK, thanks, sorry for delay, I should post it long time ago.
Looking forward to your feedback!

>
> Daniel



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 0/3] arm64, xen: add xen_boot support into grup-mkconfig
@ 2017-05-05  8:52     ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-05  8:52 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: The development of GNU GRUB, arvidjaar, Vladimir Serbinenko,
	Linaro UEFI Mailman List, Ian Campbell, Julien Grall, xen-devel,
	Jon Masters, Leif Lindholm, Stefano Stabellini

Hi Daniel,

On 5 May 2017 at 00:00, Daniel Kiper <dkiper@net-space.pl> wrote:
> Hey,
>
> On Tue, May 02, 2017 at 03:06:24PM +0800, fu.wei@linaro.org wrote:
>> From: Fu Wei <fu.wei@linaro.org>
>>
>> This patchset add xen_boot support into grup-mkconfig for
>> generating xen boot entrances automatically
>>
>> Also update the docs/grub.texi for new xen_boot commands.
>
> Slowly recovering after long weekend in Poland.
> I will take a look at this probably next week.

OK, thanks, sorry for delay, I should post it long time ago.
Looking forward to your feedback!

>
> Daniel



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-03 20:53       ` [Xen-devel] " Stefano Stabellini
@ 2017-05-05  8:57         ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-05  8:57 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: The development of GNU GRUB, xen-devel, Jon Masters, arvidjaar,
	Andrew Cooper, Linaro UEFI Mailman List, Leif Lindholm,
	Julien Grall, Vladimir Serbinenko, Daniel Kiper

Hi Stefano,

On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org> wrote:
> On Wed, 3 May 2017, Andrew Cooper wrote:
>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>> > From: Fu Wei <fu.wei@linaro.org>
>> >
>> > This patch adds the support of xen_boot command for aarch64:
>> >     xen_hypervisor
>> >     xen_module
>> > These two commands are only for aarch64, since it has its own protocol and
>> > commands to boot xen hypervisor and Dom0, but not multiboot.
>> >
>> > For other architectures, they are still using multiboot and module
>> > commands.
>> >
>> > Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>
>> Sorry if I am jumping in late and asking awkward questions, but what is
>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>> mechanism?
>
> Multiboot is not available on ARM. The boot protocol we have on ARM is
> FDT based:
>
> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>
> We often refer to it as "multiboot for arm" but in fact it is not
> related to the x86 multiboot in any way.
>
> In Grub, the two protocols (multiboot and
> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
> (55A687E5.4070106@gmail.com). Hence, the need for this patch.

Exactly, great thanks for your explanation! :-)



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-05  8:57         ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-05  8:57 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Andrew Cooper, Daniel Kiper, The development of GNU GRUB,
	arvidjaar, Vladimir Serbinenko, xen-devel, Jon Masters,
	Leif Lindholm, Julien Grall, Linaro UEFI Mailman List

Hi Stefano,

On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org> wrote:
> On Wed, 3 May 2017, Andrew Cooper wrote:
>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>> > From: Fu Wei <fu.wei@linaro.org>
>> >
>> > This patch adds the support of xen_boot command for aarch64:
>> >     xen_hypervisor
>> >     xen_module
>> > These two commands are only for aarch64, since it has its own protocol and
>> > commands to boot xen hypervisor and Dom0, but not multiboot.
>> >
>> > For other architectures, they are still using multiboot and module
>> > commands.
>> >
>> > Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>
>> Sorry if I am jumping in late and asking awkward questions, but what is
>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>> mechanism?
>
> Multiboot is not available on ARM. The boot protocol we have on ARM is
> FDT based:
>
> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>
> We often refer to it as "multiboot for arm" but in fact it is not
> related to the x86 multiboot in any way.
>
> In Grub, the two protocols (multiboot and
> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
> (55A687E5.4070106@gmail.com). Hence, the need for this patch.

Exactly, great thanks for your explanation! :-)



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-05  8:57         ` Fu Wei
@ 2017-05-05  9:01           ` Andrew Cooper
  -1 siblings, 0 replies; 44+ messages in thread
From: Andrew Cooper @ 2017-05-05  9:01 UTC (permalink / raw)
  To: Fu Wei, Stefano Stabellini
  Cc: The development of GNU GRUB, xen-devel, arvidjaar, Jon Masters,
	Linaro UEFI Mailman List, Leif Lindholm, Julien Grall,
	Vladimir Serbinenko, Daniel Kiper

On 05/05/17 09:57, Fu Wei wrote:
> Hi Stefano,
>
> On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org> wrote:
>> On Wed, 3 May 2017, Andrew Cooper wrote:
>>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>>>> From: Fu Wei <fu.wei@linaro.org>
>>>>
>>>> This patch adds the support of xen_boot command for aarch64:
>>>>     xen_hypervisor
>>>>     xen_module
>>>> These two commands are only for aarch64, since it has its own protocol and
>>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>>
>>>> For other architectures, they are still using multiboot and module
>>>> commands.
>>>>
>>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>> Sorry if I am jumping in late and asking awkward questions, but what is
>>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>>> mechanism?
>> Multiboot is not available on ARM. The boot protocol we have on ARM is
>> FDT based:
>>
>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>>
>> We often refer to it as "multiboot for arm" but in fact it is not
>> related to the x86 multiboot in any way.
>>
>> In Grub, the two protocols (multiboot and
>> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
>> (55A687E5.4070106@gmail.com). Hence, the need for this patch.
> Exactly, great thanks for your explanation! :-)

So it really is an entirely custom Xen booting protocol.

It is unfortunate that this wasn't reviewed sensibly at the time (and
implemented in a project-neutral way), but it looks like the time to fix
that properly has long since passed.

~Andrew

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-05  9:01           ` Andrew Cooper
  0 siblings, 0 replies; 44+ messages in thread
From: Andrew Cooper @ 2017-05-05  9:01 UTC (permalink / raw)
  To: Fu Wei, Stefano Stabellini
  Cc: Daniel Kiper, The development of GNU GRUB, arvidjaar,
	Vladimir Serbinenko, xen-devel, Jon Masters, Leif Lindholm,
	Julien Grall, Linaro UEFI Mailman List

On 05/05/17 09:57, Fu Wei wrote:
> Hi Stefano,
>
> On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org> wrote:
>> On Wed, 3 May 2017, Andrew Cooper wrote:
>>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>>>> From: Fu Wei <fu.wei@linaro.org>
>>>>
>>>> This patch adds the support of xen_boot command for aarch64:
>>>>     xen_hypervisor
>>>>     xen_module
>>>> These two commands are only for aarch64, since it has its own protocol and
>>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>>
>>>> For other architectures, they are still using multiboot and module
>>>> commands.
>>>>
>>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>> Sorry if I am jumping in late and asking awkward questions, but what is
>>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>>> mechanism?
>> Multiboot is not available on ARM. The boot protocol we have on ARM is
>> FDT based:
>>
>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>>
>> We often refer to it as "multiboot for arm" but in fact it is not
>> related to the x86 multiboot in any way.
>>
>> In Grub, the two protocols (multiboot and
>> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
>> (55A687E5.4070106@gmail.com). Hence, the need for this patch.
> Exactly, great thanks for your explanation! :-)

So it really is an entirely custom Xen booting protocol.

It is unfortunate that this wasn't reviewed sensibly at the time (and
implemented in a project-neutral way), but it looks like the time to fix
that properly has long since passed.

~Andrew


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-05  9:01           ` Andrew Cooper
@ 2017-05-05  9:25             ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-05  9:25 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: The development of GNU GRUB, Stefano Stabellini, arvidjaar,
	Vladimir Serbinenko, Linaro UEFI Mailman List, Leif Lindholm,
	Julien Grall, xen-devel, Jon Masters, Daniel Kiper

Hi Andrew,

On 5 May 2017 at 17:01, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> On 05/05/17 09:57, Fu Wei wrote:
>> Hi Stefano,
>>
>> On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>> On Wed, 3 May 2017, Andrew Cooper wrote:
>>>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>>>>> From: Fu Wei <fu.wei@linaro.org>
>>>>>
>>>>> This patch adds the support of xen_boot command for aarch64:
>>>>>     xen_hypervisor
>>>>>     xen_module
>>>>> These two commands are only for aarch64, since it has its own protocol and
>>>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>>>
>>>>> For other architectures, they are still using multiboot and module
>>>>> commands.
>>>>>
>>>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>>> Sorry if I am jumping in late and asking awkward questions, but what is
>>>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>>>> mechanism?
>>> Multiboot is not available on ARM. The boot protocol we have on ARM is
>>> FDT based:
>>>
>>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>>>
>>> We often refer to it as "multiboot for arm" but in fact it is not
>>> related to the x86 multiboot in any way.
>>>
>>> In Grub, the two protocols (multiboot and
>>> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
>>> (55A687E5.4070106@gmail.com). Hence, the need for this patch.
>> Exactly, great thanks for your explanation! :-)
>
> So it really is an entirely custom Xen booting protocol.

Yes, it is.

>
> It is unfortunate that this wasn't reviewed sensibly at the time (and
> implemented in a project-neutral way), but it looks like the time to fix
> that properly has long since passed.

I guess the reason Xen use an entirely custom(lightweight) booting
protocol on aarch64 is that the multiboot maybe a little "heavy" for
aarch64.

>
> ~Andrew



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-05  9:25             ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-05  9:25 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Daniel Kiper, The development of GNU GRUB,
	arvidjaar, Vladimir Serbinenko, xen-devel, Jon Masters,
	Leif Lindholm, Julien Grall, Linaro UEFI Mailman List

Hi Andrew,

On 5 May 2017 at 17:01, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> On 05/05/17 09:57, Fu Wei wrote:
>> Hi Stefano,
>>
>> On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>> On Wed, 3 May 2017, Andrew Cooper wrote:
>>>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>>>>> From: Fu Wei <fu.wei@linaro.org>
>>>>>
>>>>> This patch adds the support of xen_boot command for aarch64:
>>>>>     xen_hypervisor
>>>>>     xen_module
>>>>> These two commands are only for aarch64, since it has its own protocol and
>>>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>>>
>>>>> For other architectures, they are still using multiboot and module
>>>>> commands.
>>>>>
>>>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>>> Sorry if I am jumping in late and asking awkward questions, but what is
>>>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>>>> mechanism?
>>> Multiboot is not available on ARM. The boot protocol we have on ARM is
>>> FDT based:
>>>
>>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>>>
>>> We often refer to it as "multiboot for arm" but in fact it is not
>>> related to the x86 multiboot in any way.
>>>
>>> In Grub, the two protocols (multiboot and
>>> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
>>> (55A687E5.4070106@gmail.com). Hence, the need for this patch.
>> Exactly, great thanks for your explanation! :-)
>
> So it really is an entirely custom Xen booting protocol.

Yes, it is.

>
> It is unfortunate that this wasn't reviewed sensibly at the time (and
> implemented in a project-neutral way), but it looks like the time to fix
> that properly has long since passed.

I guess the reason Xen use an entirely custom(lightweight) booting
protocol on aarch64 is that the multiboot maybe a little "heavy" for
aarch64.

>
> ~Andrew



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-05  9:01           ` Andrew Cooper
@ 2017-05-05 10:11             ` Julien Grall
  -1 siblings, 0 replies; 44+ messages in thread
From: Julien Grall @ 2017-05-05 10:11 UTC (permalink / raw)
  To: Andrew Cooper, Fu Wei, Stefano Stabellini
  Cc: The development of GNU GRUB, xen-devel, arvidjaar, Jon Masters,
	Linaro UEFI Mailman List, Leif Lindholm, Vladimir Serbinenko,
	Daniel Kiper

Hi Andrew,

On 05/05/17 10:01, Andrew Cooper wrote:
> On 05/05/17 09:57, Fu Wei wrote:
>> Hi Stefano,
>>
>> On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>> On Wed, 3 May 2017, Andrew Cooper wrote:
>>>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>>>>> From: Fu Wei <fu.wei@linaro.org>
>>>>>
>>>>> This patch adds the support of xen_boot command for aarch64:
>>>>>     xen_hypervisor
>>>>>     xen_module
>>>>> These two commands are only for aarch64, since it has its own protocol and
>>>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>>>
>>>>> For other architectures, they are still using multiboot and module
>>>>> commands.
>>>>>
>>>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>>> Sorry if I am jumping in late and asking awkward questions, but what is
>>>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>>>> mechanism?
>>> Multiboot is not available on ARM. The boot protocol we have on ARM is
>>> FDT based:
>>>
>>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>>>
>>> We often refer to it as "multiboot for arm" but in fact it is not
>>> related to the x86 multiboot in any way.
>>>
>>> In Grub, the two protocols (multiboot and
>>> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
>>> (55A687E5.4070106@gmail.com). Hence, the need for this patch.
>> Exactly, great thanks for your explanation! :-)
>
> So it really is an entirely custom Xen booting protocol.

Not really, Xen is using the Linux boot protocol. It does not allow to 
pass multiple modules. The multiboot used by x86 does not support ARM 
(see [1]) and hence not supported by any bootloaders existing on ARM.

The "multiboot for ARM" has been designed to be generic enough to be 
used by anyone (see [2]). And the original intention was to use "module" 
in grub.cfg. I don't know why we did this change.

>
> It is unfortunate that this wasn't reviewed sensibly at the time (and
> implemented in a project-neutral way), but it looks like the time to fix
> that properly has long since passed.

The bindings are project neutral. Only the commands in grub are not 
neutral, I cannot find why it is not.

Cheers,

[1] https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
[2] 
https://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-05 10:11             ` Julien Grall
  0 siblings, 0 replies; 44+ messages in thread
From: Julien Grall @ 2017-05-05 10:11 UTC (permalink / raw)
  To: Andrew Cooper, Fu Wei, Stefano Stabellini
  Cc: Daniel Kiper, The development of GNU GRUB, arvidjaar,
	Vladimir Serbinenko, xen-devel, Jon Masters, Leif Lindholm,
	Linaro UEFI Mailman List

Hi Andrew,

On 05/05/17 10:01, Andrew Cooper wrote:
> On 05/05/17 09:57, Fu Wei wrote:
>> Hi Stefano,
>>
>> On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>> On Wed, 3 May 2017, Andrew Cooper wrote:
>>>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>>>>> From: Fu Wei <fu.wei@linaro.org>
>>>>>
>>>>> This patch adds the support of xen_boot command for aarch64:
>>>>>     xen_hypervisor
>>>>>     xen_module
>>>>> These two commands are only for aarch64, since it has its own protocol and
>>>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>>>
>>>>> For other architectures, they are still using multiboot and module
>>>>> commands.
>>>>>
>>>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>>> Sorry if I am jumping in late and asking awkward questions, but what is
>>>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>>>> mechanism?
>>> Multiboot is not available on ARM. The boot protocol we have on ARM is
>>> FDT based:
>>>
>>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>>>
>>> We often refer to it as "multiboot for arm" but in fact it is not
>>> related to the x86 multiboot in any way.
>>>
>>> In Grub, the two protocols (multiboot and
>>> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
>>> (55A687E5.4070106@gmail.com). Hence, the need for this patch.
>> Exactly, great thanks for your explanation! :-)
>
> So it really is an entirely custom Xen booting protocol.

Not really, Xen is using the Linux boot protocol. It does not allow to 
pass multiple modules. The multiboot used by x86 does not support ARM 
(see [1]) and hence not supported by any bootloaders existing on ARM.

The "multiboot for ARM" has been designed to be generic enough to be 
used by anyone (see [2]). And the original intention was to use "module" 
in grub.cfg. I don't know why we did this change.

>
> It is unfortunate that this wasn't reviewed sensibly at the time (and
> implemented in a project-neutral way), but it looks like the time to fix
> that properly has long since passed.

The bindings are project neutral. Only the commands in grub are not 
neutral, I cannot find why it is not.

Cheers,

[1] https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
[2] 
https://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot

-- 
Julien Grall


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-05 10:11             ` Julien Grall
@ 2017-05-05 10:41               ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-05 10:41 UTC (permalink / raw)
  To: Julien Grall
  Cc: The development of GNU GRUB, Stefano Stabellini, Jon Masters,
	arvidjaar, Andrew Cooper, Linaro UEFI Mailman List,
	Leif Lindholm, xen-devel, Vladimir Serbinenko, Daniel Kiper

Hi Julien,

On 5 May 2017 at 18:11, Julien Grall <julien.grall@arm.com> wrote:
> Hi Andrew,
>
>
> On 05/05/17 10:01, Andrew Cooper wrote:
>>
>> On 05/05/17 09:57, Fu Wei wrote:
>>>
>>> Hi Stefano,
>>>
>>> On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org>
>>> wrote:
>>>>
>>>> On Wed, 3 May 2017, Andrew Cooper wrote:
>>>>>
>>>>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>>>>>>
>>>>>> From: Fu Wei <fu.wei@linaro.org>
>>>>>>
>>>>>> This patch adds the support of xen_boot command for aarch64:
>>>>>>     xen_hypervisor
>>>>>>     xen_module
>>>>>> These two commands are only for aarch64, since it has its own protocol
>>>>>> and
>>>>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>>>>
>>>>>> For other architectures, they are still using multiboot and module
>>>>>> commands.
>>>>>>
>>>>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>>>>
>>>>> Sorry if I am jumping in late and asking awkward questions, but what is
>>>>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>>>>> mechanism?
>>>>
>>>> Multiboot is not available on ARM. The boot protocol we have on ARM is
>>>> FDT based:
>>>>
>>>>
>>>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>>>>
>>>> We often refer to it as "multiboot for arm" but in fact it is not
>>>> related to the x86 multiboot in any way.
>>>>
>>>> In Grub, the two protocols (multiboot and
>>>> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
>>>> (55A687E5.4070106@gmail.com). Hence, the need for this patch.
>>>
>>> Exactly, great thanks for your explanation! :-)
>>
>>
>> So it really is an entirely custom Xen booting protocol.
>
>
> Not really, Xen is using the Linux boot protocol. It does not allow to pass
> multiple modules. The multiboot used by x86 does not support ARM (see [1])
> and hence not supported by any bootloaders existing on ARM.
>
> The "multiboot for ARM" has been designed to be generic enough to be used by
> anyone (see [2]). And the original intention was to use "module" in
> grub.cfg. I don't know why we did this change.

yes, in the early patchset, I used multiboot and module command name,
But since the protocol we are using is not a real multiboot, so I
followed the suggestion (using xen_hypervisor and xen_module) to do
this change.

We don't want to confuse people. "module" is a command in the real
multiboot module.
if we don't use the real multiboot protocol, we avoid re-using its commands.

>
>>
>> It is unfortunate that this wasn't reviewed sensibly at the time (and
>> implemented in a project-neutral way), but it looks like the time to fix
>> that properly has long since passed.
>
>
> The bindings are project neutral. Only the commands in grub are not neutral,
> I cannot find why it is not.
>
> Cheers,
>
> [1] https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
> [2]
> https://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot
>
> --
> Julien Grall



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [Xen-devel] [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-05 10:41               ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-05 10:41 UTC (permalink / raw)
  To: Julien Grall
  Cc: Andrew Cooper, Stefano Stabellini, Daniel Kiper,
	The development of GNU GRUB, arvidjaar, Vladimir Serbinenko,
	xen-devel, Jon Masters, Leif Lindholm, Linaro UEFI Mailman List

Hi Julien,

On 5 May 2017 at 18:11, Julien Grall <julien.grall@arm.com> wrote:
> Hi Andrew,
>
>
> On 05/05/17 10:01, Andrew Cooper wrote:
>>
>> On 05/05/17 09:57, Fu Wei wrote:
>>>
>>> Hi Stefano,
>>>
>>> On 4 May 2017 at 04:53, Stefano Stabellini <sstabellini@kernel.org>
>>> wrote:
>>>>
>>>> On Wed, 3 May 2017, Andrew Cooper wrote:
>>>>>
>>>>> On 02/05/17 08:06, fu.wei@linaro.org wrote:
>>>>>>
>>>>>> From: Fu Wei <fu.wei@linaro.org>
>>>>>>
>>>>>> This patch adds the support of xen_boot command for aarch64:
>>>>>>     xen_hypervisor
>>>>>>     xen_module
>>>>>> These two commands are only for aarch64, since it has its own protocol
>>>>>> and
>>>>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>>>>
>>>>>> For other architectures, they are still using multiboot and module
>>>>>> commands.
>>>>>>
>>>>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>>>>
>>>>> Sorry if I am jumping in late and asking awkward questions, but what is
>>>>> special about Xen/aarch64 here?  Why is it using a non-standard entry
>>>>> mechanism?
>>>>
>>>> Multiboot is not available on ARM. The boot protocol we have on ARM is
>>>> FDT based:
>>>>
>>>>
>>>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt
>>>>
>>>> We often refer to it as "multiboot for arm" but in fact it is not
>>>> related to the x86 multiboot in any way.
>>>>
>>>> In Grub, the two protocols (multiboot and
>>>> docs/misc/arm/device-tree/booting.txt) are kept clearly distinct
>>>> (55A687E5.4070106@gmail.com). Hence, the need for this patch.
>>>
>>> Exactly, great thanks for your explanation! :-)
>>
>>
>> So it really is an entirely custom Xen booting protocol.
>
>
> Not really, Xen is using the Linux boot protocol. It does not allow to pass
> multiple modules. The multiboot used by x86 does not support ARM (see [1])
> and hence not supported by any bootloaders existing on ARM.
>
> The "multiboot for ARM" has been designed to be generic enough to be used by
> anyone (see [2]). And the original intention was to use "module" in
> grub.cfg. I don't know why we did this change.

yes, in the early patchset, I used multiboot and module command name,
But since the protocol we are using is not a real multiboot, so I
followed the suggestion (using xen_hypervisor and xen_module) to do
this change.

We don't want to confuse people. "module" is a command in the real
multiboot module.
if we don't use the real multiboot protocol, we avoid re-using its commands.

>
>>
>> It is unfortunate that this wasn't reviewed sensibly at the time (and
>> implemented in a project-neutral way), but it looks like the time to fix
>> that properly has long since passed.
>
>
> The bindings are project neutral. Only the commands in grub are not neutral,
> I cannot find why it is not.
>
> Cheers,
>
> [1] https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
> [2]
> https://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot
>
> --
> Julien Grall



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command
  2017-05-02  7:06   ` fu.wei
@ 2017-05-09  6:56     ` Vladimir 'phcoder' Serbinenko
  -1 siblings, 0 replies; 44+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-05-09  6:56 UTC (permalink / raw)
  To: fu.wei, dkiper, grub-devel, arvidjaar
  Cc: xen-devel, Ian.Campbell, jcm, leif.lindholm, julien.grall,
	sstabellini, linaro-uefi


[-- Attachment #1.1: Type: text/plain, Size: 1833 bytes --]

Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :

> From: Fu Wei <fu.wei@linaro.org>
>
> This patch adds "--nounzip" option support in order to
> be compatible with the module command of multiboot on other architecture,
> by this way we can simplify grub-mkconfig support code.
>
> This patch also allow us to use zip compressed module(like Linux kernel
> "vmlinuz*" for Dom0).
>
> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> ---
>  grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/grub-core/loader/arm64/xen_boot.c
> b/grub-core/loader/arm64/xen_boot.c
> index a914eb8..0878364 100644
> --- a/grub-core/loader/arm64/xen_boot.c
> +++ b/grub-core/loader/arm64/xen_boot.c
> @@ -20,6 +20,7 @@
>  #include <grub/charset.h>
>  #include <grub/command.h>
>  #include <grub/err.h>
> +#include <grub/env.h>
>
This looks like spurious hunk.

>  #include <grub/file.h>
>  #include <grub/fdt.h>
>  #include <grub/list.h>
> @@ -379,6 +380,20 @@ grub_cmd_xen_module (grub_command_t cmd
> __attribute__((unused)),
>
>    struct xen_boot_binary *module = NULL;
>    grub_file_t file = 0;
> +  int nounzip = 0;
> +
> +  if (!argc)
> +    {
> +      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
> +      goto fail;
> +    }
> +
> +  if (grub_strcmp (argv[0], "--nounzip") == 0)
> +    {
> +      argv++;
> +      argc--;
> +      nounzip = 1;
> +    }
>
>    if (!argc)
>      {
> @@ -403,6 +418,8 @@ grub_cmd_xen_module (grub_command_t cmd
> __attribute__((unused)),
>
>    grub_dprintf ("xen_loader", "Init module and node info\n");
>
> +  if (nounzip)
> +    grub_file_filter_disable_compression ();
>    file = grub_file_open (argv[0]);
>    if (!file)
>      goto fail;
> --
> 2.9.3
>
>

[-- Attachment #1.2: Type: text/html, Size: 2594 bytes --]

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command
@ 2017-05-09  6:56     ` Vladimir 'phcoder' Serbinenko
  0 siblings, 0 replies; 44+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-05-09  6:56 UTC (permalink / raw)
  To: fu.wei, dkiper, grub-devel, arvidjaar
  Cc: linaro-uefi, Ian.Campbell, julien.grall, xen-devel, jcm,
	leif.lindholm, sstabellini

[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]

Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :

> From: Fu Wei <fu.wei@linaro.org>
>
> This patch adds "--nounzip" option support in order to
> be compatible with the module command of multiboot on other architecture,
> by this way we can simplify grub-mkconfig support code.
>
> This patch also allow us to use zip compressed module(like Linux kernel
> "vmlinuz*" for Dom0).
>
> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> ---
>  grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/grub-core/loader/arm64/xen_boot.c
> b/grub-core/loader/arm64/xen_boot.c
> index a914eb8..0878364 100644
> --- a/grub-core/loader/arm64/xen_boot.c
> +++ b/grub-core/loader/arm64/xen_boot.c
> @@ -20,6 +20,7 @@
>  #include <grub/charset.h>
>  #include <grub/command.h>
>  #include <grub/err.h>
> +#include <grub/env.h>
>
This looks like spurious hunk.

>  #include <grub/file.h>
>  #include <grub/fdt.h>
>  #include <grub/list.h>
> @@ -379,6 +380,20 @@ grub_cmd_xen_module (grub_command_t cmd
> __attribute__((unused)),
>
>    struct xen_boot_binary *module = NULL;
>    grub_file_t file = 0;
> +  int nounzip = 0;
> +
> +  if (!argc)
> +    {
> +      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
> +      goto fail;
> +    }
> +
> +  if (grub_strcmp (argv[0], "--nounzip") == 0)
> +    {
> +      argv++;
> +      argc--;
> +      nounzip = 1;
> +    }
>
>    if (!argc)
>      {
> @@ -403,6 +418,8 @@ grub_cmd_xen_module (grub_command_t cmd
> __attribute__((unused)),
>
>    grub_dprintf ("xen_loader", "Init module and node info\n");
>
> +  if (nounzip)
> +    grub_file_filter_disable_compression ();
>    file = grub_file_open (argv[0]);
>    if (!file)
>      goto fail;
> --
> 2.9.3
>
>

[-- Attachment #2: Type: text/html, Size: 2594 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-02  7:06   ` fu.wei
@ 2017-05-09  6:59     ` Vladimir 'phcoder' Serbinenko
  -1 siblings, 0 replies; 44+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-05-09  6:59 UTC (permalink / raw)
  To: fu.wei, dkiper, grub-devel, arvidjaar
  Cc: xen-devel, Ian.Campbell, jcm, leif.lindholm, julien.grall,
	sstabellini, linaro-uefi


[-- Attachment #1.1: Type: text/plain, Size: 2835 bytes --]

Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :

> From: Fu Wei <fu.wei@linaro.org>
>
> This patch adds the support of xen_boot command for aarch64:
>     xen_hypervisor
>     xen_module
> These two commands are only for aarch64, since it has its own protocol and
> commands to boot xen hypervisor and Dom0, but not multiboot.
>
> For other architectures, they are still using multiboot and module
> commands.
>
> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> ---
>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
> index c48af94..9777719 100644
> --- a/util/grub.d/20_linux_xen.in
> +++ b/util/grub.d/20_linux_xen.in
> @@ -122,16 +122,16 @@ linux_entry ()
>          else
>              xen_rm_opts="no-real-mode edd=off"
>          fi
> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
> ${xen_args} \${xen_rm_opts}
> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
> ${xen_args} \${xen_rm_opts}
>         echo    '$(echo "$lmessage" | grub_quote)'
> -       module  ${rel_dirname}/${basename} placeholder
> root=${linux_root_device_thisversion} ro ${args}
> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
> root=${linux_root_device_thisversion} ro ${args}
>  EOF
>    if test -n "${initrd}" ; then
>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>      message="$(gettext_printf "Loading initial ramdisk ...")"
>      sed "s/^/$submenu_indentation/" << EOF
>         echo    '$(echo "$message" | grub_quote)'
> -       module  --nounzip   ${rel_dirname}/${initrd}
> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>  EOF
>    fi
>    sed "s/^/$submenu_indentation/" << EOF
> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>      if [ "x$is_top_level" != xtrue ]; then
>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
> "${xen_version}" | grub_quote)' \$menuentry_id_option
> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>      fi
> +    if [ "x$machine" != xaarch64 ]; then
>
Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
chroot or of having 32-bit userspace with 64-bit kernel. Better to do this
on runtime. I know, it's not very nice but the whole grub-mkconfig is
trouble that needs redesign that I'm working on.

> +       xen_loader="multiboot"
> +       module_loader="module"
> +    else
> +       xen_loader="xen_hypervisor"
> +       module_loader="xen_module"
> +    fi
>      while [ "x$list" != "x" ] ; do
>         linux=`version_find_latest $list`
>         gettext_printf "Found linux image: %s\n" "$linux" >&2
> --
> 2.9.3
>
>

[-- Attachment #1.2: Type: text/html, Size: 4204 bytes --]

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-09  6:59     ` Vladimir 'phcoder' Serbinenko
  0 siblings, 0 replies; 44+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-05-09  6:59 UTC (permalink / raw)
  To: fu.wei, dkiper, grub-devel, arvidjaar
  Cc: linaro-uefi, Ian.Campbell, julien.grall, xen-devel, jcm,
	leif.lindholm, sstabellini

[-- Attachment #1: Type: text/plain, Size: 2835 bytes --]

Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :

> From: Fu Wei <fu.wei@linaro.org>
>
> This patch adds the support of xen_boot command for aarch64:
>     xen_hypervisor
>     xen_module
> These two commands are only for aarch64, since it has its own protocol and
> commands to boot xen hypervisor and Dom0, but not multiboot.
>
> For other architectures, they are still using multiboot and module
> commands.
>
> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> ---
>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
> index c48af94..9777719 100644
> --- a/util/grub.d/20_linux_xen.in
> +++ b/util/grub.d/20_linux_xen.in
> @@ -122,16 +122,16 @@ linux_entry ()
>          else
>              xen_rm_opts="no-real-mode edd=off"
>          fi
> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
> ${xen_args} \${xen_rm_opts}
> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
> ${xen_args} \${xen_rm_opts}
>         echo    '$(echo "$lmessage" | grub_quote)'
> -       module  ${rel_dirname}/${basename} placeholder
> root=${linux_root_device_thisversion} ro ${args}
> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
> root=${linux_root_device_thisversion} ro ${args}
>  EOF
>    if test -n "${initrd}" ; then
>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>      message="$(gettext_printf "Loading initial ramdisk ...")"
>      sed "s/^/$submenu_indentation/" << EOF
>         echo    '$(echo "$message" | grub_quote)'
> -       module  --nounzip   ${rel_dirname}/${initrd}
> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>  EOF
>    fi
>    sed "s/^/$submenu_indentation/" << EOF
> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>      if [ "x$is_top_level" != xtrue ]; then
>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
> "${xen_version}" | grub_quote)' \$menuentry_id_option
> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>      fi
> +    if [ "x$machine" != xaarch64 ]; then
>
Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
chroot or of having 32-bit userspace with 64-bit kernel. Better to do this
on runtime. I know, it's not very nice but the whole grub-mkconfig is
trouble that needs redesign that I'm working on.

> +       xen_loader="multiboot"
> +       module_loader="module"
> +    else
> +       xen_loader="xen_hypervisor"
> +       module_loader="xen_module"
> +    fi
>      while [ "x$list" != "x" ] ; do
>         linux=`version_find_latest $list`
>         gettext_printf "Found linux image: %s\n" "$linux" >&2
> --
> 2.9.3
>
>

[-- Attachment #2: Type: text/html, Size: 4204 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command
  2017-05-09  6:56     ` Vladimir 'phcoder' Serbinenko
@ 2017-05-09  8:42       ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-09  8:42 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: The development of GNU GRUB, xen-devel, Ian Campbell, arvidjaar,
	Jon Masters, Leif Lindholm, Julien Grall, Stefano Stabellini,
	Linaro UEFI Mailman List, Daniel Kiper

Hi Vladimir,

On 9 May 2017 at 14:56, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> wrote:
>
>
> Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>>
>> From: Fu Wei <fu.wei@linaro.org>
>>
>> This patch adds "--nounzip" option support in order to
>> be compatible with the module command of multiboot on other architecture,
>> by this way we can simplify grub-mkconfig support code.
>>
>> This patch also allow us to use zip compressed module(like Linux kernel
>> "vmlinuz*" for Dom0).
>>
>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> ---
>>  grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/grub-core/loader/arm64/xen_boot.c
>> b/grub-core/loader/arm64/xen_boot.c
>> index a914eb8..0878364 100644
>> --- a/grub-core/loader/arm64/xen_boot.c
>> +++ b/grub-core/loader/arm64/xen_boot.c
>> @@ -20,6 +20,7 @@
>>  #include <grub/charset.h>
>>  #include <grub/command.h>
>>  #include <grub/err.h>
>> +#include <grub/env.h>
>
> This looks like spurious hunk.

Yes, we don't need this headfile to build xen_boot.
will delete it
Thanks,

>>
>>  #include <grub/file.h>
>>  #include <grub/fdt.h>
>>  #include <grub/list.h>
>> @@ -379,6 +380,20 @@ grub_cmd_xen_module (grub_command_t cmd
>> __attribute__((unused)),
>>
>>    struct xen_boot_binary *module = NULL;
>>    grub_file_t file = 0;
>> +  int nounzip = 0;
>> +
>> +  if (!argc)
>> +    {
>> +      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
>> +      goto fail;
>> +    }
>> +
>> +  if (grub_strcmp (argv[0], "--nounzip") == 0)
>> +    {
>> +      argv++;
>> +      argc--;
>> +      nounzip = 1;
>> +    }
>>
>>    if (!argc)
>>      {
>> @@ -403,6 +418,8 @@ grub_cmd_xen_module (grub_command_t cmd
>> __attribute__((unused)),
>>
>>    grub_dprintf ("xen_loader", "Init module and node info\n");
>>
>> +  if (nounzip)
>> +    grub_file_filter_disable_compression ();
>>    file = grub_file_open (argv[0]);
>>    if (!file)
>>      goto fail;
>> --
>> 2.9.3
>>
>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command
@ 2017-05-09  8:42       ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-09  8:42 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: Daniel Kiper, The development of GNU GRUB, arvidjaar,
	Linaro UEFI Mailman List, Ian Campbell, Julien Grall, xen-devel,
	Jon Masters, Leif Lindholm, Stefano Stabellini

Hi Vladimir,

On 9 May 2017 at 14:56, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> wrote:
>
>
> Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>>
>> From: Fu Wei <fu.wei@linaro.org>
>>
>> This patch adds "--nounzip" option support in order to
>> be compatible with the module command of multiboot on other architecture,
>> by this way we can simplify grub-mkconfig support code.
>>
>> This patch also allow us to use zip compressed module(like Linux kernel
>> "vmlinuz*" for Dom0).
>>
>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> ---
>>  grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/grub-core/loader/arm64/xen_boot.c
>> b/grub-core/loader/arm64/xen_boot.c
>> index a914eb8..0878364 100644
>> --- a/grub-core/loader/arm64/xen_boot.c
>> +++ b/grub-core/loader/arm64/xen_boot.c
>> @@ -20,6 +20,7 @@
>>  #include <grub/charset.h>
>>  #include <grub/command.h>
>>  #include <grub/err.h>
>> +#include <grub/env.h>
>
> This looks like spurious hunk.

Yes, we don't need this headfile to build xen_boot.
will delete it
Thanks,

>>
>>  #include <grub/file.h>
>>  #include <grub/fdt.h>
>>  #include <grub/list.h>
>> @@ -379,6 +380,20 @@ grub_cmd_xen_module (grub_command_t cmd
>> __attribute__((unused)),
>>
>>    struct xen_boot_binary *module = NULL;
>>    grub_file_t file = 0;
>> +  int nounzip = 0;
>> +
>> +  if (!argc)
>> +    {
>> +      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
>> +      goto fail;
>> +    }
>> +
>> +  if (grub_strcmp (argv[0], "--nounzip") == 0)
>> +    {
>> +      argv++;
>> +      argc--;
>> +      nounzip = 1;
>> +    }
>>
>>    if (!argc)
>>      {
>> @@ -403,6 +418,8 @@ grub_cmd_xen_module (grub_command_t cmd
>> __attribute__((unused)),
>>
>>    grub_dprintf ("xen_loader", "Init module and node info\n");
>>
>> +  if (nounzip)
>> +    grub_file_filter_disable_compression ();
>>    file = grub_file_open (argv[0]);
>>    if (!file)
>>      goto fail;
>> --
>> 2.9.3
>>
>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-09  6:59     ` Vladimir 'phcoder' Serbinenko
@ 2017-05-09  9:02       ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-09  9:02 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: The development of GNU GRUB, xen-devel, arvidjaar, Jon Masters,
	ian.campbell, Leif Lindholm, Julien Grall, Stefano Stabellini,
	Linaro UEFI Mailman List, Daniel Kiper

Hi Vladimir

On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> wrote:
>
>
> Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>>
>> From: Fu Wei <fu.wei@linaro.org>
>>
>> This patch adds the support of xen_boot command for aarch64:
>>     xen_hypervisor
>>     xen_module
>> These two commands are only for aarch64, since it has its own protocol and
>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>
>> For other architectures, they are still using multiboot and module
>> commands.
>>
>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> ---
>>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>>  1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
>> index c48af94..9777719 100644
>> --- a/util/grub.d/20_linux_xen.in
>> +++ b/util/grub.d/20_linux_xen.in
>> @@ -122,16 +122,16 @@ linux_entry ()
>>          else
>>              xen_rm_opts="no-real-mode edd=off"
>>          fi
>> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
>> ${xen_args} \${xen_rm_opts}
>> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
>> ${xen_args} \${xen_rm_opts}
>>         echo    '$(echo "$lmessage" | grub_quote)'
>> -       module  ${rel_dirname}/${basename} placeholder
>> root=${linux_root_device_thisversion} ro ${args}
>> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
>> root=${linux_root_device_thisversion} ro ${args}
>>  EOF
>>    if test -n "${initrd}" ; then
>>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>>      message="$(gettext_printf "Loading initial ramdisk ...")"
>>      sed "s/^/$submenu_indentation/" << EOF
>>         echo    '$(echo "$message" | grub_quote)'
>> -       module  --nounzip   ${rel_dirname}/${initrd}
>> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>>  EOF
>>    fi
>>    sed "s/^/$submenu_indentation/" << EOF
>> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>>      if [ "x$is_top_level" != xtrue ]; then
>>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
>> "${xen_version}" | grub_quote)' \$menuentry_id_option
>> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>>      fi
>> +    if [ "x$machine" != xaarch64 ]; then
>
> Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
> chroot or of having 32-bit userspace with 64-bit kernel. Better to do this
> on runtime. I know, it's not very nice but the whole grub-mkconfig is
> trouble that needs redesign that I'm working on.

So if we need to do this at run time(in grub shell), can I use
"grub_cpu" variable instead?

Thanks!

>>
>> +       xen_loader="multiboot"
>> +       module_loader="module"
>> +    else
>> +       xen_loader="xen_hypervisor"
>> +       module_loader="xen_module"
>> +    fi
>>      while [ "x$list" != "x" ] ; do
>>         linux=`version_find_latest $list`
>>         gettext_printf "Found linux image: %s\n" "$linux" >&2
>> --
>> 2.9.3
>>
>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-09  9:02       ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-09  9:02 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: Daniel Kiper, The development of GNU GRUB, arvidjaar,
	Linaro UEFI Mailman List, Julien Grall, xen-devel, Jon Masters,
	Leif Lindholm, Stefano Stabellini, ian.campbell

Hi Vladimir

On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> wrote:
>
>
> Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>>
>> From: Fu Wei <fu.wei@linaro.org>
>>
>> This patch adds the support of xen_boot command for aarch64:
>>     xen_hypervisor
>>     xen_module
>> These two commands are only for aarch64, since it has its own protocol and
>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>
>> For other architectures, they are still using multiboot and module
>> commands.
>>
>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> ---
>>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>>  1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
>> index c48af94..9777719 100644
>> --- a/util/grub.d/20_linux_xen.in
>> +++ b/util/grub.d/20_linux_xen.in
>> @@ -122,16 +122,16 @@ linux_entry ()
>>          else
>>              xen_rm_opts="no-real-mode edd=off"
>>          fi
>> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
>> ${xen_args} \${xen_rm_opts}
>> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
>> ${xen_args} \${xen_rm_opts}
>>         echo    '$(echo "$lmessage" | grub_quote)'
>> -       module  ${rel_dirname}/${basename} placeholder
>> root=${linux_root_device_thisversion} ro ${args}
>> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
>> root=${linux_root_device_thisversion} ro ${args}
>>  EOF
>>    if test -n "${initrd}" ; then
>>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>>      message="$(gettext_printf "Loading initial ramdisk ...")"
>>      sed "s/^/$submenu_indentation/" << EOF
>>         echo    '$(echo "$message" | grub_quote)'
>> -       module  --nounzip   ${rel_dirname}/${initrd}
>> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>>  EOF
>>    fi
>>    sed "s/^/$submenu_indentation/" << EOF
>> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>>      if [ "x$is_top_level" != xtrue ]; then
>>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
>> "${xen_version}" | grub_quote)' \$menuentry_id_option
>> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>>      fi
>> +    if [ "x$machine" != xaarch64 ]; then
>
> Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
> chroot or of having 32-bit userspace with 64-bit kernel. Better to do this
> on runtime. I know, it's not very nice but the whole grub-mkconfig is
> trouble that needs redesign that I'm working on.

So if we need to do this at run time(in grub shell), can I use
"grub_cpu" variable instead?

Thanks!

>>
>> +       xen_loader="multiboot"
>> +       module_loader="module"
>> +    else
>> +       xen_loader="xen_hypervisor"
>> +       module_loader="xen_module"
>> +    fi
>>      while [ "x$list" != "x" ] ; do
>>         linux=`version_find_latest $list`
>>         gettext_printf "Found linux image: %s\n" "$linux" >&2
>> --
>> 2.9.3
>>
>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-09  9:02       ` Fu Wei
@ 2017-05-09  9:39         ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-09  9:39 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: The development of GNU GRUB, xen-devel, arvidjaar, Jon Masters,
	ian.campbell, Leif Lindholm, Julien Grall, Stefano Stabellini,
	Linaro UEFI Mailman List, Daniel Kiper

Hi Vladimir

On 9 May 2017 at 17:02, Fu Wei <fu.wei@linaro.org> wrote:
> Hi Vladimir
>
> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> wrote:
>>
>>
>> Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>>>
>>> From: Fu Wei <fu.wei@linaro.org>
>>>
>>> This patch adds the support of xen_boot command for aarch64:
>>>     xen_hypervisor
>>>     xen_module
>>> These two commands are only for aarch64, since it has its own protocol and
>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>
>>> For other architectures, they are still using multiboot and module
>>> commands.
>>>
>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>> ---
>>>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>>>  1 file changed, 10 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
>>> index c48af94..9777719 100644
>>> --- a/util/grub.d/20_linux_xen.in
>>> +++ b/util/grub.d/20_linux_xen.in
>>> @@ -122,16 +122,16 @@ linux_entry ()
>>>          else
>>>              xen_rm_opts="no-real-mode edd=off"
>>>          fi
>>> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
>>> ${xen_args} \${xen_rm_opts}
>>> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
>>> ${xen_args} \${xen_rm_opts}
>>>         echo    '$(echo "$lmessage" | grub_quote)'
>>> -       module  ${rel_dirname}/${basename} placeholder
>>> root=${linux_root_device_thisversion} ro ${args}
>>> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
>>> root=${linux_root_device_thisversion} ro ${args}
>>>  EOF
>>>    if test -n "${initrd}" ; then
>>>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>>>      message="$(gettext_printf "Loading initial ramdisk ...")"
>>>      sed "s/^/$submenu_indentation/" << EOF
>>>         echo    '$(echo "$message" | grub_quote)'
>>> -       module  --nounzip   ${rel_dirname}/${initrd}
>>> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>>>  EOF
>>>    fi
>>>    sed "s/^/$submenu_indentation/" << EOF
>>> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>>>      if [ "x$is_top_level" != xtrue ]; then
>>>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
>>> "${xen_version}" | grub_quote)' \$menuentry_id_option
>>> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>>>      fi
>>> +    if [ "x$machine" != xaarch64 ]; then
>>
>> Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
>> chroot or of having 32-bit userspace with 64-bit kernel. Better to do this
>> on runtime. I know, it's not very nice but the whole grub-mkconfig is
>> trouble that needs redesign that I'm working on.
>
> So if we need to do this at run time(in grub shell), can I use
> "grub_cpu" variable instead?

Dose this patch make sense to you?

diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index c48af94..0c26cbb 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -122,16 +122,23 @@ linux_entry ()
         else
             xen_rm_opts="no-real-mode edd=off"
         fi
-       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
${xen_args} \${xen_rm_opts}
+        if [ "x\$grub_cpu" != xarm64 ]; then
+            xen_loader="multiboot"
+            module_loader="module"
+        else
+            xen_loader="xen_hypervisor"
+            module_loader="xen_module"
+        fi
+        \${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder
${xen_args} \${xen_rm_opts}
        echo    '$(echo "$lmessage" | grub_quote)'
-       module  ${rel_dirname}/${basename} placeholder
root=${linux_root_device_thisversion} ro ${args}
+        \${module_loader}      ${rel_dirname}/${basename} placeholder
root=${linux_root_device_thisversion} ro ${args}
 EOF
   if test -n "${initrd}" ; then
     # TRANSLATORS: ramdisk isn't identifier. Should be translated.
     message="$(gettext_printf "Loading initial ramdisk ...")"
     sed "s/^/$submenu_indentation/" << EOF
        echo    '$(echo "$message" | grub_quote)'
-       module  --nounzip   ${rel_dirname}/${initrd}
+        \${module_loader} --nounzip    ${rel_dirname}/${initrd}
 EOF
   fi
   sed "s/^/$submenu_indentation/" << EOF


>
> Thanks!
>
>>>
>>> +       xen_loader="multiboot"
>>> +       module_loader="module"
>>> +    else
>>> +       xen_loader="xen_hypervisor"
>>> +       module_loader="xen_module"
>>> +    fi
>>>      while [ "x$list" != "x" ] ; do
>>>         linux=`version_find_latest $list`
>>>         gettext_printf "Found linux image: %s\n" "$linux" >&2
>>> --
>>> 2.9.3
>>>
>>
>
>
>
> --
> Best regards,
>
> Fu Wei
> Software Engineer
> Red Hat



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-09  9:39         ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-09  9:39 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: Daniel Kiper, The development of GNU GRUB, arvidjaar,
	Linaro UEFI Mailman List, Julien Grall, xen-devel, Jon Masters,
	Leif Lindholm, Stefano Stabellini, ian.campbell

Hi Vladimir

On 9 May 2017 at 17:02, Fu Wei <fu.wei@linaro.org> wrote:
> Hi Vladimir
>
> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> wrote:
>>
>>
>> Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>>>
>>> From: Fu Wei <fu.wei@linaro.org>
>>>
>>> This patch adds the support of xen_boot command for aarch64:
>>>     xen_hypervisor
>>>     xen_module
>>> These two commands are only for aarch64, since it has its own protocol and
>>> commands to boot xen hypervisor and Dom0, but not multiboot.
>>>
>>> For other architectures, they are still using multiboot and module
>>> commands.
>>>
>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>> ---
>>>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>>>  1 file changed, 10 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
>>> index c48af94..9777719 100644
>>> --- a/util/grub.d/20_linux_xen.in
>>> +++ b/util/grub.d/20_linux_xen.in
>>> @@ -122,16 +122,16 @@ linux_entry ()
>>>          else
>>>              xen_rm_opts="no-real-mode edd=off"
>>>          fi
>>> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
>>> ${xen_args} \${xen_rm_opts}
>>> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
>>> ${xen_args} \${xen_rm_opts}
>>>         echo    '$(echo "$lmessage" | grub_quote)'
>>> -       module  ${rel_dirname}/${basename} placeholder
>>> root=${linux_root_device_thisversion} ro ${args}
>>> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
>>> root=${linux_root_device_thisversion} ro ${args}
>>>  EOF
>>>    if test -n "${initrd}" ; then
>>>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>>>      message="$(gettext_printf "Loading initial ramdisk ...")"
>>>      sed "s/^/$submenu_indentation/" << EOF
>>>         echo    '$(echo "$message" | grub_quote)'
>>> -       module  --nounzip   ${rel_dirname}/${initrd}
>>> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>>>  EOF
>>>    fi
>>>    sed "s/^/$submenu_indentation/" << EOF
>>> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>>>      if [ "x$is_top_level" != xtrue ]; then
>>>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
>>> "${xen_version}" | grub_quote)' \$menuentry_id_option
>>> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>>>      fi
>>> +    if [ "x$machine" != xaarch64 ]; then
>>
>> Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
>> chroot or of having 32-bit userspace with 64-bit kernel. Better to do this
>> on runtime. I know, it's not very nice but the whole grub-mkconfig is
>> trouble that needs redesign that I'm working on.
>
> So if we need to do this at run time(in grub shell), can I use
> "grub_cpu" variable instead?

Dose this patch make sense to you?

diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index c48af94..0c26cbb 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -122,16 +122,23 @@ linux_entry ()
         else
             xen_rm_opts="no-real-mode edd=off"
         fi
-       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
${xen_args} \${xen_rm_opts}
+        if [ "x\$grub_cpu" != xarm64 ]; then
+            xen_loader="multiboot"
+            module_loader="module"
+        else
+            xen_loader="xen_hypervisor"
+            module_loader="xen_module"
+        fi
+        \${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder
${xen_args} \${xen_rm_opts}
        echo    '$(echo "$lmessage" | grub_quote)'
-       module  ${rel_dirname}/${basename} placeholder
root=${linux_root_device_thisversion} ro ${args}
+        \${module_loader}      ${rel_dirname}/${basename} placeholder
root=${linux_root_device_thisversion} ro ${args}
 EOF
   if test -n "${initrd}" ; then
     # TRANSLATORS: ramdisk isn't identifier. Should be translated.
     message="$(gettext_printf "Loading initial ramdisk ...")"
     sed "s/^/$submenu_indentation/" << EOF
        echo    '$(echo "$message" | grub_quote)'
-       module  --nounzip   ${rel_dirname}/${initrd}
+        \${module_loader} --nounzip    ${rel_dirname}/${initrd}
 EOF
   fi
   sed "s/^/$submenu_indentation/" << EOF


>
> Thanks!
>
>>>
>>> +       xen_loader="multiboot"
>>> +       module_loader="module"
>>> +    else
>>> +       xen_loader="xen_hypervisor"
>>> +       module_loader="xen_module"
>>> +    fi
>>>      while [ "x$list" != "x" ] ; do
>>>         linux=`version_find_latest $list`
>>>         gettext_printf "Found linux image: %s\n" "$linux" >&2
>>> --
>>> 2.9.3
>>>
>>
>
>
>
> --
> Best regards,
>
> Fu Wei
> Software Engineer
> Red Hat



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply related	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-09  9:02       ` Fu Wei
@ 2017-05-10 22:01         ` Vladimir 'phcoder' Serbinenko
  -1 siblings, 0 replies; 44+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-05-10 22:01 UTC (permalink / raw)
  To: Fu Wei
  Cc: The development of GNU GRUB, Stefano Stabellini, arvidjaar,
	Jon Masters, ian.campbell, Leif Lindholm, Julien Grall,
	xen-devel, Linaro UEFI Mailman List, Daniel Kiper


[-- Attachment #1.1: Type: text/plain, Size: 3542 bytes --]

On Tue, May 9, 2017, 11:02 Fu Wei <fu.wei@linaro.org> wrote:

> Hi Vladimir
>
> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
> wrote:
> >
> >
> > Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
> >>
> >> From: Fu Wei <fu.wei@linaro.org>
> >>
> >> This patch adds the support of xen_boot command for aarch64:
> >>     xen_hypervisor
> >>     xen_module
> >> These two commands are only for aarch64, since it has its own protocol
> and
> >> commands to boot xen hypervisor and Dom0, but not multiboot.
> >>
> >> For other architectures, they are still using multiboot and module
> >> commands.
> >>
> >> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> >> ---
> >>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
> >>  1 file changed, 10 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
> >> index c48af94..9777719 100644
> >> --- a/util/grub.d/20_linux_xen.in
> >> +++ b/util/grub.d/20_linux_xen.in
> >> @@ -122,16 +122,16 @@ linux_entry ()
> >>          else
> >>              xen_rm_opts="no-real-mode edd=off"
> >>          fi
> >> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
> >> ${xen_args} \${xen_rm_opts}
> >> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
> >> ${xen_args} \${xen_rm_opts}
> >>         echo    '$(echo "$lmessage" | grub_quote)'
> >> -       module  ${rel_dirname}/${basename} placeholder
> >> root=${linux_root_device_thisversion} ro ${args}
> >> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
> >> root=${linux_root_device_thisversion} ro ${args}
> >>  EOF
> >>    if test -n "${initrd}" ; then
> >>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
> >>      message="$(gettext_printf "Loading initial ramdisk ...")"
> >>      sed "s/^/$submenu_indentation/" << EOF
> >>         echo    '$(echo "$message" | grub_quote)'
> >> -       module  --nounzip   ${rel_dirname}/${initrd}
> >> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
> >>  EOF
> >>    fi
> >>    sed "s/^/$submenu_indentation/" << EOF
> >> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
> >>      if [ "x$is_top_level" != xtrue ]; then
> >>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
> >> "${xen_version}" | grub_quote)' \$menuentry_id_option
> >> 'xen-hypervisor-$xen_version-$boot_device_id' {"
> >>      fi
> >> +    if [ "x$machine" != xaarch64 ]; then
> >
> > Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
> > chroot or of having 32-bit userspace with 64-bit kernel. Better to do
> this
> > on runtime. I know, it's not very nice but the whole grub-mkconfig is
> > trouble that needs redesign that I'm working on.
>
> So if we need to do this at run time(in grub shell), can I use
> "grub_cpu" variable instead?
>
Yes, you can. Another possibility, probably better, is to check actual file
type, see grub-file

>
> Thanks!
>
> >>
> >> +       xen_loader="multiboot"
> >> +       module_loader="module"
> >> +    else
> >> +       xen_loader="xen_hypervisor"
> >> +       module_loader="xen_module"
> >> +    fi
> >>      while [ "x$list" != "x" ] ; do
> >>         linux=`version_find_latest $list`
> >>         gettext_printf "Found linux image: %s\n" "$linux" >&2
> >> --
> >> 2.9.3
> >>
> >
>
>
>
> --
> Best regards,
>
> Fu Wei
> Software Engineer
> Red Hat
>

[-- Attachment #1.2: Type: text/html, Size: 5566 bytes --]

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-10 22:01         ` Vladimir 'phcoder' Serbinenko
  0 siblings, 0 replies; 44+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-05-10 22:01 UTC (permalink / raw)
  To: Fu Wei
  Cc: Daniel Kiper, Jon Masters, Julien Grall, Leif Lindholm,
	Linaro UEFI Mailman List, Stefano Stabellini,
	The development of GNU GRUB, arvidjaar, ian.campbell, xen-devel

[-- Attachment #1: Type: text/plain, Size: 3542 bytes --]

On Tue, May 9, 2017, 11:02 Fu Wei <fu.wei@linaro.org> wrote:

> Hi Vladimir
>
> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
> wrote:
> >
> >
> > Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
> >>
> >> From: Fu Wei <fu.wei@linaro.org>
> >>
> >> This patch adds the support of xen_boot command for aarch64:
> >>     xen_hypervisor
> >>     xen_module
> >> These two commands are only for aarch64, since it has its own protocol
> and
> >> commands to boot xen hypervisor and Dom0, but not multiboot.
> >>
> >> For other architectures, they are still using multiboot and module
> >> commands.
> >>
> >> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> >> ---
> >>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
> >>  1 file changed, 10 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
> >> index c48af94..9777719 100644
> >> --- a/util/grub.d/20_linux_xen.in
> >> +++ b/util/grub.d/20_linux_xen.in
> >> @@ -122,16 +122,16 @@ linux_entry ()
> >>          else
> >>              xen_rm_opts="no-real-mode edd=off"
> >>          fi
> >> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
> >> ${xen_args} \${xen_rm_opts}
> >> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
> >> ${xen_args} \${xen_rm_opts}
> >>         echo    '$(echo "$lmessage" | grub_quote)'
> >> -       module  ${rel_dirname}/${basename} placeholder
> >> root=${linux_root_device_thisversion} ro ${args}
> >> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
> >> root=${linux_root_device_thisversion} ro ${args}
> >>  EOF
> >>    if test -n "${initrd}" ; then
> >>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
> >>      message="$(gettext_printf "Loading initial ramdisk ...")"
> >>      sed "s/^/$submenu_indentation/" << EOF
> >>         echo    '$(echo "$message" | grub_quote)'
> >> -       module  --nounzip   ${rel_dirname}/${initrd}
> >> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
> >>  EOF
> >>    fi
> >>    sed "s/^/$submenu_indentation/" << EOF
> >> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
> >>      if [ "x$is_top_level" != xtrue ]; then
> >>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
> >> "${xen_version}" | grub_quote)' \$menuentry_id_option
> >> 'xen-hypervisor-$xen_version-$boot_device_id' {"
> >>      fi
> >> +    if [ "x$machine" != xaarch64 ]; then
> >
> > Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
> > chroot or of having 32-bit userspace with 64-bit kernel. Better to do
> this
> > on runtime. I know, it's not very nice but the whole grub-mkconfig is
> > trouble that needs redesign that I'm working on.
>
> So if we need to do this at run time(in grub shell), can I use
> "grub_cpu" variable instead?
>
Yes, you can. Another possibility, probably better, is to check actual file
type, see grub-file

>
> Thanks!
>
> >>
> >> +       xen_loader="multiboot"
> >> +       module_loader="module"
> >> +    else
> >> +       xen_loader="xen_hypervisor"
> >> +       module_loader="xen_module"
> >> +    fi
> >>      while [ "x$list" != "x" ] ; do
> >>         linux=`version_find_latest $list`
> >>         gettext_printf "Found linux image: %s\n" "$linux" >&2
> >> --
> >> 2.9.3
> >>
> >
>
>
>
> --
> Best regards,
>
> Fu Wei
> Software Engineer
> Red Hat
>

[-- Attachment #2: Type: text/html, Size: 5566 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-10 22:01         ` Vladimir 'phcoder' Serbinenko
@ 2017-05-11 14:25           ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-11 14:25 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: The development of GNU GRUB, Stefano Stabellini, arvidjaar,
	Jon Masters, ian.campbell, Leif Lindholm, Julien Grall,
	xen-devel, Linaro UEFI Mailman List, Daniel Kiper

Hi Vladimir,

On 11 May 2017 at 06:01, Vladimir 'phcoder' Serbinenko
<phcoder@gmail.com> wrote:
>
>
> On Tue, May 9, 2017, 11:02 Fu Wei <fu.wei@linaro.org> wrote:
>>
>> Hi Vladimir
>>
>> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
>> wrote:
>> >
>> >
>> > Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>> >>
>> >> From: Fu Wei <fu.wei@linaro.org>
>> >>
>> >> This patch adds the support of xen_boot command for aarch64:
>> >>     xen_hypervisor
>> >>     xen_module
>> >> These two commands are only for aarch64, since it has its own protocol
>> >> and
>> >> commands to boot xen hypervisor and Dom0, but not multiboot.
>> >>
>> >> For other architectures, they are still using multiboot and module
>> >> commands.
>> >>
>> >> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> >> ---
>> >>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>> >>  1 file changed, 10 insertions(+), 3 deletions(-)
>> >>
>> >> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
>> >> index c48af94..9777719 100644
>> >> --- a/util/grub.d/20_linux_xen.in
>> >> +++ b/util/grub.d/20_linux_xen.in
>> >> @@ -122,16 +122,16 @@ linux_entry ()
>> >>          else
>> >>              xen_rm_opts="no-real-mode edd=off"
>> >>          fi
>> >> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
>> >> ${xen_args} \${xen_rm_opts}
>> >> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
>> >> ${xen_args} \${xen_rm_opts}
>> >>         echo    '$(echo "$lmessage" | grub_quote)'
>> >> -       module  ${rel_dirname}/${basename} placeholder
>> >> root=${linux_root_device_thisversion} ro ${args}
>> >> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
>> >> root=${linux_root_device_thisversion} ro ${args}
>> >>  EOF
>> >>    if test -n "${initrd}" ; then
>> >>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>> >>      message="$(gettext_printf "Loading initial ramdisk ...")"
>> >>      sed "s/^/$submenu_indentation/" << EOF
>> >>         echo    '$(echo "$message" | grub_quote)'
>> >> -       module  --nounzip   ${rel_dirname}/${initrd}
>> >> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>> >>  EOF
>> >>    fi
>> >>    sed "s/^/$submenu_indentation/" << EOF
>> >> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>> >>      if [ "x$is_top_level" != xtrue ]; then
>> >>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
>> >> "${xen_version}" | grub_quote)' \$menuentry_id_option
>> >> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>> >>      fi
>> >> +    if [ "x$machine" != xaarch64 ]; then
>> >
>> > Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
>> > chroot or of having 32-bit userspace with 64-bit kernel. Better to do
>> > this
>> > on runtime. I know, it's not very nice but the whole grub-mkconfig is
>> > trouble that needs redesign that I'm working on.
>>
>> So if we need to do this at run time(in grub shell), can I use
>> "grub_cpu" variable instead?
>
> Yes, you can. Another possibility, probably better, is to check actual file
> type, see grub-file

Very good idea, will do in my v8 patchset, will send v8 in a day.

>>
>>
>> Thanks!
>>
>> >>
>> >> +       xen_loader="multiboot"
>> >> +       module_loader="module"
>> >> +    else
>> >> +       xen_loader="xen_hypervisor"
>> >> +       module_loader="xen_module"
>> >> +    fi
>> >>      while [ "x$list" != "x" ] ; do
>> >>         linux=`version_find_latest $list`
>> >>         gettext_printf "Found linux image: %s\n" "$linux" >&2
>> >> --
>> >> 2.9.3
>> >>
>> >
>>
>>
>>
>> --
>> Best regards,
>>
>> Fu Wei
>> Software Engineer
>> Red Hat



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-11 14:25           ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-11 14:25 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: Daniel Kiper, Jon Masters, Julien Grall, Leif Lindholm,
	Linaro UEFI Mailman List, Stefano Stabellini,
	The development of GNU GRUB, arvidjaar, ian.campbell, xen-devel

Hi Vladimir,

On 11 May 2017 at 06:01, Vladimir 'phcoder' Serbinenko
<phcoder@gmail.com> wrote:
>
>
> On Tue, May 9, 2017, 11:02 Fu Wei <fu.wei@linaro.org> wrote:
>>
>> Hi Vladimir
>>
>> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
>> wrote:
>> >
>> >
>> > Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>> >>
>> >> From: Fu Wei <fu.wei@linaro.org>
>> >>
>> >> This patch adds the support of xen_boot command for aarch64:
>> >>     xen_hypervisor
>> >>     xen_module
>> >> These two commands are only for aarch64, since it has its own protocol
>> >> and
>> >> commands to boot xen hypervisor and Dom0, but not multiboot.
>> >>
>> >> For other architectures, they are still using multiboot and module
>> >> commands.
>> >>
>> >> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> >> ---
>> >>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>> >>  1 file changed, 10 insertions(+), 3 deletions(-)
>> >>
>> >> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
>> >> index c48af94..9777719 100644
>> >> --- a/util/grub.d/20_linux_xen.in
>> >> +++ b/util/grub.d/20_linux_xen.in
>> >> @@ -122,16 +122,16 @@ linux_entry ()
>> >>          else
>> >>              xen_rm_opts="no-real-mode edd=off"
>> >>          fi
>> >> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
>> >> ${xen_args} \${xen_rm_opts}
>> >> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
>> >> ${xen_args} \${xen_rm_opts}
>> >>         echo    '$(echo "$lmessage" | grub_quote)'
>> >> -       module  ${rel_dirname}/${basename} placeholder
>> >> root=${linux_root_device_thisversion} ro ${args}
>> >> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
>> >> root=${linux_root_device_thisversion} ro ${args}
>> >>  EOF
>> >>    if test -n "${initrd}" ; then
>> >>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>> >>      message="$(gettext_printf "Loading initial ramdisk ...")"
>> >>      sed "s/^/$submenu_indentation/" << EOF
>> >>         echo    '$(echo "$message" | grub_quote)'
>> >> -       module  --nounzip   ${rel_dirname}/${initrd}
>> >> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>> >>  EOF
>> >>    fi
>> >>    sed "s/^/$submenu_indentation/" << EOF
>> >> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>> >>      if [ "x$is_top_level" != xtrue ]; then
>> >>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
>> >> "${xen_version}" | grub_quote)' \$menuentry_id_option
>> >> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>> >>      fi
>> >> +    if [ "x$machine" != xaarch64 ]; then
>> >
>> > Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
>> > chroot or of having 32-bit userspace with 64-bit kernel. Better to do
>> > this
>> > on runtime. I know, it's not very nice but the whole grub-mkconfig is
>> > trouble that needs redesign that I'm working on.
>>
>> So if we need to do this at run time(in grub shell), can I use
>> "grub_cpu" variable instead?
>
> Yes, you can. Another possibility, probably better, is to check actual file
> type, see grub-file

Very good idea, will do in my v8 patchset, will send v8 in a day.

>>
>>
>> Thanks!
>>
>> >>
>> >> +       xen_loader="multiboot"
>> >> +       module_loader="module"
>> >> +    else
>> >> +       xen_loader="xen_hypervisor"
>> >> +       module_loader="xen_module"
>> >> +    fi
>> >>      while [ "x$list" != "x" ] ; do
>> >>         linux=`version_find_latest $list`
>> >>         gettext_printf "Found linux image: %s\n" "$linux" >&2
>> >> --
>> >> 2.9.3
>> >>
>> >
>>
>>
>>
>> --
>> Best regards,
>>
>> Fu Wei
>> Software Engineer
>> Red Hat



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
  2017-05-11 14:25           ` Fu Wei
@ 2017-05-14  7:53             ` Fu Wei
  -1 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-14  7:53 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: The development of GNU GRUB, Stefano Stabellini, arvidjaar,
	Jon Masters, ian.campbell, Leif Lindholm, Julien Grall,
	xen-devel, Linaro UEFI Mailman List, Daniel Kiper

Hi Vladimir,

On 11 May 2017 at 22:25, Fu Wei <fu.wei@linaro.org> wrote:
> Hi Vladimir,
>
> On 11 May 2017 at 06:01, Vladimir 'phcoder' Serbinenko
> <phcoder@gmail.com> wrote:
>>
>>
>> On Tue, May 9, 2017, 11:02 Fu Wei <fu.wei@linaro.org> wrote:
>>>
>>> Hi Vladimir
>>>
>>> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
>>> wrote:
>>> >
>>> >
>>> > Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>>> >>
>>> >> From: Fu Wei <fu.wei@linaro.org>
>>> >>
>>> >> This patch adds the support of xen_boot command for aarch64:
>>> >>     xen_hypervisor
>>> >>     xen_module
>>> >> These two commands are only for aarch64, since it has its own protocol
>>> >> and
>>> >> commands to boot xen hypervisor and Dom0, but not multiboot.
>>> >>
>>> >> For other architectures, they are still using multiboot and module
>>> >> commands.
>>> >>
>>> >> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>> >> ---
>>> >>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>>> >>  1 file changed, 10 insertions(+), 3 deletions(-)
>>> >>
>>> >> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
>>> >> index c48af94..9777719 100644
>>> >> --- a/util/grub.d/20_linux_xen.in
>>> >> +++ b/util/grub.d/20_linux_xen.in
>>> >> @@ -122,16 +122,16 @@ linux_entry ()
>>> >>          else
>>> >>              xen_rm_opts="no-real-mode edd=off"
>>> >>          fi
>>> >> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
>>> >> ${xen_args} \${xen_rm_opts}
>>> >> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
>>> >> ${xen_args} \${xen_rm_opts}
>>> >>         echo    '$(echo "$lmessage" | grub_quote)'
>>> >> -       module  ${rel_dirname}/${basename} placeholder
>>> >> root=${linux_root_device_thisversion} ro ${args}
>>> >> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
>>> >> root=${linux_root_device_thisversion} ro ${args}
>>> >>  EOF
>>> >>    if test -n "${initrd}" ; then
>>> >>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>>> >>      message="$(gettext_printf "Loading initial ramdisk ...")"
>>> >>      sed "s/^/$submenu_indentation/" << EOF
>>> >>         echo    '$(echo "$message" | grub_quote)'
>>> >> -       module  --nounzip   ${rel_dirname}/${initrd}
>>> >> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>>> >>  EOF
>>> >>    fi
>>> >>    sed "s/^/$submenu_indentation/" << EOF
>>> >> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>>> >>      if [ "x$is_top_level" != xtrue ]; then
>>> >>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
>>> >> "${xen_version}" | grub_quote)' \$menuentry_id_option
>>> >> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>>> >>      fi
>>> >> +    if [ "x$machine" != xaarch64 ]; then
>>> >
>>> > Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
>>> > chroot or of having 32-bit userspace with 64-bit kernel. Better to do
>>> > this
>>> > on runtime. I know, it's not very nice but the whole grub-mkconfig is
>>> > trouble that needs redesign that I'm working on.
>>>
>>> So if we need to do this at run time(in grub shell), can I use
>>> "grub_cpu" variable instead?
>>
>> Yes, you can. Another possibility, probably better, is to check actual file
>> type, see grub-file
>
> Very good idea, will do in my v8 patchset, will send v8 in a day.

I have posted v8 patchset which is using “$grub_file”, please help me
to review it :-)

Great thanks!

>
>>>
>>>
>>> Thanks!
>>>
>>> >>
>>> >> +       xen_loader="multiboot"
>>> >> +       module_loader="module"
>>> >> +    else
>>> >> +       xen_loader="xen_hypervisor"
>>> >> +       module_loader="xen_module"
>>> >> +    fi
>>> >>      while [ "x$list" != "x" ] ; do
>>> >>         linux=`version_find_latest $list`
>>> >>         gettext_printf "Found linux image: %s\n" "$linux" >&2
>>> >> --
>>> >> 2.9.3
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Best regards,
>>>
>>> Fu Wei
>>> Software Engineer
>>> Red Hat
>
>
>
> --
> Best regards,
>
> Fu Wei
> Software Engineer
> Red Hat



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
@ 2017-05-14  7:53             ` Fu Wei
  0 siblings, 0 replies; 44+ messages in thread
From: Fu Wei @ 2017-05-14  7:53 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko
  Cc: Daniel Kiper, Jon Masters, Julien Grall, Leif Lindholm,
	Linaro UEFI Mailman List, Stefano Stabellini,
	The development of GNU GRUB, arvidjaar, ian.campbell, xen-devel

Hi Vladimir,

On 11 May 2017 at 22:25, Fu Wei <fu.wei@linaro.org> wrote:
> Hi Vladimir,
>
> On 11 May 2017 at 06:01, Vladimir 'phcoder' Serbinenko
> <phcoder@gmail.com> wrote:
>>
>>
>> On Tue, May 9, 2017, 11:02 Fu Wei <fu.wei@linaro.org> wrote:
>>>
>>> Hi Vladimir
>>>
>>> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
>>> wrote:
>>> >
>>> >
>>> > Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>>> >>
>>> >> From: Fu Wei <fu.wei@linaro.org>
>>> >>
>>> >> This patch adds the support of xen_boot command for aarch64:
>>> >>     xen_hypervisor
>>> >>     xen_module
>>> >> These two commands are only for aarch64, since it has its own protocol
>>> >> and
>>> >> commands to boot xen hypervisor and Dom0, but not multiboot.
>>> >>
>>> >> For other architectures, they are still using multiboot and module
>>> >> commands.
>>> >>
>>> >> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>> >> ---
>>> >>  util/grub.d/20_linux_xen.in | 13 ++++++++++---
>>> >>  1 file changed, 10 insertions(+), 3 deletions(-)
>>> >>
>>> >> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
>>> >> index c48af94..9777719 100644
>>> >> --- a/util/grub.d/20_linux_xen.in
>>> >> +++ b/util/grub.d/20_linux_xen.in
>>> >> @@ -122,16 +122,16 @@ linux_entry ()
>>> >>          else
>>> >>              xen_rm_opts="no-real-mode edd=off"
>>> >>          fi
>>> >> -       multiboot       ${rel_xen_dirname}/${xen_basename} placeholder
>>> >> ${xen_args} \${xen_rm_opts}
>>> >> +       ${xen_loader}   ${rel_xen_dirname}/${xen_basename} placeholder
>>> >> ${xen_args} \${xen_rm_opts}
>>> >>         echo    '$(echo "$lmessage" | grub_quote)'
>>> >> -       module  ${rel_dirname}/${basename} placeholder
>>> >> root=${linux_root_device_thisversion} ro ${args}
>>> >> +       ${module_loader}        ${rel_dirname}/${basename} placeholder
>>> >> root=${linux_root_device_thisversion} ro ${args}
>>> >>  EOF
>>> >>    if test -n "${initrd}" ; then
>>> >>      # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>>> >>      message="$(gettext_printf "Loading initial ramdisk ...")"
>>> >>      sed "s/^/$submenu_indentation/" << EOF
>>> >>         echo    '$(echo "$message" | grub_quote)'
>>> >> -       module  --nounzip   ${rel_dirname}/${initrd}
>>> >> +       ${module_loader}        --nounzip   ${rel_dirname}/${initrd}
>>> >>  EOF
>>> >>    fi
>>> >>    sed "s/^/$submenu_indentation/" << EOF
>>> >> @@ -206,6 +206,13 @@ while [ "x${xen_list}" != "x" ] ; do
>>> >>      if [ "x$is_top_level" != xtrue ]; then
>>> >>         echo "  submenu '$(gettext_printf "Xen hypervisor, version %s"
>>> >> "${xen_version}" | grub_quote)' \$menuentry_id_option
>>> >> 'xen-hypervisor-$xen_version-$boot_device_id' {"
>>> >>      fi
>>> >> +    if [ "x$machine" != xaarch64 ]; then
>>> >
>>> > Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
>>> > chroot or of having 32-bit userspace with 64-bit kernel. Better to do
>>> > this
>>> > on runtime. I know, it's not very nice but the whole grub-mkconfig is
>>> > trouble that needs redesign that I'm working on.
>>>
>>> So if we need to do this at run time(in grub shell), can I use
>>> "grub_cpu" variable instead?
>>
>> Yes, you can. Another possibility, probably better, is to check actual file
>> type, see grub-file
>
> Very good idea, will do in my v8 patchset, will send v8 in a day.

I have posted v8 patchset which is using “$grub_file”, please help me
to review it :-)

Great thanks!

>
>>>
>>>
>>> Thanks!
>>>
>>> >>
>>> >> +       xen_loader="multiboot"
>>> >> +       module_loader="module"
>>> >> +    else
>>> >> +       xen_loader="xen_hypervisor"
>>> >> +       module_loader="xen_module"
>>> >> +    fi
>>> >>      while [ "x$list" != "x" ] ; do
>>> >>         linux=`version_find_latest $list`
>>> >>         gettext_printf "Found linux image: %s\n" "$linux" >&2
>>> >> --
>>> >> 2.9.3
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Best regards,
>>>
>>> Fu Wei
>>> Software Engineer
>>> Red Hat
>
>
>
> --
> Best regards,
>
> Fu Wei
> Software Engineer
> Red Hat



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat


^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2017-05-14  7:53 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-02  7:06 [PATCH v7 0/3] arm64,xen: add xen_boot support into grup-mkconfig fu.wei
2017-05-02  7:06 ` fu.wei
2017-05-02  7:06 ` [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command fu.wei
2017-05-02  7:06   ` fu.wei
2017-05-09  6:56   ` Vladimir 'phcoder' Serbinenko
2017-05-09  6:56     ` Vladimir 'phcoder' Serbinenko
2017-05-09  8:42     ` Fu Wei
2017-05-09  8:42       ` Fu Wei
2017-05-02  7:06 ` [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 fu.wei
2017-05-02  7:06   ` fu.wei
2017-05-03 19:13   ` [Xen-devel] " Andrew Cooper
2017-05-03 19:13     ` Andrew Cooper
2017-05-03 20:53     ` Stefano Stabellini
2017-05-03 20:53       ` [Xen-devel] " Stefano Stabellini
2017-05-05  8:57       ` Fu Wei
2017-05-05  8:57         ` Fu Wei
2017-05-05  9:01         ` Andrew Cooper
2017-05-05  9:01           ` Andrew Cooper
2017-05-05  9:25           ` Fu Wei
2017-05-05  9:25             ` [Xen-devel] " Fu Wei
2017-05-05 10:11           ` Julien Grall
2017-05-05 10:11             ` Julien Grall
2017-05-05 10:41             ` Fu Wei
2017-05-05 10:41               ` [Xen-devel] " Fu Wei
2017-05-09  6:59   ` Vladimir 'phcoder' Serbinenko
2017-05-09  6:59     ` Vladimir 'phcoder' Serbinenko
2017-05-09  9:02     ` Fu Wei
2017-05-09  9:02       ` Fu Wei
2017-05-09  9:39       ` Fu Wei
2017-05-09  9:39         ` Fu Wei
2017-05-10 22:01       ` Vladimir 'phcoder' Serbinenko
2017-05-10 22:01         ` Vladimir 'phcoder' Serbinenko
2017-05-11 14:25         ` Fu Wei
2017-05-11 14:25           ` Fu Wei
2017-05-14  7:53           ` Fu Wei
2017-05-14  7:53             ` Fu Wei
2017-05-02  7:06 ` [PATCH v7 3/3] arm64: update the introduction of xen boot commands in docs/grub.texi fu.wei
2017-05-02  7:06   ` fu.wei
2017-05-02  7:24 ` [PATCH v7 0/3] arm64, xen: add xen_boot support into grup-mkconfig Fu Wei
2017-05-02  7:24   ` Fu Wei
2017-05-04 16:00 ` Daniel Kiper
2017-05-04 16:00   ` Daniel Kiper
2017-05-05  8:52   ` Fu Wei
2017-05-05  8:52     ` Fu Wei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.