From 3f2c54b3943247ec2d34a52d825eb01c5d9aa363 Mon Sep 17 00:00:00 2001 From: Adrian Vladu Date: Tue, 17 Sep 2024 13:19:22 +0000 Subject: [PATCH] app-emulation/hv_daemons: update the hv_fcopy to hv_fcopy_uio, add hv_fcopy_uio_daemon See: https://github.com/torvalds/linux/commit/82b0945ce2c2d636d5e893ad50210875c929f257wq Also fix hv tools build for arm64. --- .../files/hv_fcopy_uio_daemon.service | 9 ++++++++ .../hv-daemons/hv-daemons-9999.ebuild | 22 +++++++++---------- 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/app-emulation/hv-daemons/files/hv_fcopy_uio_daemon.service diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/hv-daemons/files/hv_fcopy_uio_daemon.service b/sdk_container/src/third_party/coreos-overlay/app-emulation/hv-daemons/files/hv_fcopy_uio_daemon.service new file mode 100644 index 0000000000..f12c7ea1bd --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/hv-daemons/files/hv_fcopy_uio_daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Hyper-V FCOPY UIO daemon +ConditionPathExists=/sys/bus/vmbus/devices/eb765408-105f-49b6-b4aa-c123b64d17d4/uio + +[Service] +ExecStart=/usr/bin/hv_fcopy_uio_daemon --no-daemon + +[Install] +WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/hv-daemons/hv-daemons-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/hv-daemons/hv-daemons-9999.ebuild index 9b6b44dba9..6aa3861893 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/hv-daemons/hv-daemons-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/hv-daemons/hv-daemons-9999.ebuild @@ -13,20 +13,18 @@ if [[ "${PV}" == 9999 ]]; then fi src_compile() { - # Build hv_vss_daemon, hv_kvp_daemon, hv_fcopy_daemon + # Build hv_vss_daemon, hv_kvp_daemon, hv_fcopy_daemon kmake tools/hv } src_install() { - dobin "${S}/build/tools/hv/hv_fcopy_daemon" - dobin "${S}/build/tools/hv/hv_kvp_daemon" - dobin "${S}/build/tools/hv/hv_vss_daemon" - - systemd_dounit "${FILESDIR}/hv_fcopy_daemon.service" - systemd_dounit "${FILESDIR}/hv_kvp_daemon.service" - systemd_dounit "${FILESDIR}/hv_vss_daemon.service" - - systemd_enable_service "multi-user.target" "hv_fcopy_daemon.service" - systemd_enable_service "multi-user.target" "hv_kvp_daemon.service" - systemd_enable_service "multi-user.target" "hv_vss_daemon.service" + HV_DAEMONS=(hv_vss_daemon hv_kvp_daemon hv_fcopy_daemon hv_fcopy_uio_daemon) + for HV_DAEMON in "$HV_DAEMONS[@]" + do + if [ -f "${S}/build/tools/hv/${HV_DAEMON}" ]; then + dobin "${S}/build/tools/hv/${HV_DAEMON}" + systemd_dounit "${FILESDIR}/${HV_DAEMON}.service" + systemd_enable_service "multi-user.target" "${HV_DAEMON}.service" + fi + done }