Re: [PATCH v3 (part 1)] arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression'
On Tue, Nov 20, 2018 at 12:35:39PM +, Lee Jones wrote: > From: Lee Jones > > arm64/xen: Fix implicit declaration of function > ‘grub_file_filter_disable_compression' > > Without this fix, building xen_boot.c emits: > > loader/arm64/xen_boot.c:433:5: error: implicit declaration of function > ‘grub_file_filter_disable_compression’; did you mean > ‘grub_file_filter_unregister’? [-Werror=implicit-function-declaration] > grub_file_filter_disable_compression (); > ^~~~ > grub_file_filter_unregister > loader/arm64/xen_boot.c:433:5: error: nested extern declaration of > ‘grub_file_filter_disable_compression’ [-Werror=nested-externs] > > Signed-off-by: Lee Jones I have not pushed this patch because it depends on "arm64/xen: Fix too few arguments to function ‘grub_file_open’" patch. Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression
On Tue, 20 Nov 2018, Julien Grall wrote: > On 20/11/2018 10:46, Lee Jones wrote: > > From: Lee Jones > > > > arm64/xen: Fix implicit declaration of function > > ‘grub_file_filter_disable_compression > > This patch seems to drop support for --nounzip. Can you explain why? It only seemed to serve the invocation of grub_file_filter_disable_compression() which was removed in this patch. On closer inspection, I do see that argv/argc still needs to be shifted though. I will fix that. > Note that the option added on Arm64 to keep the compatibility with x86 > multiboot loading. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH v3 (part 1)] arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression'
From: Lee Jones arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression' Without this fix, building xen_boot.c emits: loader/arm64/xen_boot.c:433:5: error: implicit declaration of function ‘grub_file_filter_disable_compression’; did you mean ‘grub_file_filter_unregister’? [-Werror=implicit-function-declaration] grub_file_filter_disable_compression (); ^~~~ grub_file_filter_unregister loader/arm64/xen_boot.c:433:5: error: nested extern declaration of ‘grub_file_filter_disable_compression’ [-Werror=nested-externs] Signed-off-by: Lee Jones diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index 7d1adce1b..a01792a72 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -429,9 +429,9 @@ 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], GRUB_FILE_TYPE_LINUX_KERNEL); + file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL +| (nounzip ? GRUB_FILE_TYPE_NO_DECOMPRESS + : GRUB_FILE_TYPE_NONE)); if (!file) goto fail; ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression
On Tue, 20 Nov 2018, Julien Grall wrote: > Hi, > > On 20/11/2018 11:22, Lee Jones wrote: > > On Tue, 20 Nov 2018, Julien Grall wrote: > > > On 20/11/2018 10:46, Lee Jones wrote: > > > > From: Lee Jones > > > > > > > > arm64/xen: Fix implicit declaration of function > > > > ‘grub_file_filter_disable_compression > > > > > > This patch seems to drop support for --nounzip. Can you explain why? > > > > It only seemed to serve the invocation of > > grub_file_filter_disable_compression() > > which was removed in this patch. > > But --nounzip will not work as expected after this patch. Looking at GRUB, > it seems the call to that function was replaced by passing > GRUB_FILE_TYPE_NO_DECOMPRESSION to grub_file_open. Ah yes, I see. Please bear with me. I need to split this patch too. > Is there any reason to not use it for Arm? -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression
Hi, On 20/11/2018 11:22, Lee Jones wrote: On Tue, 20 Nov 2018, Julien Grall wrote: On 20/11/2018 10:46, Lee Jones wrote: From: Lee Jones arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression This patch seems to drop support for --nounzip. Can you explain why? It only seemed to serve the invocation of grub_file_filter_disable_compression() which was removed in this patch. But --nounzip will not work as expected after this patch. Looking at GRUB, it seems the call to that function was replaced by passing GRUB_FILE_TYPE_NO_DECOMPRESSION to grub_file_open. Is there any reason to not use it for Arm? Cheers, On closer inspection, I do see that argv/argc still needs to be shifted though. I will fix that. Note that the option added on Arm64 to keep the compatibility with x86 multiboot loading. -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression
Hi, On 20/11/2018 10:46, Lee Jones wrote: From: Lee Jones arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression This patch seems to drop support for --nounzip. Can you explain why? Note that the option added on Arm64 to keep the compatibility with x86 multiboot loading. Cheers, Without this fix, building xen_boot.c omits: loader/arm64/xen_boot.c:433:5: error: implicit declaration of function ‘grub_file_filter_disable_compression’; did you mean ‘grub_file_filter_unregister’? [-Werror=implicit-function-declaration] grub_file_filter_disable_compression (); ^~~~ grub_file_filter_unregister loader/arm64/xen_boot.c:433:5: error: nested extern declaration of ‘grub_file_filter_disable_compression’ [-Werror=nested-externs] Signed-off-by: Lee Jones diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index 33a855df4..5820412e8 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -391,7 +391,6 @@ 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) { @@ -399,13 +398,6 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), goto fail; } - if (grub_strcmp (argv[0], "--nounzip") == 0) -{ - argv++; - argc--; - nounzip = 1; -} - if (!argc) { grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); @@ -429,8 +421,6 @@ 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; diff --git a/grub-core/osdep/generic/blocklist.c b/grub-core/osdep/generic/blocklist.c index 74024fd06..63e0aed35 100644 --- a/grub-core/osdep/generic/blocklist.c +++ b/grub-core/osdep/generic/blocklist.c @@ -59,7 +59,6 @@ grub_install_get_blocklist (grub_device_t root_dev, grub_disk_cache_invalidate_all (); - grub_file_filter_disable_compression (); file = grub_file_open (core_path_dev); if (file) { @@ -117,7 +116,6 @@ grub_install_get_blocklist (grub_device_t root_dev, grub_file_t file; /* Now read the core image to determine where the sectors are. */ - grub_file_filter_disable_compression (); file = grub_file_open (core_path_dev); if (! file) grub_util_error ("%s", grub_errmsg); -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel