diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-10-16 23:31:28 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-11-15 19:50:00 +0000 |
commit | 3af81200a401a52c6d13a055a1d88d4746c02d86 (patch) | |
tree | 57fa475cf1bda27f191f231758f8fa8887df4443 | |
parent | e6b7e24630d5baf0c52473e6f3a96bda10ed2556 (diff) | |
download | meta-virtualization-3af81200a401a52c6d13a055a1d88d4746c02d86.tar.gz |
xen: make qemu-system-* configurable
qemu-system-i386 / firmware were added as RDEPENDS to xen.
While this is typically the right choice, we can make those
values defined by a variable in case other layers want to
override the default choice.
While we are at it, we change other references to qemu-system-i386
to allow a complete switch if the variable is changed.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-extended/xen/xen-tools.inc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-tools.inc index 2459bd1e..35dbb493 100644 --- a/recipes-extended/xen/xen-tools.inc +++ b/recipes-extended/xen/xen-tools.inc | |||
@@ -6,6 +6,9 @@ COMPATIBLE_HOST = 'i686-.*-linux|(x86_64.*).*-linux|aarch64.*-linux|arm-.*-linux | |||
6 | inherit setuptools3 update-rc.d systemd deploy | 6 | inherit setuptools3 update-rc.d systemd deploy |
7 | require xen-blktap.inc | 7 | require xen-blktap.inc |
8 | 8 | ||
9 | QEMU_SYSTEM ?= "qemu-system-i386" | ||
10 | QEMU_SYSTEM_RDEPENDS ?= "${QEMU_SYSTEM} qemu-firmware" | ||
11 | |||
9 | RDEPENDS:${PN} = "\ | 12 | RDEPENDS:${PN} = "\ |
10 | bash perl xz \ | 13 | bash perl xz \ |
11 | ${PN}-console \ | 14 | ${PN}-console \ |
@@ -26,8 +29,7 @@ RDEPENDS:${PN} = "\ | |||
26 | ${PN}-xenstore \ | 29 | ${PN}-xenstore \ |
27 | virtual-xenstored \ | 30 | virtual-xenstored \ |
28 | ${PN}-xl \ | 31 | ${PN}-xl \ |
29 | qemu-system-i386 \ | 32 | ${QEMU_SYSTEM_RDEPENDS} \ |
30 | qemu-firmware \ | ||
31 | " | 33 | " |
32 | 34 | ||
33 | RDEPENDS:${PN}-dev = "" | 35 | RDEPENDS:${PN}-dev = "" |
@@ -754,7 +756,7 @@ EXTRA_OECONF += " \ | |||
754 | --with-systemd=${systemd_unitdir}/system \ | 756 | --with-systemd=${systemd_unitdir}/system \ |
755 | --with-initddir=${INIT_D_DIR} \ | 757 | --with-initddir=${INIT_D_DIR} \ |
756 | --with-sysconfig-leaf-dir=default \ | 758 | --with-sysconfig-leaf-dir=default \ |
757 | --with-system-qemu=${bindir}/qemu-system-i386 \ | 759 | --with-system-qemu=${bindir}/${QEMU_SYSTEM} \ |
758 | " | 760 | " |
759 | 761 | ||
760 | do_configure() { | 762 | do_configure() { |
@@ -816,15 +818,15 @@ do_install() { | |||
816 | fi | 818 | fi |
817 | 819 | ||
818 | if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then | 820 | if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then |
819 | sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \ | 821 | sed -i 's#ExecStart=.*${QEMU_SYSTEM}\(.*\)$#ExecStart=/usr/bin/${QEMU_SYSTEM}\1#' \ |
820 | ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service | 822 | ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service |
821 | fi | 823 | fi |
822 | 824 | ||
823 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 825 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
824 | rm -f ${D}/${sysconfdir}/init.d/xencommons | 826 | rm -f ${D}/${sysconfdir}/init.d/xencommons |
825 | else | 827 | else |
826 | # fixup default path to qemu-system-i386 | 828 | # fixup default path to ${QEMU_SYSTEM} |
827 | sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons | 829 | sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/${QEMU_SYSTEM}"#' ${D}/etc/init.d/xencommons |
828 | 830 | ||
829 | # remove the uncondiontally installed systemd service files | 831 | # remove the uncondiontally installed systemd service files |
830 | rm -f ${D}/${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service | 832 | rm -f ${D}/${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service |