summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2025-11-21 00:08:19 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2025-11-21 00:08:19 -0500
commitd76bc6736cad58a388839a37eac695d01546cc71 (patch)
tree0f945b9a1d6a5cee496f5777e0553e138989ce74
parent19241a745fb91864bd7b78168b0aabc156473329 (diff)
downloadmeta-virtualization-d76bc6736cad58a388839a37eac695d01546cc71.tar.gz
xen: introduce 4.21 recipes
This introduces the 4.21 recipes. Along with the main Xen and Xen-tools updates, we also have the following: - two compile patches for xen and xen-tools that fix issues with the way yajl is pickup in the yocto environment - packaging of the new libxenmanage libraries - fixup of the watchdog system units - updates to the test packaging (new directories) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/xen/files/0001-libxl_nocpuid-fix-build-error.patch41
-rw-r--r--recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch61
-rw-r--r--recipes-extended/xen/xen-tools.inc20
-rw-r--r--recipes-extended/xen/xen-tools_4.21.bb20
-rw-r--r--recipes-extended/xen/xen_4.21.bb19
5 files changed, 161 insertions, 0 deletions
diff --git a/recipes-extended/xen/files/0001-libxl_nocpuid-fix-build-error.patch b/recipes-extended/xen/files/0001-libxl_nocpuid-fix-build-error.patch
new file mode 100644
index 00000000..a6d3e096
--- /dev/null
+++ b/recipes-extended/xen/files/0001-libxl_nocpuid-fix-build-error.patch
@@ -0,0 +1,41 @@
1From 61a061e43c86a78aaddb2efdcefeff29d13812c2 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Thu, 20 Nov 2025 20:57:46 -0500
4Subject: [PATCH] libxl_nocpuid: fix build error
5
6The Yocto build requires an explict include of tye yajl headers to avoid
7this compile error:
8
9e/libnl3 -Wshadow -include poky/build/tmp/work/armv8a-poky-linux/xen-tools/4.21+stable/sources/xen-tools-4.21+stable/tools/libs/light/../../../tools/config.h -c -o libxl_aoutils.o libxl_aoutils.c
10| libxl_nocpuid.c:43:1: error: unknown type name 'yajl_gen_status'
11| 43 | yajl_gen_status libxl_cpuid_policy_list_gen_json(yajl_gen hand,
12| | ^~~~~~~~~~~~~~~
13| libxl_nocpuid.c:43:50: error: unknown type name 'yajl_gen'
14| 43 | yajl_gen_status libxl_cpuid_policy_list_gen_json(yajl_gen hand,
15| | ^~~~~~~~
16| make[6]: *** [poky/build/tmp/work/armv8a-poky-linux/xen-tools/4.21+stable/sources/xen-tools-4.21+stable/tools/libs/light/../../../tools/Rules.mk:178: libxl_nocpuid.o] Error 1
17| make[6]: *** Waiting for unfinished jobs....
18
19Upstream-Status: Inappropriate [oe specific]
20
21Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
22---
23 tools/libs/light/libxl_nocpuid.c | 2 ++
24 1 file changed, 2 insertions(+)
25
26diff --git a/tools/libs/light/libxl_nocpuid.c b/tools/libs/light/libxl_nocpuid.c
27index 0630959e76..00f6ac3233 100644
28--- a/tools/libs/light/libxl_nocpuid.c
29+++ b/tools/libs/light/libxl_nocpuid.c
30@@ -14,6 +14,8 @@
31
32 #include "libxl_internal.h"
33
34+#include <yajl/yajl_gen.h>
35+
36 int libxl__cpuid_policy_is_empty(libxl_cpuid_policy_list *pl)
37 {
38 return 1;
39--
402.39.2
41
diff --git a/recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch b/recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch
new file mode 100644
index 00000000..91767406
--- /dev/null
+++ b/recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch
@@ -0,0 +1,61 @@
1From 9b7072697616ffd19fcefcd3ec48eec481faf4e6 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Thu, 20 Nov 2025 23:22:59 -0500
4Subject: [PATCH] tools/libxl: Fix build with NOCPUID and json-c
5
6The stub file `tools/libs/light/libxl_nocpuid.c`, used when CPUID
7support is disabled via `CONFIG_NOCPUID`, was incomplete. It was
8missing a stub implementation for the `json-c` function
9`libxl_cpuid_policy_list_gen_jso`.
10
11When building with both `CONFIG_NOCPUID` and `HAVE_LIBJSONC` (which
12is preferred by configure over yajl), auto-generated code in
13`_libxl_types.c` would reference `libxl_cpuid_policy_list_gen_jso`,
14leading to a linker error due to the undefined reference.
15
16Additionally, the file was missing a prototype for the `yajl` function
17`libxl_cpuid_policy_list_gen_json`, causing a compiler error
18(`-Werror=missing-prototypes`) in builds that did manage to select
19`yajl`.
20
21This commit fixes both issues by:
221. Adding the missing function prototype for the `yajl` function.
232. Adding the missing stub implementation for the `json-c` function,
24 guarded by `HAVE_LIBJSONC`.
25
26This ensures that xen-tools can be built successfully in all
27configurations related to CPUID and JSON library selection.
28
29Upstream-Status: Inappropriate [oe specific]
30
31Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
32---
33 tools/libs/light/libxl_nocpuid.c | 15 +++++++++++++++
34 1 file changed, 15 insertions(+)
35
36Index: xen-tools-4.21+stable/tools/libs/light/libxl_nocpuid.c
37===================================================================
38--- xen-tools-4.21+stable.orig/tools/libs/light/libxl_nocpuid.c
39+++ xen-tools-4.21+stable/tools/libs/light/libxl_nocpuid.c
40@@ -16,6 +16,21 @@
41
42 #include <yajl/yajl_gen.h>
43
44+#include "libxl_json.h"
45+
46+#include <yajl/yajl_gen.h>
47+
48+yajl_gen_status libxl_cpuid_policy_list_gen_json(yajl_gen hand,
49+ libxl_cpuid_policy_list *pcpuid);
50+
51+#ifdef HAVE_LIBJSONC
52+int libxl_cpuid_policy_list_gen_jso(json_object **jso_r,
53+ libxl_cpuid_policy_list *pcpuid)
54+{
55+ return 0;
56+}
57+#endif
58+
59 int libxl__cpuid_policy_is_empty(libxl_cpuid_policy_list *pl)
60 {
61 return 1;
diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-tools.inc
index a034bc4c..93fcae0b 100644
--- a/recipes-extended/xen/xen-tools.inc
+++ b/recipes-extended/xen/xen-tools.inc
@@ -24,6 +24,7 @@ RDEPENDS:${PN} = "\
24 bash perl xz \ 24 bash perl xz \
25 ${PN}-console \ 25 ${PN}-console \
26 ${PN}-libxenguest \ 26 ${PN}-libxenguest \
27 ${PN}-libxenmanage \
27 ${PN}-libxenlight \ 28 ${PN}-libxenlight \
28 ${PN}-libxenvchan \ 29 ${PN}-libxenvchan \
29 ${PN}-libxenctrl \ 30 ${PN}-libxenctrl \
@@ -176,6 +177,8 @@ PACKAGES = " \
176 ${PN}-libxengnttab-dev \ 177 ${PN}-libxengnttab-dev \
177 ${PN}-libxenguest \ 178 ${PN}-libxenguest \
178 ${PN}-libxenguest-dev \ 179 ${PN}-libxenguest-dev \
180 ${PN}-libxenmanage \
181 ${PN}-libxenmanage-dev \
179 ${PN}-libxenhypfs \ 182 ${PN}-libxenhypfs \
180 ${PN}-libxenhypfs-dev \ 183 ${PN}-libxenhypfs-dev \
181 ${PN}-libxenlight \ 184 ${PN}-libxenlight \
@@ -274,6 +277,7 @@ FILES:${PN}-doc = "\
274 277
275FILES:${PN}-staticdev += "\ 278FILES:${PN}-staticdev += "\
276 ${libdir}/libxenguest.a \ 279 ${libdir}/libxenguest.a \
280 ${libdir}/libxenmanage.a \
277 ${libdir}/libxenlight.a \ 281 ${libdir}/libxenlight.a \
278 ${libdir}/libxenvchan.a \ 282 ${libdir}/libxenvchan.a \
279 ${libdir}/libxenctrl.a \ 283 ${libdir}/libxenctrl.a \
@@ -324,6 +328,13 @@ FILES:${PN}-libxengnttab-dev = " \
324 ${datadir}/pkgconfig/xengnttab.pc \ 328 ${datadir}/pkgconfig/xengnttab.pc \
325 " 329 "
326 330
331FILES:${PN}-libxenmanage = "${libdir}/libxenmanage.so.*"
332FILES:${PN}-libxenmanage-dev = " \
333 ${libdir}/libxenmanage.so \
334 ${libdir}/pkgconfig/xenmanage.pc \
335 ${datadir}/pkgconfig/xenmanage.pc \
336 "
337
327FILES:${PN}-libxenguest = "${libdir}/libxenguest.so.*" 338FILES:${PN}-libxenguest = "${libdir}/libxenguest.so.*"
328FILES:${PN}-libxenguest-dev = " \ 339FILES:${PN}-libxenguest-dev = " \
329 ${libdir}/libxenguest.so \ 340 ${libdir}/libxenguest.so \
@@ -631,6 +642,7 @@ FILES:${PN}-xen-watchdog = "\
631 ${sbindir}/xenwatchdogd \ 642 ${sbindir}/xenwatchdogd \
632 ${sysconfdir}/init.d/xen-watchdog \ 643 ${sysconfdir}/init.d/xen-watchdog \
633 ${systemd_unitdir}/system/xen-watchdog.service \ 644 ${systemd_unitdir}/system/xen-watchdog.service \
645 ${systemd_unitdir}/system-sleep/xen-watchdog-sleep.sh \
634 " 646 "
635 647
636FILES:${PN}-xl = "\ 648FILES:${PN}-xl = "\
@@ -715,6 +727,14 @@ FILES:${PN}-test += "\
715 ${libdir}/xen/bin/test-cpu-policy \ 727 ${libdir}/xen/bin/test-cpu-policy \
716 ${libdir}/xen/bin/test-tsx \ 728 ${libdir}/xen/bin/test-tsx \
717 ${libdir}/xen/bin/test-paging-mempool \ 729 ${libdir}/xen/bin/test-paging-mempool \
730 ${libdir}/xen/tests/test-xenstore \
731 ${libdir}/xen/tests/test-rangeset \
732 ${libdir}/xen/tests/test-resource \
733 ${libdir}/xen/tests/test-domid \
734 ${libdir}/xen/tests/test-paging-mempool \
735 ${libdir}/xen/tests/test_vpci \
736 ${libdir}/xen/tests/test-pdx-offset \
737 ${libdir}/xen/tests/test-pdx-mask \
718 " 738 "
719 739
720# test-xenstore and test-resource currently only exist in 4.16 740# test-xenstore and test-resource currently only exist in 4.16
diff --git a/recipes-extended/xen/xen-tools_4.21.bb b/recipes-extended/xen/xen-tools_4.21.bb
new file mode 100644
index 00000000..7f134280
--- /dev/null
+++ b/recipes-extended/xen/xen-tools_4.21.bb
@@ -0,0 +1,20 @@
1SRCREV ?= "06af9ef22996cecc2024a2e6523cec77a655581e"
2
3XEN_REL ?= "4.21"
4XEN_BRANCH ?= "stable-4.21"
5
6SRC_URI = " \
7 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
8 file://0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch \
9 file://0001-libxl_nocpuid-fix-build-error.patch \
10 file://0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch \
11 "
12
13LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
14
15PV = "${XEN_REL}+stable"
16
17DEFAULT_PREFERENCE ??= "-1"
18
19require xen.inc
20require xen-tools.inc
diff --git a/recipes-extended/xen/xen_4.21.bb b/recipes-extended/xen/xen_4.21.bb
new file mode 100644
index 00000000..d8db7281
--- /dev/null
+++ b/recipes-extended/xen/xen_4.21.bb
@@ -0,0 +1,19 @@
1SRCREV ?= "06af9ef22996cecc2024a2e6523cec77a655581e"
2
3XEN_REL ?= "4.21.0"
4XEN_BRANCH ?= "stable-4.21"
5
6SRC_URI = " \
7 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
8 file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \
9 file://0001-libxl_nocpuid-fix-build-error.patch \
10 "
11
12LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
13
14PV = "${XEN_REL}+stable"
15
16DEFAULT_PREFERENCE ??= "-1"
17
18require xen.inc
19require xen-hypervisor.inc