All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled
@ 2026-08-03 14:51 Neal Frager via buildroot
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 2/4] package/xen: add custom version support Neal Frager via buildroot
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Neal Frager via buildroot @ 2026-08-03 14:51 UTC (permalink / raw)
  To: buildroot
  Cc: alistair, stefano.stabellini, ibai.erkiaga-elorza, luca.ceresoli,
	micheal.saleab, yann.morin, matthew.l.weber3, brandon.maier,
	john.ernberg, brian.j.wood2, ju.o, stewart.hildebrand,
	thomas.petazzoni, romain.naour, michal.simek, romain.naour,
	Neal Frager

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="y", Size: 5183 bytes --]

The 0002-Update-linker-flags.patch assumes that the qemu-xen files are included
in the xen source tree. However, if BR2_PACKAGE_XEN_TOOLS is not enabled, the
qemu-xen dependency will not be handled and the patch will fail to apply with
the following error.

Fixes: build error below
Applying 0002-Update-linker-flags.patch using patch:
patching file tools/Makefile
Hunk #1 succeeded at 36 (offset -1 lines).
Hunk #2 succeeded at 185 (offset -8 lines).
can't find file to patch at input line 76
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/tools/qemu-xen/include/hw/xen/xen_native.h b/tools/qemu-xen/include/hw/xen/xen_native.h
|index 6bcc83ba..2590904e 100644
|--- a/tools/qemu-xen/include/hw/xen/xen_native.h
|+++ b/tools/qemu-xen/include/hw/xen/xen_native.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
make: *** [package/pkg-generic.mk:239: output/build/xen-4.21.1/.stamp_patched] Error 1

To avoid making BR2_PACKAGE_XEN_TOOLS a required option, fix the
0002-Update-linker-flags.patch so that the part that modifies the qemu-xen
sources is correctly moved to a patch in the qemu-xen package.

Move this:
 #define QEMU_HW_XEN_NATIVE_H

 #ifdef __XEN_INTERFACE_VERSION__
-#error In Xen native files, include xen_native.h before other Xen headers
+#warning In Xen native files, include xen_native.h before other Xen headers
 #endif

 /*

to:
package/qemu-xen/0001-Update-linker-flags.patch

To test:
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_PACKAGE_XEN=y
 # BR2_PACKAGE_XEN_TOOLS is not set

Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: John Ernberg <john.ernberg@actia.se>
---
V1->V2:
- changed method to modify patches instead of xen.mk
V2->V3:
- removed text from commit message which appears as start of patch
V3->V4:
- merged into patch series as the first patch
---
 .../qemu-xen/0001-Update-linker-flags.patch   | 35 +++++++++++++++++++
 package/xen/0002-Update-linker-flags.patch    | 16 +--------
 2 files changed, 36 insertions(+), 15 deletions(-)
 create mode 100644 package/qemu-xen/0001-Update-linker-flags.patch

diff --git a/package/qemu-xen/0001-Update-linker-flags.patch b/package/qemu-xen/0001-Update-linker-flags.patch
new file mode 100644
index 0000000000..8162a149ed
--- /dev/null
+++ b/package/qemu-xen/0001-Update-linker-flags.patch
@@ -0,0 +1,35 @@
+From 2ba2eef5b11d81b801265ae92df91571c19cc8a3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
+Date: Tue, 30 Sep 2025 11:39:54 +0200
+Subject: [PATCH] Update linker flags
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The -I$(XEN_ROOT)/tools/include added to QEMU's extra-cflags causes
+__XEN_INTERFACE_VERSION__ to be defined before xen_native.h is included,
+triggering an include-order assertion. Downgrade to a warning since the
+version is consistent in cross-compile.
+Ref: https://github.com/qemu/qemu/commit/e2abfe5ec6
+
+Upstream: Buildroot specific. This is a temporary patch for an intermediate bump.
+Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
+---
+ include/hw/xen/xen_native.h |  2 +-
+ 1 file changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h
+index 6bcc83ba..2590904e 100644
+--- a/include/hw/xen/xen_native.h
++++ b/include/hw/xen/xen_native.h
+@@ -2,7 +2,7 @@
+ #define QEMU_HW_XEN_NATIVE_H
+ 
+ #ifdef __XEN_INTERFACE_VERSION__
+-#error In Xen native files, include xen_native.h before other Xen headers
++#warning In Xen native files, include xen_native.h before other Xen headers
+ #endif
+ 
+ /*
+-- 
+2.51.0
diff --git a/package/xen/0002-Update-linker-flags.patch b/package/xen/0002-Update-linker-flags.patch
index ac02722781..3ba678cd9b 100644
--- a/package/xen/0002-Update-linker-flags.patch
+++ b/package/xen/0002-Update-linker-flags.patch
@@ -16,8 +16,7 @@ Upstream: Buildroot specific. This is a temporary patch for an intermediate bump
 Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
 ---
  tools/Makefile                              | 29 ++++++++++++++++++++-
- tools/qemu-xen/include/hw/xen/xen_native.h |  2 +-
- 2 files changed, 29 insertions(+), 2 deletions(-)
+ 1 file changed, 28 insertions(+), 1 deletions(-)
 
 diff --git a/tools/Makefile b/tools/Makefile
 index a9a3196e..5d289651 100644
@@ -69,19 +68,6 @@ index a9a3196e..5d289651 100644
  		--bindir=$(LIBEXEC_BIN) \
  		--datadir=$(SHAREDIR)/qemu-xen \
  		--localstatedir=$(localstatedir) \
-diff --git a/tools/qemu-xen/include/hw/xen/xen_native.h b/tools/qemu-xen/include/hw/xen/xen_native.h
-index 6bcc83ba..2590904e 100644
---- a/tools/qemu-xen/include/hw/xen/xen_native.h
-+++ b/tools/qemu-xen/include/hw/xen/xen_native.h
-@@ -2,7 +2,7 @@
- #define QEMU_HW_XEN_NATIVE_H
- 
- #ifdef __XEN_INTERFACE_VERSION__
--#error In Xen native files, include xen_native.h before other Xen headers
-+#warning In Xen native files, include xen_native.h before other Xen headers
- #endif
- 
- /*
 -- 
 2.51.0
 
-- 
2.43.0


[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v4 2/4] package/xen: add custom version support
  2026-08-03 14:51 [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Neal Frager via buildroot
@ 2026-08-03 14:51 ` Neal Frager via buildroot
  2026-08-03 15:21   ` [Buildroot] [EXTERNAL] " Weber (US), Matthew L via buildroot
  2026-08-24 12:41   ` [Buildroot] " Stewart Hildebrand via buildroot
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 3/4] package/xen: add custom tarball support Neal Frager via buildroot
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Neal Frager via buildroot @ 2026-08-03 14:51 UTC (permalink / raw)
  To: buildroot
  Cc: alistair, stefano.stabellini, ibai.erkiaga-elorza, luca.ceresoli,
	micheal.saleab, yann.morin, matthew.l.weber3, Matthew Weber,
	brandon.maier, john.ernberg, brian.j.wood2, ju.o,
	stewart.hildebrand, thomas.petazzoni, romain.naour, michal.simek,
	romain.naour, Neal Frager

Add the ability to configure specific Xen versions while leaving the default
version unchanged to avoid breaking any builds already using Xen 4.21.1.

To test:
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_PACKAGE_XEN=y

Signed-off-by: Neal Frager <neal.frager@amd.com>
Tested-by: Matthew Weber <mathew.l.weber3@boeing.com>
Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
Reviewed-by: John Ernberg <john.ernberg@actia.se>

---
V1->V2:
- rebased to updated master branch
- removed the line move of the XEN_SITE definition
V2->V4:
- merged into new patch series as the second patch
---
 package/xen/Config.in | 25 +++++++++++++++++++++++++
 package/xen/xen.mk    |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/package/xen/Config.in b/package/xen/Config.in
index d63a3f6002..e50b232f0a 100644
--- a/package/xen/Config.in
+++ b/package/xen/Config.in
@@ -10,6 +10,31 @@ config BR2_PACKAGE_XEN
 
 if BR2_PACKAGE_XEN
 
+choice
+	prompt "Xen Version"
+	help
+	  Select the specific Xen version you want to use
+
+config BR2_PACKAGE_XEN_LATEST_VERSION
+	bool "4.21.1"
+
+config BR2_PACKAGE_XEN_CUSTOM_VERSION
+	bool "Custom version"
+	help
+	  This option allows to use a specific official version
+
+endchoice
+
+config BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE
+	string "Xen version"
+	depends on BR2_PACKAGE_XEN_CUSTOM_VERSION
+
+config BR2_PACKAGE_XEN_VERSION
+	string
+	default "4.21.1"	if BR2_PACKAGE_XEN_LATEST_VERSION
+	default BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE \
+				if BR2_PACKAGE_XEN_CUSTOM_VERSION
+
 config BR2_PACKAGE_XEN_HYPERVISOR
 	bool "Xen hypervisor"
 	help
diff --git a/package/xen/xen.mk b/package/xen/xen.mk
index 75252d1123..51d51333ac 100644
--- a/package/xen/xen.mk
+++ b/package/xen/xen.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-XEN_VERSION = 4.21.1
+XEN_VERSION = $(call qstrip,$(BR2_PACKAGE_XEN_VERSION))
 XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION)
 XEN_SELINUX_MODULES = systemd udev xen
 XEN_LICENSE = GPL-2.0
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v4 3/4] package/xen: add custom tarball support
  2026-08-03 14:51 [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Neal Frager via buildroot
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 2/4] package/xen: add custom version support Neal Frager via buildroot
@ 2026-08-03 14:51 ` Neal Frager via buildroot
  2026-08-25  8:37   ` Stewart Hildebrand via buildroot
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 4/4] package/xen: add custom git support Neal Frager via buildroot
  2026-08-24 10:41 ` [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Stewart Hildebrand via buildroot
  3 siblings, 1 reply; 14+ messages in thread
From: Neal Frager via buildroot @ 2026-08-03 14:51 UTC (permalink / raw)
  To: buildroot
  Cc: alistair, stefano.stabellini, ibai.erkiaga-elorza, luca.ceresoli,
	micheal.saleab, yann.morin, matthew.l.weber3, Matthew Weber,
	brandon.maier, john.ernberg, brian.j.wood2, ju.o,
	stewart.hildebrand, thomas.petazzoni, romain.naour, michal.simek,
	romain.naour, Neal Frager

Add support for custom tarballs such as tarballs from vendor Xen trees.

To test this feature, use the following configs to test latest release of the
Xilinx Xen vendor tree.

To test:
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_PACKAGE_XEN=y
BR2_PACKAGE_XEN_CUSTOM_TARBALL=y
BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,xen,xlnx-rebase-v4.21_2026.1)/xlnx-rebase-v4.21_2026.1.tar.gz"

Add to package/xen/xen.hash:
sha256  03498f51b8daae70c429ace4bde6e2be679b3a0ac28b886c7335c022feef6100  xlnx-rebase-v4.21_2026.1.tar.gz

Signed-off-by: Neal Frager <neal.frager@amd.com>
Tested-by: Matthew Weber <mathew.l.weber3@boeing.com>
Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
Reviewed-by: John Ernberg <john.ernberg@actia.se>

---
V1->V2:
- rebased to updated master branch
- added the line move of the XEN_SITE definition
V2->V4:
- merged into new patch series as the second patch
---
 package/xen/Config.in | 11 +++++++++++
 package/xen/xen.mk    | 19 ++++++++++++++++++-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/package/xen/Config.in b/package/xen/Config.in
index e50b232f0a..3726504334 100644
--- a/package/xen/Config.in
+++ b/package/xen/Config.in
@@ -23,8 +23,18 @@ config BR2_PACKAGE_XEN_CUSTOM_VERSION
 	help
 	  This option allows to use a specific official version
 
+config BR2_PACKAGE_XEN_CUSTOM_TARBALL
+	bool "Custom tarball"
+
 endchoice
 
+if BR2_PACKAGE_XEN_CUSTOM_TARBALL
+
+config BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION
+	string "URL of custom Xen tarball"
+
+endif
+
 config BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE
 	string "Xen version"
 	depends on BR2_PACKAGE_XEN_CUSTOM_VERSION
@@ -34,6 +44,7 @@ config BR2_PACKAGE_XEN_VERSION
 	default "4.21.1"	if BR2_PACKAGE_XEN_LATEST_VERSION
 	default BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE \
 				if BR2_PACKAGE_XEN_CUSTOM_VERSION
+	default "custom"	if BR2_PACKAGE_XEN_CUSTOM_TARBALL
 
 config BR2_PACKAGE_XEN_HYPERVISOR
 	bool "Xen hypervisor"
diff --git a/package/xen/xen.mk b/package/xen/xen.mk
index 51d51333ac..81568020d5 100644
--- a/package/xen/xen.mk
+++ b/package/xen/xen.mk
@@ -5,7 +5,6 @@
 ################################################################################
 
 XEN_VERSION = $(call qstrip,$(BR2_PACKAGE_XEN_VERSION))
-XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION)
 XEN_SELINUX_MODULES = systemd udev xen
 XEN_LICENSE = GPL-2.0
 XEN_LICENSE_FILES = COPYING LICENSES/GPL-2.0
@@ -19,6 +18,18 @@ XEN_DEPENDENCIES = \
 	host-python3 \
 	host-python-distlib
 
+ifeq ($(BR2_PACKAGE_XEN_CUSTOM_TARBALL),y)
+# Handle custom Xen tarballs as specified by the configuration
+XEN_TARBALL = $(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION))
+XEN_SITE = $(patsubst %/,%,$(dir $(XEN_TARBALL)))
+XEN_SOURCE = $(notdir $(XEN_TARBALL))
+else
+# Handle stable official Xen versions
+XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION)
+endif
+
+BR_NO_CHECK_HASH_FOR += $(XEN_SOURCE)
+
 # Calculate XEN_ARCH
 ifeq ($(ARCH),aarch64)
 XEN_ARCH = arm64
@@ -90,4 +101,10 @@ XEN_INSTALL_TARGET = NO
 XEN_CONF_OPTS += --disable-tools
 endif
 
+ifeq ($(BR2_PACKAGE_XEN_CUSTOM_TARBALL),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION)),)
+$(error No tarball location specified. Please check BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION)
+endif
+endif
+
 $(eval $(autotools-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v4 4/4] package/xen: add custom git support
  2026-08-03 14:51 [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Neal Frager via buildroot
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 2/4] package/xen: add custom version support Neal Frager via buildroot
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 3/4] package/xen: add custom tarball support Neal Frager via buildroot
@ 2026-08-03 14:51 ` Neal Frager via buildroot
  2026-08-25 14:20   ` Stewart Hildebrand via buildroot
  2026-08-24 10:41 ` [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Stewart Hildebrand via buildroot
  3 siblings, 1 reply; 14+ messages in thread
From: Neal Frager via buildroot @ 2026-08-03 14:51 UTC (permalink / raw)
  To: buildroot
  Cc: alistair, stefano.stabellini, ibai.erkiaga-elorza, luca.ceresoli,
	micheal.saleab, yann.morin, matthew.l.weber3, Matthew Weber,
	brandon.maier, john.ernberg, brian.j.wood2, ju.o,
	stewart.hildebrand, thomas.petazzoni, romain.naour, michal.simek,
	romain.naour, Neal Frager

For completeness, add custom git support to match the capabilities of other
packages such as Linux, uboot or ATF.

To test this feature, use the following configs to test latest release of the
Xilinx Xen vendor tree.

To test:
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_PACKAGE_XEN=y
BR2_PACKAGE_XEN_CUSTOM_GIT=y
BR2_PACKAGE_XEN_CUSTOM_REPO_URL="https://github.com/Xilinx/xen.git"
BR2_PACKAGE_XEN_CUSTOM_REPO_VERSION="791ade0eeae73a851f728cf2c9964dd303cc7d8e"

Add to package/xen/xen.hash:
sha256  bb4c156bedcf2e621f8de258fcc3d84a189c522fcf39df8de3865ba53bc10874  xen-791ade0eeae73a851f728cf2c9964dd303cc7d8e-git4.tar.gz

Signed-off-by: Neal Frager <neal.frager@amd.com>
Tested-by: Matthew Weber <mathew.l.weber3@boeing.com>
Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
Reviewed-by: John Ernberg <john.ernberg@actia.se>

---
V1->V2:
- rebased to updated master branch
V2->V4:
- merged into new patch series as the second patch
---
 package/xen/Config.in | 18 ++++++++++++++++++
 package/xen/xen.mk    |  9 +++++++++
 2 files changed, 27 insertions(+)

diff --git a/package/xen/Config.in b/package/xen/Config.in
index 3726504334..eb58c6928f 100644
--- a/package/xen/Config.in
+++ b/package/xen/Config.in
@@ -26,6 +26,9 @@ config BR2_PACKAGE_XEN_CUSTOM_VERSION
 config BR2_PACKAGE_XEN_CUSTOM_TARBALL
 	bool "Custom tarball"
 
+config BR2_PACKAGE_XEN_CUSTOM_GIT
+	bool "Custom Git repository"
+
 endchoice
 
 if BR2_PACKAGE_XEN_CUSTOM_TARBALL
@@ -45,6 +48,21 @@ config BR2_PACKAGE_XEN_VERSION
 	default BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE \
 				if BR2_PACKAGE_XEN_CUSTOM_VERSION
 	default "custom"	if BR2_PACKAGE_XEN_CUSTOM_TARBALL
+	default BR2_PACKAGE_XEN_CUSTOM_REPO_VERSION \
+				if BR2_PACKAGE_XEN_CUSTOM_GIT
+
+if BR2_PACKAGE_XEN_CUSTOM_GIT
+
+config BR2_PACKAGE_XEN_CUSTOM_REPO_URL
+	string "URL of custom repository"
+
+config BR2_PACKAGE_XEN_CUSTOM_REPO_VERSION
+	string "Custom repository version"
+	help
+	  Revision to use in the typical format used by Git
+	  E.G. a sha id, a tag, ..
+
+endif
 
 config BR2_PACKAGE_XEN_HYPERVISOR
 	bool "Xen hypervisor"
diff --git a/package/xen/xen.mk b/package/xen/xen.mk
index 81568020d5..e22ac440c7 100644
--- a/package/xen/xen.mk
+++ b/package/xen/xen.mk
@@ -23,6 +23,9 @@ ifeq ($(BR2_PACKAGE_XEN_CUSTOM_TARBALL),y)
 XEN_TARBALL = $(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION))
 XEN_SITE = $(patsubst %/,%,$(dir $(XEN_TARBALL)))
 XEN_SOURCE = $(notdir $(XEN_TARBALL))
+else ifeq ($(BR2_PACKAGE_XEN_CUSTOM_GIT),y)
+XEN_SITE = $(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_REPO_URL))
+XEN_SITE_METHOD = git
 else
 # Handle stable official Xen versions
 XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION)
@@ -107,4 +110,10 @@ $(error No tarball location specified. Please check BR2_PACKAGE_XEN_CUSTOM_TARBA
 endif
 endif
 
+ifeq ($(BR2_PACKAGE_XEN_CUSTOM_GIT),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_REPO_URL)),)
+$(error No repository specified. Please check BR2_PACKAGE_XEN_CUSTOM_REPO_URL)
+endif
+endif
+
 $(eval $(autotools-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [EXTERNAL] [PATCH v4 2/4] package/xen: add custom version support
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 2/4] package/xen: add custom version support Neal Frager via buildroot
@ 2026-08-03 15:21   ` Weber (US), Matthew L via buildroot
  2026-08-03 15:39     ` Frager, Neal via buildroot
  2026-08-24 12:41   ` [Buildroot] " Stewart Hildebrand via buildroot
  1 sibling, 1 reply; 14+ messages in thread
From: Weber (US), Matthew L via buildroot @ 2026-08-03 15:21 UTC (permalink / raw)
  To: Neal Frager, buildroot@buildroot.org
  Cc: alistair@alistair23.me, stefano.stabellini@amd.com,
	ibai.erkiaga-elorza@amd.com, luca.ceresoli@bootlin.com,
	micheal.saleab@amd.com, yann.morin@orange.com, Matthew Weber,
	brandon.maier@collins.com, john.ernberg@actia.se,
	Wood (US), Brian J, ju.o@free.fr, stewart.hildebrand@amd.com,
	thomas.petazzoni@bootlin.com, romain.naour@smile.fr,
	michal.simek@amd.com, romain.naour@gmail.com

Neal,

> -----Original Message-----
> From: buildroot <buildroot-bounces@buildroot.org> On Behalf Of Neal Frager via buildroot
> Sent: Monday, August 3, 2026 9:52 AM
> To: buildroot@buildroot.org
> Cc: alistair@alistair23.me; stefano.stabellini@amd.com; ibai.erkiaga-elorza@amd.com; luca.ceresoli@bootlin.com; micheal.saleab@amd.com; yann.morin@orange.com; Weber (US), Matthew L <matthew.l.weber3@boeing.com>; Matthew Weber <mathew.l.weber3@boeing.com>; brandon.maier@collins.com; john.ernberg@actia.se; Wood (US), Brian J <brian.j.wood2@boeing.com>; ju.o@free.fr; stewart.hildebrand@amd.com; thomas.petazzoni@bootlin.com; romain.naour@smile.fr; michal.simek@amd.com; romain.naour@gmail.com; Neal Frager <neal.frager@amd.com>
> Subject: [EXTERNAL] [Buildroot] [PATCH v4 2/4] package/xen: add custom version support
>
>  EXT email: be mindful of links/attachments.
>
>
>
>  Add the ability to configure specific Xen versions while leaving the default version unchanged to avoid breaking any builds already using Xen 4.21.1.

I think there is an edge case that if the user's custom tarball or GIT repo selects XEN_TOOLS and contains the qemu-xen folder with a cached set of files those won't be used.  We currently unconditionally do the following in xen.mk.

define XEN_INSTALL_QEMU_XEN_SRC
	rm -rf $(@D)/tools/qemu-xen
	cp -a $(QEMU_XEN_DIR) $(@D)/tools/qemu-xen
endef

I don't think this edge case is worth considering at this point and if someone runs into it, they could add a new check for existence of that folder and fail out.  Or determine a better option.

Regards,
Matt
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [EXTERNAL] [PATCH v4 2/4] package/xen: add custom version support
  2026-08-03 15:21   ` [Buildroot] [EXTERNAL] " Weber (US), Matthew L via buildroot
@ 2026-08-03 15:39     ` Frager, Neal via buildroot
  2026-08-03 16:52       ` Weber (US), Matthew L via buildroot
  0 siblings, 1 reply; 14+ messages in thread
From: Frager, Neal via buildroot @ 2026-08-03 15:39 UTC (permalink / raw)
  To: Weber (US), Matthew L, buildroot@buildroot.org
  Cc: alistair@alistair23.me, Stabellini, Stefano, Erkiaga Elorza, Ibai,
	luca.ceresoli@bootlin.com, Saleab, Micheal, yann.morin@orange.com,
	Matthew Weber, brandon.maier@collins.com, john.ernberg@actia.se,
	Wood (US), Brian J, ju.o@free.fr, Hildebrand, Stewart,
	thomas.petazzoni@bootlin.com, romain.naour@smile.fr,
	Simek, Michal, romain.naour@gmail.com

AMD General

Hi Matt,

>
>  Add the ability to configure specific Xen versions while leaving the default version unchanged to avoid breaking any builds already using Xen 4.21.1.

> I think there is an edge case that if the user's custom tarball or GIT repo selects XEN_TOOLS and contains the qemu-xen folder with a cached set of files those won't be used.  We currently unconditionally do the following in xen.mk.

> define XEN_INSTALL_QEMU_XEN_SRC
>       rm -rf $(@D)/tools/qemu-xen
>       cp -a $(QEMU_XEN_DIR) $(@D)/tools/qemu-xen
> endef

> I don't think this edge case is worth considering at this point and if someone runs into it, they could add a new check for existence of that folder and fail out.  Or determine a better option.

I thought of the same potential issue.

I do have a test case with mixing versions.  At the moment, Xilinx has a
vendor/custom xen repo, but there is not a vendor/custom qemu-xen repo.
In my testing, I verified that a combination of the Xilinx xen repo builds
properly with the upstream qemu-xen repo from the qemu-xen package.

I know this is just one test case, but the fact that the xen and qemu-xen
repos are separated, it should mean that we can mix and match the versions
between the two repos.  In other words, if someone builds xen with a cached
qemu-xen, it will probably still build and work when the xen package wipes
the cached qemu-xen version and replaces it with the buildroot qemu-xen
package version.

Before we overthink it and add code that might not be necessary, I propose
we wait and see if a user ever does run into a case where replacing the cached
qemu-xen version with the buildroot qemu-xen package version causes a problem.

Perhaps we can try testing some older xen versions without touching the
qemu-xen package as a sanity check?  Is this something you could do?

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [EXTERNAL] [PATCH v4 2/4] package/xen: add custom version support
  2026-08-03 15:39     ` Frager, Neal via buildroot
@ 2026-08-03 16:52       ` Weber (US), Matthew L via buildroot
  0 siblings, 0 replies; 14+ messages in thread
From: Weber (US), Matthew L via buildroot @ 2026-08-03 16:52 UTC (permalink / raw)
  To: Frager, Neal, buildroot@buildroot.org
  Cc: alistair@alistair23.me, Stabellini, Stefano, Erkiaga Elorza, Ibai,
	luca.ceresoli@bootlin.com, Saleab, Micheal, yann.morin@orange.com,
	brandon.maier@collins.com, john.ernberg@actia.se,
	Wood (US), Brian J, ju.o@free.fr, Hildebrand, Stewart,
	thomas.petazzoni@bootlin.com, romain.naour@smile.fr,
	Simek, Michal, romain.naour@gmail.com

Neal,

> -----Original Message-----
> From: Frager, Neal <neal.frager@amd.com> 
> Sent: Monday, August 3, 2026 10:39 AM
> To: Weber (US), Matthew L <matthew.l.weber3@boeing.com>; buildroot@buildroot.org
> Cc: alistair@alistair23.me; Stabellini, Stefano <stefano.stabellini@amd.com>; Erkiaga Elorza, Ibai <ibai.erkiaga-elorza@amd.com>; luca.ceresoli@bootlin.com; Saleab, Micheal <Micheal.Saleab@amd.com>; yann.morin@orange.com; Matthew Weber <mathew.l.weber3@boeing.com>; brandon.maier@collins.com; john.ernberg@actia.se; Wood (US), Brian J <brian.j.wood2@boeing.com>; ju.o@free.fr; Hildebrand, Stewart <Stewart.Hildebrand@amd.com>; thomas.petazzoni@bootlin.com; romain.naour@smile.fr; Simek, Michal <michal.simek@amd.com>; romain.naour@gmail.com
> Subject: RE: [EXTERNAL] [Buildroot] [PATCH v4 2/4] package/xen: add custom version support
>
> EXT email: be mindful of links/attachments.
>
>

[snip]

>
> I know this is just one test case, but the fact that the xen and qemu-xen repos are separated, it should mean that we can mix and match the versions between the two repos.  In other words, if someone builds xen with a cached qemu-xen, it will probably still build and work when the xen package wipes the cached qemu-xen version and replaces it with the buildroot qemu-xen package version.
>
> Before we overthink it and add code that might not be necessary, I propose we wait and see if a user ever does run into a case where replacing the cached qemu-xen version with the buildroot qemu-xen package version causes a problem.

Agree, I think it is OK as is until a specific case helps to clarify.  I did a test with https://downloads.xenproject.org/release/xen/4.20.0/xen-4.20.0.tar.gz and it built after I manually applied the existing 4.21 patches on top.  No issue with the newer QEMU used for the tools build.

BR2_PACKAGE_XEN=y
BR2_PACKAGE_XEN_CUSTOM_TARBALL=y
BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION="https://downloads.xenproject.org/release/xen/4.20.0/xen-4.20.0.tar.gz"
BR2_PACKAGE_XEN_VERSION="custom"
BR2_PACKAGE_XEN_HYPERVISOR=y
BR2_PACKAGE_XEN_TOOLS=y
BR2_PACKAGE_QEMU_XEN=y

Regards,
Matt
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled
  2026-08-03 14:51 [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Neal Frager via buildroot
                   ` (2 preceding siblings ...)
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 4/4] package/xen: add custom git support Neal Frager via buildroot
@ 2026-08-24 10:41 ` Stewart Hildebrand via buildroot
  2026-08-26  5:14   ` Frager, Neal via buildroot
  3 siblings, 1 reply; 14+ messages in thread
From: Stewart Hildebrand via buildroot @ 2026-08-24 10:41 UTC (permalink / raw)
  To: Neal Frager, buildroot
  Cc: alistair, stefano.stabellini, ibai.erkiaga-elorza, luca.ceresoli,
	micheal.saleab, yann.morin, matthew.l.weber3, brandon.maier,
	john.ernberg, brian.j.wood2, ju.o, thomas.petazzoni, romain.naour,
	michal.simek, romain.naour

On 8/3/26 16:51, Neal Frager wrote:
> The 0002-Update-linker-flags.patch assumes that the qemu-xen files are included
> in the xen source tree. However, if BR2_PACKAGE_XEN_TOOLS is not enabled, the
> qemu-xen dependency will not be handled and the patch will fail to apply with
> the following error.
> 
> Fixes: build error below
> Applying 0002-Update-linker-flags.patch using patch:
> patching file tools/Makefile
> Hunk #1 succeeded at 36 (offset -1 lines).
> Hunk #2 succeeded at 185 (offset -8 lines).
> can't find file to patch at input line 76
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |diff --git a/tools/qemu-xen/include/hw/xen/xen_native.h b/tools/qemu-xen/include/hw/xen/xen_native.h
> |index 6bcc83ba..2590904e 100644
> |--- a/tools/qemu-xen/include/hw/xen/xen_native.h
> |+++ b/tools/qemu-xen/include/hw/xen/xen_native.h
> --------------------------
> No file to patch.  Skipping patch.
> 1 out of 1 hunk ignored
> make: *** [package/pkg-generic.mk:239: output/build/xen-4.21.1/.stamp_patched] Error 1
> 
> To avoid making BR2_PACKAGE_XEN_TOOLS a required option, fix the
> 0002-Update-linker-flags.patch so that the part that modifies the qemu-xen
> sources is correctly moved to a patch in the qemu-xen package.
> 
> Move this:
>  #define QEMU_HW_XEN_NATIVE_H
> 
>  #ifdef __XEN_INTERFACE_VERSION__
> -#error In Xen native files, include xen_native.h before other Xen headers
> +#warning In Xen native files, include xen_native.h before other Xen headers
>  #endif
> 
>  /*
> 
> to:
> package/qemu-xen/0001-Update-linker-flags.patch


Can you undefine __XEN_INTERFACE_VERSION__, and drop the xen_native.h hunk
altogether?

diff --git a/package/xen/xen.mk b/package/xen/xen.mk
index 75252d1123b7..bddfdbba38a6 100644
--- a/package/xen/xen.mk
+++ b/package/xen/xen.mk
@@ -40,7 +40,8 @@ XEN_MAKE_ENV = \
 	CROSS_COMPILE=$(TARGET_CROSS) \
 	HOST_EXTRACFLAGS="-Wno-error" \
 	XEN_HAS_CHECKPOLICY=n \
-	$(TARGET_CONFIGURE_OPTS)
+	$(TARGET_CONFIGURE_OPTS) \
+	EXTRA_CFLAGS_QEMU_XEN="-U__XEN_INTERFACE_VERSION__"
 
 ifeq ($(BR2_PACKAGE_XEN_HYPERVISOR),y)
 XEN_MAKE_OPTS += dist-xen
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v4 2/4] package/xen: add custom version support
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 2/4] package/xen: add custom version support Neal Frager via buildroot
  2026-08-03 15:21   ` [Buildroot] [EXTERNAL] " Weber (US), Matthew L via buildroot
@ 2026-08-24 12:41   ` Stewart Hildebrand via buildroot
  2026-08-24 13:15     ` Frager, Neal via buildroot
  1 sibling, 1 reply; 14+ messages in thread
From: Stewart Hildebrand via buildroot @ 2026-08-24 12:41 UTC (permalink / raw)
  To: Neal Frager, buildroot
  Cc: alistair, stefano.stabellini, ibai.erkiaga-elorza, luca.ceresoli,
	micheal.saleab, yann.morin, matthew.l.weber3, Matthew Weber,
	brandon.maier, john.ernberg, brian.j.wood2, ju.o,
	thomas.petazzoni, romain.naour, michal.simek, romain.naour

On 8/3/26 16:51, Neal Frager via buildroot wrote:
> Add the ability to configure specific Xen versions while leaving the default
> version unchanged to avoid breaking any builds already using Xen 4.21.1.
> 
> To test:
> BR2_aarch64=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
> BR2_PACKAGE_XEN=y

Nit: perhaps mention how to test the custom version feature? E.g.:
BR2_PACKAGE_XEN_CUSTOM_VERSION=y
BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE="4.22.0"

> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Tested-by: Matthew Weber <mathew.l.weber3@boeing.com>
> Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
> Reviewed-by: John Ernberg <john.ernberg@actia.se>
With or without the commit message adjustment:
Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v4 2/4] package/xen: add custom version support
  2026-08-24 12:41   ` [Buildroot] " Stewart Hildebrand via buildroot
@ 2026-08-24 13:15     ` Frager, Neal via buildroot
  0 siblings, 0 replies; 14+ messages in thread
From: Frager, Neal via buildroot @ 2026-08-24 13:15 UTC (permalink / raw)
  To: Hildebrand, Stewart, buildroot@buildroot.org
  Cc: alistair@alistair23.me, Stabellini, Stefano, Erkiaga Elorza, Ibai,
	luca.ceresoli@bootlin.com, Saleab, Micheal, yann.morin@orange.com,
	matthew.l.weber3@boeing.com, Matthew Weber,
	brandon.maier@collins.com, john.ernberg@actia.se,
	brian.j.wood2@boeing.com, ju.o@free.fr,
	thomas.petazzoni@bootlin.com, romain.naour@smile.fr,
	Simek, Michal, romain.naour@gmail.com

AMD General

Hi Stewart,

> Add the ability to configure specific Xen versions while leaving the default
> version unchanged to avoid breaking any builds already using Xen 4.21.1.
>
> To test:
> BR2_aarch64=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
> BR2_PACKAGE_XEN=y

> Nit: perhaps mention how to test the custom version feature? E.g.:
> BR2_PACKAGE_XEN_CUSTOM_VERSION=y
> BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE="4.22.0"

If I need to support a v5 for another reason, I will include this.

>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Tested-by: Matthew Weber <mathew.l.weber3@boeing.com>
> Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
> Reviewed-by: John Ernberg <john.ernberg@actia.se>

> With or without the commit message adjustment:
> Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>

Thanks!

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v4 3/4] package/xen: add custom tarball support
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 3/4] package/xen: add custom tarball support Neal Frager via buildroot
@ 2026-08-25  8:37   ` Stewart Hildebrand via buildroot
  2026-08-26  6:19     ` Frager, Neal via buildroot
  0 siblings, 1 reply; 14+ messages in thread
From: Stewart Hildebrand via buildroot @ 2026-08-25  8:37 UTC (permalink / raw)
  To: Neal Frager, buildroot
  Cc: alistair, stefano.stabellini, ibai.erkiaga-elorza, luca.ceresoli,
	micheal.saleab, yann.morin, matthew.l.weber3, Matthew Weber,
	brandon.maier, john.ernberg, brian.j.wood2, ju.o,
	thomas.petazzoni, romain.naour, michal.simek, romain.naour

On 8/3/26 16:51, Neal Frager via buildroot wrote:
> Add support for custom tarballs such as tarballs from vendor Xen trees.
> 
> To test this feature, use the following configs to test latest release of the
> Xilinx Xen vendor tree.
> 
> To test:
> BR2_aarch64=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
> BR2_PACKAGE_XEN=y
> BR2_PACKAGE_XEN_CUSTOM_TARBALL=y
> BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,xen,xlnx-rebase-v4.21_2026.1)/xlnx-rebase-v4.21_2026.1.tar.gz"
> 
> Add to package/xen/xen.hash:
> sha256  03498f51b8daae70c429ace4bde6e2be679b3a0ac28b886c7335c022feef6100  xlnx-rebase-v4.21_2026.1.tar.gz
> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Tested-by: Matthew Weber <mathew.l.weber3@boeing.com>
> Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
> Reviewed-by: John Ernberg <john.ernberg@actia.se>
> 
> ---
> V1->V2:
> - rebased to updated master branch
> - added the line move of the XEN_SITE definition
> V2->V4:
> - merged into new patch series as the second patch
> ---
>  package/xen/Config.in | 11 +++++++++++
>  package/xen/xen.mk    | 19 ++++++++++++++++++-
>  2 files changed, 29 insertions(+), 1 deletion(-)
> 
> diff --git a/package/xen/Config.in b/package/xen/Config.in
> index e50b232f0a..3726504334 100644
> --- a/package/xen/Config.in
> +++ b/package/xen/Config.in
> @@ -23,8 +23,18 @@ config BR2_PACKAGE_XEN_CUSTOM_VERSION
>  	help
>  	  This option allows to use a specific official version
>  
> +config BR2_PACKAGE_XEN_CUSTOM_TARBALL
> +	bool "Custom tarball"
> +
>  endchoice
>  
> +if BR2_PACKAGE_XEN_CUSTOM_TARBALL
> +
> +config BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION
> +	string "URL of custom Xen tarball"
> +
> +endif
> +
>  config BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE
>  	string "Xen version"
>  	depends on BR2_PACKAGE_XEN_CUSTOM_VERSION
> @@ -34,6 +44,7 @@ config BR2_PACKAGE_XEN_VERSION
>  	default "4.21.1"	if BR2_PACKAGE_XEN_LATEST_VERSION
>  	default BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE \
>  				if BR2_PACKAGE_XEN_CUSTOM_VERSION
> +	default "custom"	if BR2_PACKAGE_XEN_CUSTOM_TARBALL
>  
>  config BR2_PACKAGE_XEN_HYPERVISOR
>  	bool "Xen hypervisor"
> diff --git a/package/xen/xen.mk b/package/xen/xen.mk
> index 51d51333ac..81568020d5 100644
> --- a/package/xen/xen.mk
> +++ b/package/xen/xen.mk
> @@ -5,7 +5,6 @@
>  ################################################################################
>  
>  XEN_VERSION = $(call qstrip,$(BR2_PACKAGE_XEN_VERSION))
> -XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION)
>  XEN_SELINUX_MODULES = systemd udev xen
>  XEN_LICENSE = GPL-2.0
>  XEN_LICENSE_FILES = COPYING LICENSES/GPL-2.0
> @@ -19,6 +18,18 @@ XEN_DEPENDENCIES = \
>  	host-python3 \
>  	host-python-distlib
>  
> +ifeq ($(BR2_PACKAGE_XEN_CUSTOM_TARBALL),y)
> +# Handle custom Xen tarballs as specified by the configuration
> +XEN_TARBALL = $(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION))
> +XEN_SITE = $(patsubst %/,%,$(dir $(XEN_TARBALL)))
> +XEN_SOURCE = $(notdir $(XEN_TARBALL))
> +else
> +# Handle stable official Xen versions
> +XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION)
> +endif
> +
> +BR_NO_CHECK_HASH_FOR += $(XEN_SOURCE)


I'm curious why you're adding XEN_SOURCE to BR_NO_CHECK_HASH_FOR, yet it's
still required to manually add the hash to xen.hash?

> +
>  # Calculate XEN_ARCH
>  ifeq ($(ARCH),aarch64)
>  XEN_ARCH = arm64
> @@ -90,4 +101,10 @@ XEN_INSTALL_TARGET = NO
>  XEN_CONF_OPTS += --disable-tools
>  endif
>  
> +ifeq ($(BR2_PACKAGE_XEN_CUSTOM_TARBALL),y)
> +ifeq ($(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION)),)
> +$(error No tarball location specified. Please check BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION)
> +endif
> +endif
> +
>  $(eval $(autotools-package))

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v4 4/4] package/xen: add custom git support
  2026-08-03 14:51 ` [Buildroot] [PATCH v4 4/4] package/xen: add custom git support Neal Frager via buildroot
@ 2026-08-25 14:20   ` Stewart Hildebrand via buildroot
  0 siblings, 0 replies; 14+ messages in thread
From: Stewart Hildebrand via buildroot @ 2026-08-25 14:20 UTC (permalink / raw)
  To: Neal Frager, buildroot
  Cc: alistair, stefano.stabellini, ibai.erkiaga-elorza, luca.ceresoli,
	micheal.saleab, yann.morin, matthew.l.weber3, Matthew Weber,
	brandon.maier, john.ernberg, brian.j.wood2, ju.o,
	thomas.petazzoni, romain.naour, michal.simek, romain.naour

On 8/3/26 16:51, Neal Frager wrote:
> For completeness, add custom git support to match the capabilities of other
> packages such as Linux, uboot or ATF.
> 
> To test this feature, use the following configs to test latest release of the
> Xilinx Xen vendor tree.
> 
> To test:
> BR2_aarch64=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
> BR2_PACKAGE_XEN=y
> BR2_PACKAGE_XEN_CUSTOM_GIT=y
> BR2_PACKAGE_XEN_CUSTOM_REPO_URL="https://github.com/Xilinx/xen.git"
> BR2_PACKAGE_XEN_CUSTOM_REPO_VERSION="791ade0eeae73a851f728cf2c9964dd303cc7d8e"
> 
> Add to package/xen/xen.hash:
> sha256  bb4c156bedcf2e621f8de258fcc3d84a189c522fcf39df8de3865ba53bc10874  xen-791ade0eeae73a851f728cf2c9964dd303cc7d8e-git4.tar.gz
> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Tested-by: Matthew Weber <mathew.l.weber3@boeing.com>
> Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
> Reviewed-by: John Ernberg <john.ernberg@actia.se>


Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
Tested-by: Stewart Hildebrand <stewart.hildebrand@amd.com>

I've tested this on VEK385 with this config:
BR2_PACKAGE_XEN_CUSTOM_GIT=y
BR2_PACKAGE_XEN_CUSTOM_REPO_URL="https://github.com/Xilinx/xen.git"
BR2_PACKAGE_XEN_CUSTOM_REPO_VERSION="xlnx-rebase-v4.21_2026.1"
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled
  2026-08-24 10:41 ` [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Stewart Hildebrand via buildroot
@ 2026-08-26  5:14   ` Frager, Neal via buildroot
  0 siblings, 0 replies; 14+ messages in thread
From: Frager, Neal via buildroot @ 2026-08-26  5:14 UTC (permalink / raw)
  To: Hildebrand, Stewart, buildroot@buildroot.org
  Cc: alistair@alistair23.me, Stabellini, Stefano, Erkiaga Elorza, Ibai,
	luca.ceresoli@bootlin.com, Saleab, Micheal, yann.morin@orange.com,
	matthew.l.weber3@boeing.com, brandon.maier@collins.com,
	john.ernberg@actia.se, brian.j.wood2@boeing.com, ju.o@free.fr,
	thomas.petazzoni@bootlin.com, romain.naour@smile.fr,
	Simek, Michal, romain.naour@gmail.com

AMD General

Hi Stewart,

> The 0002-Update-linker-flags.patch assumes that the qemu-xen files are included
> in the xen source tree. However, if BR2_PACKAGE_XEN_TOOLS is not enabled, the
> qemu-xen dependency will not be handled and the patch will fail to apply with
> the following error.
>
> Fixes: build error below
> Applying 0002-Update-linker-flags.patch using patch:
> patching file tools/Makefile
> Hunk #1 succeeded at 36 (offset -1 lines).
> Hunk #2 succeeded at 185 (offset -8 lines).
> can't find file to patch at input line 76
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |diff --git a/tools/qemu-xen/include/hw/xen/xen_native.h b/tools/qemu-xen/include/hw/xen/xen_native.h
> |index 6bcc83ba..2590904e 100644
> |--- a/tools/qemu-xen/include/hw/xen/xen_native.h
> |+++ b/tools/qemu-xen/include/hw/xen/xen_native.h
> --------------------------
> No file to patch.  Skipping patch.
> 1 out of 1 hunk ignored
> make: *** [package/pkg-generic.mk:239: output/build/xen-4.21.1/.stamp_patched] Error 1
>
> To avoid making BR2_PACKAGE_XEN_TOOLS a required option, fix the
> 0002-Update-linker-flags.patch so that the part that modifies the qemu-xen
> sources is correctly moved to a patch in the qemu-xen package.
>
> Move this:
>  #define QEMU_HW_XEN_NATIVE_H
>
>  #ifdef __XEN_INTERFACE_VERSION__
> -#error In Xen native files, include xen_native.h before other Xen headers
> +#warning In Xen native files, include xen_native.h before other Xen headers
>  #endif
>
>  /*
>
> to:
> package/qemu-xen/0001-Update-linker-flags.patch


> Can you undefine __XEN_INTERFACE_VERSION__, and drop the xen_native.h hunk
> altogether?

> diff --git a/package/xen/xen.mk b/package/xen/xen.mk
> index 75252d1123b7..bddfdbba38a6 100644
> --- a/package/xen/xen.mk
> +++ b/package/xen/xen.mk
> @@ -40,7 +40,8 @@ XEN_MAKE_ENV = \
>       CROSS_COMPILE=$(TARGET_CROSS) \
>       HOST_EXTRACFLAGS="-Wno-error" \
>       XEN_HAS_CHECKPOLICY=n \
> -     $(TARGET_CONFIGURE_OPTS)
> +     $(TARGET_CONFIGURE_OPTS) \
> +     EXTRA_CFLAGS_QEMU_XEN="-U__XEN_INTERFACE_VERSION__"

> ifeq ($(BR2_PACKAGE_XEN_HYPERVISOR),y)
> XEN_MAKE_OPTS += dist-xen

Yes, this is a much better solution!

I will include it in v5.  Thank you!

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Buildroot] [PATCH v4 3/4] package/xen: add custom tarball support
  2026-08-25  8:37   ` Stewart Hildebrand via buildroot
@ 2026-08-26  6:19     ` Frager, Neal via buildroot
  0 siblings, 0 replies; 14+ messages in thread
From: Frager, Neal via buildroot @ 2026-08-26  6:19 UTC (permalink / raw)
  To: Hildebrand, Stewart, buildroot@buildroot.org
  Cc: alistair@alistair23.me, Stabellini, Stefano, Erkiaga Elorza, Ibai,
	luca.ceresoli@bootlin.com, Saleab, Micheal, yann.morin@orange.com,
	matthew.l.weber3@boeing.com, Matthew Weber,
	brandon.maier@collins.com, john.ernberg@actia.se,
	brian.j.wood2@boeing.com, ju.o@free.fr,
	thomas.petazzoni@bootlin.com, romain.naour@smile.fr,
	Simek, Michal, romain.naour@gmail.com

AMD General

Hi Stewart.

> Add support for custom tarballs such as tarballs from vendor Xen trees.
>
> To test this feature, use the following configs to test latest release of the
> Xilinx Xen vendor tree.
>
> To test:
> BR2_aarch64=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
> BR2_PACKAGE_XEN=y
> BR2_PACKAGE_XEN_CUSTOM_TARBALL=y
> BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,xen,xlnx-rebase-v4.21_2026.1)/xlnx-rebase-v4.21_2026.1.tar.gz"
>
> Add to package/xen/xen.hash:
> sha256  03498f51b8daae70c429ace4bde6e2be679b3a0ac28b886c7335c022feef6100  xlnx-rebase-v4.21_2026.1.tar.gz
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Tested-by: Matthew Weber <mathew.l.weber3@boeing.com>
> Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
> Reviewed-by: John Ernberg <john.ernberg@actia.se>
>
> ---
> V1->V2:
> - rebased to updated master branch
> - added the line move of the XEN_SITE definition
> V2->V4:
> - merged into new patch series as the second patch
> ---
>  package/xen/Config.in | 11 +++++++++++
>  package/xen/xen.mk    | 19 ++++++++++++++++++-
>  2 files changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/package/xen/Config.in b/package/xen/Config.in
> index e50b232f0a..3726504334 100644
> --- a/package/xen/Config.in
> +++ b/package/xen/Config.in
> @@ -23,8 +23,18 @@ config BR2_PACKAGE_XEN_CUSTOM_VERSION
>       help
>         This option allows to use a specific official version
>
> +config BR2_PACKAGE_XEN_CUSTOM_TARBALL
> +     bool "Custom tarball"
> +
>  endchoice
>
> +if BR2_PACKAGE_XEN_CUSTOM_TARBALL
> +
> +config BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION
> +     string "URL of custom Xen tarball"
> +
> +endif
> +
>  config BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE
>       string "Xen version"
>       depends on BR2_PACKAGE_XEN_CUSTOM_VERSION
> @@ -34,6 +44,7 @@ config BR2_PACKAGE_XEN_VERSION
>       default "4.21.1"        if BR2_PACKAGE_XEN_LATEST_VERSION
>       default BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE \
>                               if BR2_PACKAGE_XEN_CUSTOM_VERSION
> +     default "custom"        if BR2_PACKAGE_XEN_CUSTOM_TARBALL
>
>  config BR2_PACKAGE_XEN_HYPERVISOR
>       bool "Xen hypervisor"
> diff --git a/package/xen/xen.mk b/package/xen/xen.mk
> index 51d51333ac..81568020d5 100644
> --- a/package/xen/xen.mk
> +++ b/package/xen/xen.mk
> @@ -5,7 +5,6 @@
>  ################################################################################
>
>  XEN_VERSION = $(call qstrip,$(BR2_PACKAGE_XEN_VERSION))
> -XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION)
>  XEN_SELINUX_MODULES = systemd udev xen
>  XEN_LICENSE = GPL-2.0
>  XEN_LICENSE_FILES = COPYING LICENSES/GPL-2.0
> @@ -19,6 +18,18 @@ XEN_DEPENDENCIES = \
>       host-python3 \
>       host-python-distlib
>
> +ifeq ($(BR2_PACKAGE_XEN_CUSTOM_TARBALL),y)
> +# Handle custom Xen tarballs as specified by the configuration
> +XEN_TARBALL = $(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION))
> +XEN_SITE = $(patsubst %/,%,$(dir $(XEN_TARBALL)))
> +XEN_SOURCE = $(notdir $(XEN_TARBALL))
> +else
> +# Handle stable official Xen versions
> +XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION)
> +endif
> +
> +BR_NO_CHECK_HASH_FOR += $(XEN_SOURCE)


> I'm curious why you're adding XEN_SOURCE to BR_NO_CHECK_HASH_FOR, yet it's
> still required to manually add the hash to xen.hash?

You are right.  Thank you for catching this.

I added this early on when developing these patches and forgot to remove it.
It always helps to have another set of eyes reviewing!

Thanks!

> +
>  # Calculate XEN_ARCH
>  ifeq ($(ARCH),aarch64)
>  XEN_ARCH = arm64
> @@ -90,4 +101,10 @@ XEN_INSTALL_TARGET = NO
>  XEN_CONF_OPTS += --disable-tools
>  endif
>
> +ifeq ($(BR2_PACKAGE_XEN_CUSTOM_TARBALL),y)
> +ifeq ($(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION)),)
> +$(error No tarball location specified. Please check BR2_PACKAGE_XEN_CUSTOM_TARBALL_LOCATION)
> +endif
> +endif
> +
>  $(eval $(autotools-package))

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-08-26  6:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 14:51 [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Neal Frager via buildroot
2026-08-03 14:51 ` [Buildroot] [PATCH v4 2/4] package/xen: add custom version support Neal Frager via buildroot
2026-08-03 15:21   ` [Buildroot] [EXTERNAL] " Weber (US), Matthew L via buildroot
2026-08-03 15:39     ` Frager, Neal via buildroot
2026-08-03 16:52       ` Weber (US), Matthew L via buildroot
2026-08-24 12:41   ` [Buildroot] " Stewart Hildebrand via buildroot
2026-08-24 13:15     ` Frager, Neal via buildroot
2026-08-03 14:51 ` [Buildroot] [PATCH v4 3/4] package/xen: add custom tarball support Neal Frager via buildroot
2026-08-25  8:37   ` Stewart Hildebrand via buildroot
2026-08-26  6:19     ` Frager, Neal via buildroot
2026-08-03 14:51 ` [Buildroot] [PATCH v4 4/4] package/xen: add custom git support Neal Frager via buildroot
2026-08-25 14:20   ` Stewart Hildebrand via buildroot
2026-08-24 10:41 ` [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Stewart Hildebrand via buildroot
2026-08-26  5:14   ` Frager, Neal via buildroot

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.