package/xen: add custom version support
PATCH v6 1/3 package/xen: add custom version support
Add the ability to configure specific Xen versions while leaving the default version unchanged to avoid breaking any builds already using Xen 4.22.0.
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_VERSION=y BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE="4.21.2"
Add to package/xen/xen.hash:
sha256 9c5c2ad0b4ab86ddd378f60ecc5b1ed53d36b436249ba27c86831003e1281fa3 xen-4.21.2.tar.gz
Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
---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 V4->V5:
- added custom version test to commit message V5->V6:
- rebased to master
--- package/xen/Config.in | 25 +++++++++++++++++++++++++ package/xen/xen.mk | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-)
package/xen/Config.in +25 -0
@@ -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.22.0" + +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.22.0" 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
package/xen/xen.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -XEN_VERSION = 4.22.0 +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
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 2/3 package/xen: add custom tarball support
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
Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
---V1->V2:
- rebased to updated master branch
- added the line move of the XEN_SITE definitionV2->V4:
- merged into new patch series as the third patchV4->V5:
- removed unnecessary BR_NO_CHECK_HASH_FORV5->V6:
- rebased to master
--- package/xen/Config.in | 11 +++++++++++ package/xen/xen.mk | 17 ++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-)
package/xen/Config.in +11 -0
@@ -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.22.0" 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"
package/xen/xen.mk +16 -1
@@ -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,16 @@ 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 + # Calculate XEN_ARCH ifeq ($(ARCH),aarch64) XEN_ARCH = arm64
@@ -108,4 +117,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))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 3/3 package/xen: add custom git support
In reply to Neal Frager via buildrootFor 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="xlnx-rebase-v4.21_2026.1"
Add to package/xen/xen.hash:
sha256 e8016e81627fe3b4fca5463723428606cd3750c7fd76a3cfaa0b0d0e7cd9b32b xen-xlnx-rebase-v4.21_2026.1-git4.tar.gz
Prior test details: https://gist.github.com/matthew-l-weber/c17f14a3793ccee440a383e4177ff3db
Tested on VEK385 Evaluation Board
---V1->V2:
- rebased to updated master branchV2->V4:
- merged into new patch series as the fourth patch V4->V5:
- updated commit message to use release tag name for test
- added error message in case no version specified V5->V6:
- rebased to master
--- package/xen/Config.in | 18 ++++++++++++++++++ package/xen/xen.mk | 12 ++++++++++++ 2 files changed, 30 insertions(+)
package/xen/Config.in +18 -0
@@ -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"
package/xen/xen.mk +12 -0
@@ -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)
@@ -123,4 +126,13 @@ $(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 +ifeq ($(call qstrip,$(BR2_PACKAGE_XEN_CUSTOM_REPO_VERSION)),) +$(error No version specified. Please check BR2_PACKAGE_XEN_CUSTOM_REPO_VERSION) +endif +endif + $(eval $(autotools-package))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Neal and all,
(replying to this first patch, but the comments apply to the whole series)
Quoted 2 lines · Neal Frager via buildroot
Add the ability to configure specific Xen versions while leaving the default version unchanged to avoid breaking any builds already using Xen 4.22.0.
We brought this topic to the Buildroot developers meeting this week-end after ELC. While there was no strong argument against merging this, there wasn't any in favor either.
What was agreed upon is that it misses a justification for doing so, ie. what is the actual reason prompting for this feature ? An alternative could be to package these alternative Xen trees in a br2-external, or to use OVERRIDE_SRCDIR but there might be a good reason for not doing that ?
Moreover, Xen has a track record of regularly breaking the build and requiring manual tweaks to xen.mk. For example, since Xen 4.20 no longer bundles qemu-xen in its release tarball, the bump to 4.21.1 required adding a separate qemu-xen package to avoid downloading submodules from the internet during the build.
Quoted 11 lines
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_VERSION=y BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE="4.21.2"Add to package/xen/xen.hash:
sha2569c5c2ad0b4ab86ddd378f60ecc5b1ed53d36b436249ba27c86831003e1281fa3xen-4.21.2.tar.gz
Additionally, all your patches mention manually editing xen.hash to add a new entry, which somewhat defeats the purpose of the custom version: users could as well edit xen.mk to chose an alternate version.
Finally, in the discussion of v4 [1] Matt touched on qemu-xen that could fall out of sync with Xen itself, and I would stress that this is even more of a problem if selecting an older version, predating the rework for Xen 4.21.
Kind regards,
Titouan
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Titouan,
Quoted 8 lines · Titouan Christophe
Hello Neal and all,
(replying to this first patch, but the comments apply to the whole series)
Quoted 2 lines · Neal Frager via buildroot
Add the ability to configure specific Xen versions while leaving the default version unchanged to avoid breaking any builds already using Xen 4.22.0.
Quoted 8 lines
We brought this topic to the Buildroot developers meeting this week-end after ELC. While there was no strong argument against merging this, there wasn't any in favor either.
What was agreed upon is that it misses a justification for doing so, ie. what is the actual reason prompting for this feature ? An alternative could be to package these alternative Xen trees in a br2-external, or to use
OVERRIDE_SRCDIRbut there might be a good reason for not doing that ?
Our use case is that we receive a Xen git-tree from a 3rd party with additional features implemented that are not available upstream yet.
We currently have our own Xen recipe which we need to maintain which is a copy of this one, replacing the download bits.
We're not using the qemu parts however.
Quoted 16 lines
Moreover, Xen has a track record of regularly breaking the build and requiring manual tweaks to xen.mk. For example, since Xen 4.20 no longer bundles qemu-xen in its release tarball, the bump to 4.21.1 required adding a separate qemu-xen package to avoid downloading submodules from the internet during the build.
Quoted 9 lines
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_VERSION=y BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE="4.21.2"
Quoted 6 lines
Quoted 2 lines
Add to package/xen/xen.hash:
sha2569c5c2ad0b4ab86ddd378f60ecc5b1ed53d36b436249ba27c86831003e1281fa3xen-4.21.2.tar.gzAdditionally, all your patches mention manually editing xen.hash to add a new entry, which somewhat defeats the purpose of the custom version:
users could as well edit xen.mk to chose an alternate version.
That looks like an artifact to me, it also works to place the hash file in the global patch dir.
Best regards // John Ernberg
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
AMD General
Hi Titouan,
Quoted 18 lines
Hello Neal and all,
(replying to this first patch, but the comments apply to the whole series)
Quoted 3 lines · Neal Frager via buildroot
Add the ability to configure specific Xen versions while leaving the default
version unchanged to avoid breaking any builds already using Xen 4.22.0.We brought this topic to the Buildroot developers meeting this week-end after ELC. While there was no strong argument against merging this, there wasn't any in favor either.
What was agreed upon is that it misses a justification for doing so, ie. what is the actual reason prompting for this feature ? An alternative could be to package these alternative Xen trees in a br2-external, or to use
OVERRIDE_SRCDIRbut there might be a good reason for not doing that ?
Quoted 7 lines
Our use case is that we receive a Xen git-tree from a 3rd party with additional features implemented that are not available upstream yet.
We currently have our own Xen recipe which we need to maintain which is a copy of this one, replacing the download bits.
We're not using the qemu parts however.
I confirm that this is the same use case for us. We have some nice features such as cache coloring that are in the xilinx/xen tree, but not in the upstream xen. Being able to use the xilinx/xen tree would be beneficial.
Also, I think the qemu is not a requirement for most customers, as you can run xen on hardware without building the qemu and all the tools.
Quoted 21 lines
Moreover, Xen has a track record of regularly breaking the build and requiring manual tweaks to xen.mk. For example, since Xen 4.20 no longer bundles qemu-xen in its release tarball, the bump to 4.21.1 required adding a separate qemu-xen package to avoid downloading submodules from the internet during the build.
Quoted 9 lines
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_VERSION=y BR2_PACKAGE_XEN_CUSTOM_VERSION_VALUE="4.21.2"Quoted 4 lines
Add to package/xen/xen.hash:
sha2569c5c2ad0b4ab86ddd378f60ecc5b1ed53d36b436249ba27c86831003e1281fa3xen-4.21.2.tar.gz
Quoted 6 lines
Additionally, all your patches mention manually editing xen.hash to add a new entry, which somewhat defeats the purpose of the custom version:
users could as well edit xen.mk to chose an alternate version.That looks like an artifact to me, it also works to place the hash file in the global patch dir.
Yes, the only reason why I put the hashes in the commit message was so the reviewers could easily test each patch. Adding hashes is something a user will always need to do for any package if they change to a version that is not a buildroot default.
If you want, I could add the hash for the latest Xilinx 2026.1 release tag to the xen.hash file as part of the patch set. Then users could switch to the Xilinx xen tree latest version without needing to add a hash for it.
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot