summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xen/xen-tools.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/xen/xen-tools.inc')
-rw-r--r--recipes-extended/xen/xen-tools.inc35
1 files changed, 29 insertions, 6 deletions
diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-tools.inc
index 5f010a5d..a034bc4c 100644
--- a/recipes-extended/xen/xen-tools.inc
+++ b/recipes-extended/xen/xen-tools.inc
@@ -6,6 +6,20 @@ COMPATIBLE_HOST = 'i686-.*-linux|(x86_64.*).*-linux|aarch64.*-linux|arm-.*-linux
6inherit setuptools3 update-rc.d systemd deploy 6inherit setuptools3 update-rc.d systemd deploy
7require xen-blktap.inc 7require xen-blktap.inc
8 8
9SRC_URI += "file://10-ether.network \
10 file://10-xenbr0.netdev \
11 file://10-xenbr0.network"
12
13VIRT_NETWORKING_FILES = "${UNPACKDIR}/10-ether.network \
14 ${UNPACKDIR}/10-xenbr0.netdev \
15 ${UNPACKDIR}/10-xenbr0.network"
16inherit virt_networking
17
18QEMU_SYSTEM ?= "qemu-system-i386"
19# The qemu-firware package is only available if "vmsep" is in distro features
20QEMU_FIRMWARE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-firmware', '', d)}"
21QEMU_SYSTEM_RDEPENDS ?= "${QEMU_SYSTEM} ${QEMU_FIRMWARE}"
22
9RDEPENDS:${PN} = "\ 23RDEPENDS:${PN} = "\
10 bash perl xz \ 24 bash perl xz \
11 ${PN}-console \ 25 ${PN}-console \
@@ -26,6 +40,8 @@ RDEPENDS:${PN} = "\
26 ${PN}-xenstore \ 40 ${PN}-xenstore \
27 virtual-xenstored \ 41 virtual-xenstored \
28 ${PN}-xl \ 42 ${PN}-xl \
43 ${QEMU_SYSTEM_RDEPENDS} \
44 ${PN}-net-conf \
29 " 45 "
30 46
31RDEPENDS:${PN}-dev = "" 47RDEPENDS:${PN}-dev = ""
@@ -213,6 +229,7 @@ PACKAGES = " \
213 ${PN}-test \ 229 ${PN}-test \
214 ${PN}-xen-vmtrace \ 230 ${PN}-xen-vmtrace \
215 ${PN}-xen-mceinj \ 231 ${PN}-xen-mceinj \
232 ${PN}-xen-9pfsd \
216 " 233 "
217 234
218PROVIDES =+ " \ 235PROVIDES =+ " \
@@ -594,6 +611,12 @@ FILES:${PN}-xenstored = "\
594 ${localstatedir}/lib/xenstored \ 611 ${localstatedir}/lib/xenstored \
595 " 612 "
596 613
614FILES:${PN}-xen-9pfsd = "\
615 ${libdir}/xen/bin/xen-9pfsd \
616 "
617# 9pfsd is only on xen-4.19+
618ALLOW_EMPTY:${PN}-xen-9pfsd = "1"
619
597FILES:${PN}-xentrace = "\ 620FILES:${PN}-xentrace = "\
598 ${bindir}/xentrace \ 621 ${bindir}/xentrace \
599 ${bindir}/xentrace_setsize \ 622 ${bindir}/xentrace_setsize \
@@ -698,14 +721,14 @@ FILES:${PN}-test += "\
698# test-cpu-policy and test-tsx only exist in 4.16 for x86 721# test-cpu-policy and test-tsx only exist in 4.16 for x86
699ALLOW_EMPTY:${PN}-test = "1" 722ALLOW_EMPTY:${PN}-test = "1"
700 723
701FILES:${PN}-xen-mceinj +="\ 724FILES:${PN}-xen-mceinj += "\
702 ${sbindir}/xen-mceinj \ 725 ${sbindir}/xen-mceinj \
703 " 726 "
704 727
705# xen-mceinj is only built for x86 4.16, so allow empty package 728# xen-mceinj is only built for x86 4.16, so allow empty package
706ALLOW_EMPTY:${PN}-xen-mceinj = "1" 729ALLOW_EMPTY:${PN}-xen-mceinj = "1"
707 730
708FILES:${PN}-xen-vmtrace +="\ 731FILES:${PN}-xen-vmtrace += "\
709 ${sbindir}/xen-vmtrace \ 732 ${sbindir}/xen-vmtrace \
710 " 733 "
711 734
@@ -745,7 +768,7 @@ EXTRA_OECONF += " \
745 --with-systemd=${systemd_unitdir}/system \ 768 --with-systemd=${systemd_unitdir}/system \
746 --with-initddir=${INIT_D_DIR} \ 769 --with-initddir=${INIT_D_DIR} \
747 --with-sysconfig-leaf-dir=default \ 770 --with-sysconfig-leaf-dir=default \
748 --with-system-qemu=${bindir}/qemu-system-i386 \ 771 --with-system-qemu=${bindir}/${QEMU_SYSTEM} \
749 " 772 "
750 773
751do_configure() { 774do_configure() {
@@ -807,15 +830,15 @@ do_install() {
807 fi 830 fi
808 831
809 if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then 832 if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then
810 sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \ 833 sed -i 's#ExecStart=.*${QEMU_SYSTEM}\(.*\)$#ExecStart=/usr/bin/${QEMU_SYSTEM}\1#' \
811 ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service 834 ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
812 fi 835 fi
813 836
814 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 837 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
815 rm -f ${D}/${sysconfdir}/init.d/xencommons 838 rm -f ${D}/${sysconfdir}/init.d/xencommons
816 else 839 else
817 # fixup default path to qemu-system-i386 840 # fixup default path to ${QEMU_SYSTEM}
818 sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons 841 sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/${QEMU_SYSTEM}"#' ${D}/etc/init.d/xencommons
819 842
820 # remove the uncondiontally installed systemd service files 843 # remove the uncondiontally installed systemd service files
821 rm -f ${D}/${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service 844 rm -f ${D}/${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service