From: "Anthony PERARD" <anthony.perard@vates.tech>
To: "Yann Sionneau" <yann.sionneau@vates.tech>
Cc: xen-devel@lists.xenproject.org,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [PATCH] xen/x86: fix xen.efi boot crash from some bootloaders
Date: Thu, 24 Jul 2025 12:18:52 +0000 [thread overview]
Message-ID: <aIIkqp-0Impxf8oV@l14> (raw)
In-Reply-To: <20250723135620.1327914-1-yann.sionneau@vates.tech>
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
prev parent reply other threads:[~2025-07-24 12:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 13:56 [PATCH] xen/x86: fix xen.efi boot crash from some bootloaders Yann Sionneau
2025-07-23 14:13 ` Andrew Cooper
2025-07-23 14:21 ` Jan Beulich
2025-07-23 14:38 ` Andrew Cooper
2025-07-23 14:45 ` Jan Beulich
2025-07-23 14:48 ` Jan Beulich
2025-07-23 14:18 ` Jan Beulich
2025-07-23 15:39 ` Yann Sionneau
2025-07-23 15:52 ` Jan Beulich
2025-07-24 14:11 ` Yann Sionneau
2025-07-24 12:18 ` Anthony PERARD [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aIIkqp-0Impxf8oV@l14 \
--to=anthony.perard@vates.tech \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
--cc=yann.sionneau@vates.tech \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.