Hi
Downloaded the source code for Grub from the below link and followed the instruction to build it.
https://wiki.xenproject.org/wiki/HiKey960
Getting below issue.
gcc -DHAVE_CONFIG_H -I. -I… -I/home//Documents/Hikey960_wiki/grub/include -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=ARM64_EFI -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I…/include -I…/include -DGRUB_FILE=“loader/arm64/xen_boot.c” -I. -I. -I… -I… -I…/include -I…/include -I…/grub-core/lib/libgcrypt-grub/src/ -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -freg-struct-return -msoft-float -fno-dwarf2-cfi-asm -mno-stack-arg-probe -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-stack-protector -Wtrampolines -Werror -mcmodel=large -ffreestanding -MT loader/arm64/xen_boot_module-xen_boot.o -MD -MP -MF loader/arm64/.deps-core/xen_boot_module-xen_boot.Tpo -c -o loader/arm64/xen_boot_module-xen_boot.o test -f 'loader/arm64/xen_boot.c' || echo './'
loader/arm64/xen_boot.c
loader/arm64/xen_boot.c: In function ‘xen_boot’:
loader/arm64/xen_boot.c:269:3: error: implicit declaration of function ‘grub_armxx_efi_linux_boot_image’ [-Werror=implicit-function-declaration]
return grub_armxx_efi_linux_boot_image (xen_hypervisor->start,
^
loader/arm64/xen_boot.c:269:3: error: nested extern declaration of ‘grub_armxx_efi_linux_boot_image’ [-Werror=nested-externs]
loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_hypervisor’:
loader/arm64/xen_boot.c:473:7: error: implicit declaration of function ‘grub_armxx_efi_linux_check_image’ [-Werror=implicit-function-declaration]
((struct linux_armxx_kernel_header *) &sh) != GRUB_ERR_NONE)
^
loader/arm64/xen_boot.c:473:7: error: nested extern declaration of ‘grub_armxx_efi_linux_check_image’ [-Werror=nested-externs]