From 99cd8e12d168039bd310c1768a41885ba2e0da2c Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Thu, 25 Feb 2021 13:30:51 -0500 Subject: [PATCH] snap: Update for QEMU 5.2.0 QEMU 5.2.0 needs ninja-build package installed on the build environment. The default-configs were copied to $QEMU_SRC/default-configs but that does take any effect, so instead it is now copied to $QEMU_SRC/default-configs/devices and the configs for i386 were updated. Also it had to change some arguments being passed to configure as Meson was failing due inconsistent paths: ./meson.build:1:0: ERROR: The value of the 'libdir' option is '/usr/lib/qemu' which must be a subdir of the prefix '/snap/kata-containers/current/usr'. Note that if you pass a relative path, it is assumed to be a subdir of prefix. Depends-on: github.com/kata-containers/tests#3276 Signed-off-by: Wainer dos Santos Moschetta --- snap/snapcraft.yaml | 13 ++++++------- .../packaging/qemu/default-configs/i386-softmmu.mak | 2 ++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 71f8cf221f00..10f0a68fbb23 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -228,6 +228,7 @@ parts: - libffi-dev - libmount-dev - libselinux1-dev + - ninja-build override-build: | yq=${SNAPCRAFT_STAGE}/yq export GOPATH=${SNAPCRAFT_STAGE}/gopath @@ -275,16 +276,14 @@ parts: configure_hypervisor=${kata_dir}/tools/packaging/scripts/configure-hypervisor.sh chmod +x ${configure_hypervisor} - # static build - echo "$(${configure_hypervisor} -s qemu) \ - --disable-rbd - --prefix=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr \ - --datadir=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr/share \ - --libexecdir=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr/libexec/qemu" \ + # static build. The --prefix, --libdir, --libexecdir, --datadir arguments are + # based on PREFIX and set by configure-hypervisor.sh + echo "$(PREFIX=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr ${configure_hypervisor} -s qemu) \ + --disable-rbd " \ | xargs ./configure # Copy QEMU configurations (Kconfigs) - cp -a ${kata_dir}/tools/packaging/qemu/default-configs/* default-configs/ + cp -a ${kata_dir}/tools/packaging/qemu/default-configs/* default-configs/devices/ # build and install make -j $(($(nproc)-1)) diff --git a/tools/packaging/qemu/default-configs/i386-softmmu.mak b/tools/packaging/qemu/default-configs/i386-softmmu.mak index bcdd1780138c..8f13f26b88d5 100644 --- a/tools/packaging/qemu/default-configs/i386-softmmu.mak +++ b/tools/packaging/qemu/default-configs/i386-softmmu.mak @@ -24,6 +24,7 @@ CONFIG_SD=n # Automotive CONFIG_CAN_BUS=n +CONFIG_CAN_CTUCANFD=n CONFIG_CAN_PCI=n CONFIG_CAN_SJA1000=n @@ -56,6 +57,7 @@ CONFIG_USB_TABLET_WACOM=n CONFIG_USB_UHCI=n CONFIG_USB_XHCI=n CONFIG_USB_XHCI_NEC=n +CONFIG_USB_XHCI_PCI=n # ISA CONFIG_IDE_ISA=n