From: fu.wei@linaro.org
To: dkiper@net-space.pl, grub-devel@gnu.org, arvidjaar@gmail.com,
phcoder@gmail.com
Cc: xen-devel@lists.xensource.com, jcm@redhat.com,
ian.campbell@docker.com, leif.lindholm@linaro.org,
julien.grall@arm.com, sstabellini@kernel.org,
linaro-uefi@lists.linaro.org, Fu Wei <fu.wei@linaro.org>
Subject: [PATCH v8 1/3] arm64: add "--nounzip" option support in xen_module command
Date: Sun, 14 May 2017 15:43:45 +0800 [thread overview]
Message-ID: <20170514074347.18787-2-fu.wei@linaro.org> (raw)
In-Reply-To: <20170514074347.18787-1-fu.wei@linaro.org>
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
for Dom0).
Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
grub-core/loader/arm64/xen_boot.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
index a914eb8..2a42654 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -379,6 +379,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 +417,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
next prev parent reply other threads:[~2017-05-14 7:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-14 7:43 [PATCH v8 0/3] arm64,xen: add xen_boot support into grub-mkconfig fu.wei
2017-05-14 7:43 ` fu.wei [this message]
2017-05-14 7:43 ` [PATCH v8 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 fu.wei
2017-05-14 7:43 ` [PATCH v8 3/3] arm64: update the introduction of xen boot commands in docs/grub.texi fu.wei
2017-05-15 13:38 ` [PATCH v8 0/3] arm64, xen: add xen_boot support into grub-mkconfig Daniel Kiper
2017-05-15 13:43 ` Julien Grall
2017-05-15 13:46 ` Daniel Kiper
2017-05-15 22:27 ` Fu Wei
2017-05-18 21:05 ` Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170514074347.18787-2-fu.wei@linaro.org \
--to=fu.wei@linaro.org \
--cc=arvidjaar@gmail.com \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
--cc=ian.campbell@docker.com \
--cc=jcm@redhat.com \
--cc=julien.grall@arm.com \
--cc=leif.lindholm@linaro.org \
--cc=linaro-uefi@lists.linaro.org \
--cc=phcoder@gmail.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).