|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/x86: fix xen.efi boot crash from some bootloaders
On Wed, Jul 23, 2025 at 01:56:33PM +0000, Yann Sionneau wrote:
> diff --git a/xen/Makefile b/xen/Makefile
> index 8fc4e042ff..7dc9cd7e05 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -299,10 +299,13 @@ export XEN_HAS_CHECKPOLICY := $(call
> success,$(CHECKPOLICY) -h 2>&1 | grep -q xe
> # ===========================================================================
> # Rules shared between *config targets and build targets
>
> -PHONY += tools_fixdep
> +PHONY += tools_fixdep tools_keeprelocs
> tools_fixdep:
> $(Q)$(MAKE) $(build)=tools tools/fixdep
>
> +tools_keeprelocs:
> + $(Q)$(MAKE) $(build)=tools tools/keeprelocs
You don't need this new rule, and nothing calls it. `tools_fixdep` is
special as it is used by the build system and very early one.
There's the command `$(Q)$(MAKE) $(build)=tools` which will build
this new binary for you, it is the first call in the rule `$(TARGET)`.
So beside editing xen/tools/Makefile, there's nothing else to do to have
a build of this new binary.
> diff --git a/xen/tools/Makefile b/xen/tools/Makefile
> index a5078b7cb8..4fd917b398 100644
> --- a/xen/tools/Makefile
> +++ b/xen/tools/Makefile
> @@ -1,2 +1,5 @@
> hostprogs-always-y += symbols
> hostprogs-always-y += fixdep
> +hostprogs-always-$(XEN_BUILD_PE) += keeprelocs
> +# next line is to allow including include/efi/pe.h
> +HOSTCFLAGS_keeprelocs.o := -I ../include
`../include` doesn't exist, and `..` might not exist or might be outside
the build directory.
In the directory "xen/" (and the subdirectories) all the commands are
executed from "xen/". Also, "xen/" directory can be built out-of-tree.
In both case, `..` isn't the directory you are looking for.
You can try out-of-tree build with:
make -C xen O=path/to/build-tree
Or:
cd path/to/build-tree; make -f path/to/xen.git/xen/Makefile
Anyway, for the build to work, you want:
HOSTCFLAGS_keeprelocs.o := -I $(srctree)/include
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |