Hi,
When I make grub with xen using the latest commit:
e8b37e2c8de7570ca9a6c7ba874762d8c4ba9373, I met error “too few arguments to function grub_create_loader_cmdline()”.
I saw the following commit tried to fix this error, but we still met such error with the latest commit e8b37e2c8de7:
commit 25e35377a84779ceeb350aa530e5adde287f6eb6
Author: Lee Jones <lee.jones@xxxxxxxxxx>
Date: Tue Nov 20 10:45:04 2018 +0000
arm64/xen: Fix too few arguments to function grub_create_loader_cmdline()
Without this fix, building xen_boot.c omits:
loader/arm64/xen_boot.c: In function ‘xen_boot_binary_load’:
loader/arm64/xen_boot.c:370:7: error: too few arguments to function ‘grub_create_loader_cmdline’
grub_create_loader_cmdline (argc - 1, argv + 1, binary->cmdline,
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from loader/arm64/xen_boot.c:36:0:
../include/grub/lib/cmdline.h:29:12: note: declared here
grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
Reviewed-by: Julien Grall <julien.grall@xxxxxxx>
Reviewed-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
Details as below:
………
cd grub
./autogen.sh
./configure --target=amd64 --with-platform=xen --prefix=${PWD}/../pvgrub2
make
………
loader/i386/xen.c: In function ‘grub_cmd_xen’:
loader/i386/xen.c:650:10: error: too few arguments to function ‘grub_create_loader_cmdline’
sizeof (xen_state.next_start.cmd_line) - 1);
^
In file included from loader/i386/xen.c:38:0:
../include/grub/lib/cmdline.h:29:12: note: declared here
grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,
^
loader/i386/xen.c:651:3: error: pointer targets in passing argument 1 of ‘grub_verify_string’ differ in signedness [-Werror=pointer-sign]
err = grub_verify_string (xen_state.next_start.cmd_line, GRUB_VERIFY_MODULE_CMDLINE);
^
In file included from ../include/grub/lib/cmdline.h:24:0,
from loader/i386/xen.c:38:
../include/grub/verify.h:81:1: note: expected ‘char *’ but argument is of type ‘int8_t *’
grub_verify_string (char *str, enum grub_verify_string_type type);
^
loader/i386/xen.c: In function ‘grub_cmd_module’:
loader/i386/xen.c:914:10: error: too few arguments to function ‘grub_create_loader_cmdline’
get_virtual_current_address (ch), cmdline_len);
^
In file included from loader/i386/xen.c:38:0:
../include/grub/lib/cmdline.h:29:12: note: declared here
grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,
^
cc1: all warnings being treated as errors
make[3]: *** [loader/i386/linux_module-xen.o] Error 1
make[3]: Leaving directory `/home/build/xen_build/data/xen/xen-20181126131613/grub/grub-core'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/build/xen_build/data/xen/xen-20181126131613/grub/grub-core'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/build/xen_build/data/xen/xen-20181126131613/grub'
make: *** [all] Error 2
Thanks,
Fan