diff options
| author | Christopher Clark <christopher.w.clark@gmail.com> | 2021-04-16 11:41:35 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-04-18 20:19:28 -0400 |
| commit | 5f51e806b8f56c30eb160c21d241c73268a4dedf (patch) | |
| tree | e6e36b6e1846fc6a51cfa15b2c1456983115cd32 | |
| parent | e9bda61a3dac0f98943ec6193f7d3e37a7779c6c (diff) | |
| download | meta-virtualization-5f51e806b8f56c30eb160c21d241c73268a4dedf.tar.gz | |
xtf: introduce recipe for the Xen Test Framework
Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-extended/xen/xtf_git.bb | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/recipes-extended/xen/xtf_git.bb b/recipes-extended/xen/xtf_git.bb new file mode 100644 index 00000000..db086435 --- /dev/null +++ b/recipes-extended/xen/xtf_git.bb | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | SUMMARY = "Xen Test Framework" | ||
| 2 | HOMEPAGE = "https://xenbits.xenproject.org/docs/xtf/" | ||
| 3 | LICENSE = "BSD-2-Clause" | ||
| 4 | |||
| 5 | # For additional reference on XTF, please see: | ||
| 6 | # https://static.sched.com/hosted_files/xendeveloperanddesignsummit2017/79/xtf.pdf | ||
| 7 | |||
| 8 | SRC_URI = "git://xenbits.xen.org/xtf" | ||
| 9 | SRCREV = "8ab15139728a8efd3ebbb60beb16a958a6a93fa1" | ||
| 10 | |||
| 11 | COMPATIBLE_HOST = '(x86_64.*).*-linux' | ||
| 12 | |||
| 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=a5680865974e05cf0510615ee1d745d8" | ||
| 14 | |||
| 15 | PV = "0+git${SRCPV}" | ||
| 16 | |||
| 17 | S = "${WORKDIR}/git" | ||
| 18 | |||
| 19 | inherit python3native | ||
| 20 | |||
| 21 | # To build 32-bit binaries some files from 32-bit glibc are needed. | ||
| 22 | # To enable multilib, please add the following to your local.conf -: | ||
| 23 | # | ||
| 24 | # require conf/multilib.conf | ||
| 25 | # MULTILIBS = "multilib:lib32" | ||
| 26 | # DEFAULTTUNE_virtclass-multilib-lib32 = "x86" | ||
| 27 | |||
| 28 | # Use this multilib prefix for x86 32-bit to match local.conf: | ||
| 29 | MLPREFIX32 = "lib32-" | ||
| 30 | # Add the multilib 32-bit glibc to DEPENDS only when necessary: | ||
| 31 | # The DEPENDS on a multilib 32-bit glibc is only added when target is x86-64 | ||
| 32 | # This x86-64 override is never intended for native use, so clear that. | ||
| 33 | GLIBC32 = "" | ||
| 34 | GLIBC32_x86-64 = "${MLPREFIX32}glibc" | ||
| 35 | GLIBC32_class-native = "" | ||
| 36 | DEPENDS += "${GLIBC32}" | ||
| 37 | |||
| 38 | PACKAGES = "${PN}" | ||
| 39 | |||
| 40 | FILES_${PN} = " \ | ||
| 41 | ${libexecdir}/* \ | ||
| 42 | " | ||
| 43 | |||
| 44 | RDEPENDS_${PN} = " \ | ||
| 45 | xen-tools-xl \ | ||
| 46 | python3 \ | ||
| 47 | " | ||
| 48 | |||
| 49 | do_compile() { | ||
| 50 | oe_runmake CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} -I${RECIPE_SYSROOT}/../${MLPREFIX32}recipe-sysroot/usr/include" \ | ||
| 51 | CPP="${CPP}" \ | ||
| 52 | OBJCOPY="${OBJCOPY}" \ | ||
| 53 | PYTHON="${PYTHON}" | ||
| 54 | # switch the shebang to python3 | ||
| 55 | sed 's,^\(#!/usr/bin/env python\)$,\13,' -i "${B}/xtf-runner" | ||
| 56 | } | ||
| 57 | |||
| 58 | do_install() { | ||
| 59 | # packaging: rpmbuild can package the XTF test unikernels when they are | ||
| 60 | # installed as non-executable files (they are run within VMs anyway). | ||
| 61 | oe_runmake install DESTDIR="${D}" \ | ||
| 62 | xtfdir="${libexecdir}/${BPN}" \ | ||
| 63 | PYTHON="${PYTHON}" \ | ||
| 64 | INSTALL_PROGRAM="install -m 644 -p" | ||
| 65 | install -m 755 -p "${B}/xtf-runner" "${D}${libexecdir}/${BPN}/xtf-runner" | ||
| 66 | } | ||
| 67 | |||
| 68 | INSANE_SKIP = "arch" | ||
| 69 | # xen-tools-xl is a runtime but not build time dependency | ||
| 70 | INSANE_SKIP_${PN} = "build-deps" | ||
| 71 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 72 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
