[Xen-devel] [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command
From: Fu Wei 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 --- 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 #include #include +#include #include #include #include @@ -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
Re: [Xen-devel] [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command
Le Tue, May 2, 2017 à 9:06 AM, a écrit : > From: Fu Wei > > 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 > --- > 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 > #include > #include > +#include > This looks like spurious hunk. > #include > #include > #include > @@ -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
Re: [Xen-devel] [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command
Hi Vladimir, On 9 May 2017 at 14:56, Vladimir 'phcoder' Serbinenko wrote: > > > Le Tue, May 2, 2017 à 9:06 AM, a écrit : >> >> From: Fu Wei >> >> 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 >> --- >> 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 >> #include >> #include >> +#include > > This looks like spurious hunk. Yes, we don't need this headfile to build xen_boot. will delete it Thanks, >> >> #include >> #include >> #include >> @@ -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