diff options
| -rw-r--r-- | recipes-extended/xen/files/0001-libxl_nocpuid-fix-build-error.patch | 41 | ||||
| -rw-r--r-- | recipes-extended/xen/files/0001-tools-libxl-Fix-build-with-NOCPUID-and-json-c.patch | 61 | ||||
| -rw-r--r-- | recipes-extended/xen/xen-tools.inc | 20 | ||||
| -rw-r--r-- | recipes-extended/xen/xen-tools_4.21.bb | 20 | ||||
| -rw-r--r-- | recipes-extended/xen/xen_4.21.bb | 19 |
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 @@ | |||
| 1 | From 61a061e43c86a78aaddb2efdcefeff29d13812c2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Thu, 20 Nov 2025 20:57:46 -0500 | ||
| 4 | Subject: [PATCH] libxl_nocpuid: fix build error | ||
| 5 | |||
| 6 | The Yocto build requires an explict include of tye yajl headers to avoid | ||
| 7 | this compile error: | ||
| 8 | |||
| 9 | e/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 | |||
| 19 | Upstream-Status: Inappropriate [oe specific] | ||
| 20 | |||
| 21 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 22 | --- | ||
| 23 | tools/libs/light/libxl_nocpuid.c | 2 ++ | ||
| 24 | 1 file changed, 2 insertions(+) | ||
| 25 | |||
| 26 | diff --git a/tools/libs/light/libxl_nocpuid.c b/tools/libs/light/libxl_nocpuid.c | ||
| 27 | index 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 | -- | ||
| 40 | 2.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 @@ | |||
| 1 | From 9b7072697616ffd19fcefcd3ec48eec481faf4e6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Thu, 20 Nov 2025 23:22:59 -0500 | ||
| 4 | Subject: [PATCH] tools/libxl: Fix build with NOCPUID and json-c | ||
| 5 | |||
| 6 | The stub file `tools/libs/light/libxl_nocpuid.c`, used when CPUID | ||
| 7 | support is disabled via `CONFIG_NOCPUID`, was incomplete. It was | ||
| 8 | missing a stub implementation for the `json-c` function | ||
| 9 | `libxl_cpuid_policy_list_gen_jso`. | ||
| 10 | |||
| 11 | When building with both `CONFIG_NOCPUID` and `HAVE_LIBJSONC` (which | ||
| 12 | is preferred by configure over yajl), auto-generated code in | ||
| 13 | `_libxl_types.c` would reference `libxl_cpuid_policy_list_gen_jso`, | ||
| 14 | leading to a linker error due to the undefined reference. | ||
| 15 | |||
| 16 | Additionally, 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 | |||
| 21 | This commit fixes both issues by: | ||
| 22 | 1. Adding the missing function prototype for the `yajl` function. | ||
| 23 | 2. Adding the missing stub implementation for the `json-c` function, | ||
| 24 | guarded by `HAVE_LIBJSONC`. | ||
| 25 | |||
| 26 | This ensures that xen-tools can be built successfully in all | ||
| 27 | configurations related to CPUID and JSON library selection. | ||
| 28 | |||
| 29 | Upstream-Status: Inappropriate [oe specific] | ||
| 30 | |||
| 31 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 32 | --- | ||
| 33 | tools/libs/light/libxl_nocpuid.c | 15 +++++++++++++++ | ||
| 34 | 1 file changed, 15 insertions(+) | ||
| 35 | |||
| 36 | Index: 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 | ||
| 275 | FILES:${PN}-staticdev += "\ | 278 | FILES:${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 | ||
| 331 | FILES:${PN}-libxenmanage = "${libdir}/libxenmanage.so.*" | ||
| 332 | FILES:${PN}-libxenmanage-dev = " \ | ||
| 333 | ${libdir}/libxenmanage.so \ | ||
| 334 | ${libdir}/pkgconfig/xenmanage.pc \ | ||
| 335 | ${datadir}/pkgconfig/xenmanage.pc \ | ||
| 336 | " | ||
| 337 | |||
| 327 | FILES:${PN}-libxenguest = "${libdir}/libxenguest.so.*" | 338 | FILES:${PN}-libxenguest = "${libdir}/libxenguest.so.*" |
| 328 | FILES:${PN}-libxenguest-dev = " \ | 339 | FILES:${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 | ||
| 636 | FILES:${PN}-xl = "\ | 648 | FILES:${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 @@ | |||
| 1 | SRCREV ?= "06af9ef22996cecc2024a2e6523cec77a655581e" | ||
| 2 | |||
| 3 | XEN_REL ?= "4.21" | ||
| 4 | XEN_BRANCH ?= "stable-4.21" | ||
| 5 | |||
| 6 | SRC_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 | |||
| 13 | LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9" | ||
| 14 | |||
| 15 | PV = "${XEN_REL}+stable" | ||
| 16 | |||
| 17 | DEFAULT_PREFERENCE ??= "-1" | ||
| 18 | |||
| 19 | require xen.inc | ||
| 20 | require 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 @@ | |||
| 1 | SRCREV ?= "06af9ef22996cecc2024a2e6523cec77a655581e" | ||
| 2 | |||
| 3 | XEN_REL ?= "4.21.0" | ||
| 4 | XEN_BRANCH ?= "stable-4.21" | ||
| 5 | |||
| 6 | SRC_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 | |||
| 12 | LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9" | ||
| 13 | |||
| 14 | PV = "${XEN_REL}+stable" | ||
| 15 | |||
| 16 | DEFAULT_PREFERENCE ??= "-1" | ||
| 17 | |||
| 18 | require xen.inc | ||
| 19 | require xen-hypervisor.inc | ||
