From nobody Mon Feb 9 10:12:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576158253; cv=none; d=zohomail.com; s=zohoarc; b=d7K9FolhJo66lsrj4tWz8F8ylBoC9a5ZwE+AjXMp6qtGsK9dxIVI5fsdEIVQQO0MKx9pTcC4+c6TAWoLQrunibWJOHf1EJlesO2F3CzUHoM9gGVz+YW2zOvErZYgyIM5GvO3JDfHeN2HeMGlQHFB96DgjHLAQ816HoxcWilBk9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576158253; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Yg3Elyi3GPZ8zbUi+6JN6FhWHgdSQqQQaYWdguPJkKE=; b=KoMYszALcX2R7DTDq1tiXkgQNJYyIGCZH/drzsBW+XrzxDiEsl+wkxgls2dJoCa6iexMGxG/TOnpA7HcWVTbry13On+jnuQcAGvFZqT6e9gd3OMHuTGLGm7RpC2lJZqyqc9Edj/m0PGIY8llgx+uM1FQX3Q/L6OjhUGedDPAfII= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576158253597310.41210258567446; Thu, 12 Dec 2019 05:44:13 -0800 (PST) Received: from localhost ([::1]:59494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifOlI-00009Y-80 for importer@patchew.org; Thu, 12 Dec 2019 08:44:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40070) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifNyu-0004M9-Iv for qemu-devel@nongnu.org; Thu, 12 Dec 2019 07:54:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifNys-0007oG-NN for qemu-devel@nongnu.org; Thu, 12 Dec 2019 07:54:12 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:46478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifNys-0007ma-DA for qemu-devel@nongnu.org; Thu, 12 Dec 2019 07:54:10 -0500 Received: by mail-wr1-x432.google.com with SMTP id z7so2570167wrl.13 for ; Thu, 12 Dec 2019 04:54:10 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id n189sm5193825wme.33.2019.12.12.04.54.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2019 04:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yg3Elyi3GPZ8zbUi+6JN6FhWHgdSQqQQaYWdguPJkKE=; b=u3eRDAxsXGtI7/3t2JhiWO88FGpBTaOIz+yGvErCQqyb8KFEpvOWAjNJjq61ye94CH eXk6gdmp+oBE0APzDqsCeaLFwn8z65IxKDSV2V4+mYbpiH5jTwiCoj+VvC1UknHB+bsN HavnEiQYlkYdMMbbtjA154OwEeGHuAP+CMkFtxRGS4GPUALQYPa4f0iWls4m0q3j6iNt Y/Nn5eGG9YC0a96uInPUPYiNCkxrelN3KwEr6p9OnA37DpINBtY03cf7B8pP9vDFLFs1 /4wLSiZoj4DgZL54BiVQuMxUxBycOeokd7F1maGDjfezuK8c3OmgsFEA/hUNiJ5zcVU9 +M0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Yg3Elyi3GPZ8zbUi+6JN6FhWHgdSQqQQaYWdguPJkKE=; b=LA3iMVX/cPk8XIJ4t6zoIHTuC7uVBmTeG/5+KgY5Z4awsXX+6s1/Kj+U0w/tj0ZMjW 6lmsowCv1RbUKU0PUpJLINwMkUdkXl7Fq+CglE57LHnbgFyx7dpX7chbHBvi8i97g7HL HH4Or1pWDspVS9dyX6zMvsx9lcn+xTLBqaFgTBjAZ2ojzo6FBP3FimF9UoBfVNdJ6DTK YkDXdEHJKStAjkN1yB6mmHQv8dZ3yh3rMobDUBYF5PwGXatZzyy3RtRLg2UdYnz2MGV+ QgfPRWNtlEahEdQx3h+u0BUkCTrA9c5YPbOXBisN9NVk5k4e+FkQmyOHGXHpT9SADW9/ 1B3w== X-Gm-Message-State: APjAAAXf9iX5g7Pzyjvhl2/Cpa68OjfH0foqSb1s/qgFuMdXLKsS/bkh ygnYg61ZOs+RMFZzNZ0rORqdYWhz X-Google-Smtp-Source: APXvYqwl93pb8GFvX9aN9s+30WXVX7tFKBfAD4UW80VndjO24scT3hxO+u0BEU59W+T8mBLOBCvt7g== X-Received: by 2002:a5d:5273:: with SMTP id l19mr6276768wrc.175.1576155249143; Thu, 12 Dec 2019 04:54:09 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 071/132] meson: convert hw/usb Date: Thu, 12 Dec 2019 13:51:55 +0100 Message-Id: <1576155176-2464-72-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576155176-2464-1-git-send-email-pbonzini@redhat.com> References: <1576155176-2464-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau --- Makefile.target | 1 + hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/usb/Makefile.objs | 62 ------------------------------------------------= ---- hw/usb/meson.build | 54 +++++++++++++++++++++++++++++++++++++++++++++ meson.build | 15 +++++++++++++ 6 files changed, 71 insertions(+), 63 deletions(-) delete mode 100644 hw/usb/Makefile.objs create mode 100644 hw/usb/meson.build diff --git a/Makefile.target b/Makefile.target index c2fcb22..a41e4e5 100644 --- a/Makefile.target +++ b/Makefile.target @@ -167,6 +167,7 @@ endif LIBS :=3D $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) = $(SECCOMP_LIBS) LIBS :=3D $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS) LIBS :=3D $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS) +LIBS :=3D $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS) =20 # Hardware support ifeq ($(TARGET_NAME), sparc64) diff --git a/hw/Makefile.objs b/hw/Makefile.objs index d0c817b..df804a0 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -30,7 +30,6 @@ devices-dirs-y +=3D sd/ devices-dirs-y +=3D ssi/ devices-dirs-y +=3D timer/ devices-dirs-$(CONFIG_TPM) +=3D tpm/ -devices-dirs-y +=3D usb/ endif =20 common-obj-y +=3D $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index 16c0abd..43797f9 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -2,6 +2,7 @@ subdir('core') subdir('mem') subdir('semihosting') subdir('smbios') +subdir('usb') subdir('vfio') subdir('virtio') subdir('watchdog') diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs deleted file mode 100644 index 303ac08..0000000 --- a/hw/usb/Makefile.objs +++ /dev/null @@ -1,62 +0,0 @@ -# usb subsystem core -common-obj-y +=3D core.o combined-packet.o bus.o libhw.o -common-obj-$(CONFIG_USB) +=3D desc.o desc-msos.o - -# usb host adapters -common-obj-$(CONFIG_USB_UHCI) +=3D hcd-uhci.o -common-obj-$(CONFIG_USB_OHCI) +=3D hcd-ohci.o -common-obj-$(CONFIG_USB_OHCI_PCI) +=3D hcd-ohci-pci.o -common-obj-$(CONFIG_USB_EHCI) +=3D hcd-ehci.o -common-obj-$(CONFIG_USB_EHCI_PCI) +=3D hcd-ehci-pci.o -common-obj-$(CONFIG_USB_EHCI_SYSBUS) +=3D hcd-ehci-sysbus.o -common-obj-$(CONFIG_USB_XHCI) +=3D hcd-xhci.o -common-obj-$(CONFIG_USB_XHCI_NEC) +=3D hcd-xhci-nec.o -common-obj-$(CONFIG_USB_MUSB) +=3D hcd-musb.o - -obj-$(CONFIG_TUSB6010) +=3D tusb6010.o -obj-$(CONFIG_IMX) +=3D chipidea.o - -# emulated usb devices -common-obj-$(CONFIG_USB) +=3D dev-hub.o -common-obj-$(CONFIG_USB) +=3D dev-hid.o -common-obj-$(CONFIG_USB_TABLET_WACOM) +=3D dev-wacom.o -common-obj-$(CONFIG_USB_STORAGE_BOT) +=3D dev-storage.o -common-obj-$(CONFIG_USB_STORAGE_UAS) +=3D dev-uas.o -common-obj-$(CONFIG_USB_AUDIO) +=3D dev-audio.o -common-obj-$(CONFIG_USB_SERIAL) +=3D dev-serial.o -common-obj-$(CONFIG_USB_NETWORK) +=3D dev-network.o -common-obj-$(CONFIG_USB_BLUETOOTH) +=3D dev-bluetooth.o - -ifeq ($(CONFIG_USB_SMARTCARD),y) -common-obj-y +=3D dev-smartcard-reader.o -common-obj-$(CONFIG_SMARTCARD) +=3D smartcard.mo -smartcard.mo-objs :=3D ccid-card-passthru.o ccid-card-emulated.o -smartcard.mo-cflags :=3D $(SMARTCARD_CFLAGS) -smartcard.mo-libs :=3D $(SMARTCARD_LIBS) -endif - -ifeq ($(CONFIG_POSIX),y) -common-obj-$(CONFIG_USB_STORAGE_MTP) +=3D dev-mtp.o -endif - -# usb redirection -common-obj-$(CONFIG_USB_REDIR) +=3D redirect.o quirks.o -redirect.o-cflags =3D $(USB_REDIR_CFLAGS) -redirect.o-libs =3D $(USB_REDIR_LIBS) - -# usb pass-through -ifeq ($(CONFIG_USB_LIBUSB)$(CONFIG_USB),yy) -common-obj-y +=3D host-libusb.o -else -common-obj-y +=3D host-stub.o -endif -common-obj-$(CONFIG_ALL) +=3D host-stub.o - -host-libusb.o-cflags :=3D $(LIBUSB_CFLAGS) -host-libusb.o-libs :=3D $(LIBUSB_LIBS) - -ifeq ($(CONFIG_USB_LIBUSB),y) -common-obj-$(CONFIG_XEN) +=3D xen-usb.o -xen-usb.o-cflags :=3D $(LIBUSB_CFLAGS) -xen-usb.o-libs :=3D $(LIBUSB_LIBS) -endif diff --git a/hw/usb/meson.build b/hw/usb/meson.build new file mode 100644 index 0000000..8292256 --- /dev/null +++ b/hw/usb/meson.build @@ -0,0 +1,54 @@ +# usb subsystem core +softmmu_ss.add(files( + 'bus.c', + 'combined-packet.c', + 'core.c', + 'libhw.c' +)) + +softmmu_ss.add(when: 'CONFIG_USB', if_true: files( + 'desc.c', + 'desc-msos.c', +)) + +# usb host adapters +softmmu_ss.add(when: 'CONFIG_USB_UHCI', if_true: files('hcd-uhci.c')) +softmmu_ss.add(when: 'CONFIG_USB_OHCI', if_true: files('hcd-ohci.c')) +softmmu_ss.add(when: 'CONFIG_USB_OHCI_PCI', if_true: files('hcd-ohci-pci.c= ')) +softmmu_ss.add(when: 'CONFIG_USB_EHCI', if_true: files('hcd-ehci.c')) +softmmu_ss.add(when: 'CONFIG_USB_EHCI_PCI', if_true: files('hcd-ehci-pci.c= ')) +softmmu_ss.add(when: 'CONFIG_USB_EHCI_SYSBUS', if_true: files('hcd-ehci.c'= , 'hcd-ehci-sysbus.c')) +softmmu_ss.add(when: 'CONFIG_USB_XHCI', if_true: files('hcd-xhci.c')) +softmmu_ss.add(when: 'CONFIG_USB_XHCI_NEC', if_true: files('hcd-xhci-nec.c= ')) +softmmu_ss.add(when: 'CONFIG_USB_MUSB', if_true: files('hcd-musb.c')) + +specific_ss.add(when: 'CONFIG_TUSB6010', if_true: files('tusb6010.c')) +specific_ss.add(when: 'CONFIG_IMX', if_true: files('chipidea.c')) + +# emulated usb devices +softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c')) +softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hid.c')) +softmmu_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.= c')) +softmmu_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage= .c')) +softmmu_ss.add(when: 'CONFIG_USB_STORAGE_UAS', if_true: files('dev-uas.c')) +softmmu_ss.add(when: 'CONFIG_USB_AUDIO', if_true: files('dev-audio.c')) +softmmu_ss.add(when: 'CONFIG_USB_SERIAL', if_true: files('dev-serial.c')) +softmmu_ss.add(when: 'CONFIG_USB_NETWORK', if_true: files('dev-network.c')) +softmmu_ss.add(when: 'CONFIG_USB_BLUETOOTH', if_true: files('dev-bluetooth= .c')) + +softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard= -reader.c')) +softmmu_ss.add(when: ['CONFIG_USB_SMARTCARD', 'CONFIG_SMARTCARD', cacard],= if_true: files( + 'ccid-card-emulated.c', + 'ccid-card-passthru.c', +)) + +softmmu_ss.add(when: ['CONFIG_POSIX', 'CONFIG_USB_STORAGE_MTP'], if_true: = files('dev-mtp.c')) + +# usb redirect +softmmu_ss.add(when: [usbredir, 'CONFIG_USB_REDIR'], if_true: files('redir= ect.c', 'quirks.c')) + +# usb pass-through +softmmu_ss.add(when: [libusb, 'CONFIG_USB_LIBUSB'], if_true: files('host-l= ibusb.c'), if_false: files('host-stub.c')) +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('host-stub.c')) + +softmmu_ss.add(when: [libusb, 'CONFIG_XEN'], if_true: files('xen-usb.c')) diff --git a/meson.build b/meson.build index f1c5e7a..58bc25c 100644 --- a/meson.build +++ b/meson.build @@ -300,6 +300,21 @@ if 'CONFIG_XEN_BACKEND' in config_host xen =3D declare_dependency(compile_args: config_host['XEN_CFLAGS'].split= (), link_args: config_host['XEN_LIBS'].split()) endif +cacard =3D declare_dependency() +if 'CONFIG_SMARTCARD' in config_host + cacard =3D declare_dependency(compile_args: config_host['SMARTCARD_CFLAG= S'].split(), + link_args: config_host['SMARTCARD_LIBS'].spl= it()) +endif +usbredir =3D declare_dependency() +if 'CONFIG_USB_REDIR' in config_host + usbredir =3D declare_dependency(compile_args: config_host['USB_REDIR_CFL= AGS'].split(), + link_args: config_host['USB_REDIR_LIBS'].s= plit()) +endif +libusb =3D declare_dependency() +if 'CONFIG_USB_LIBUSB' in config_host + libusb =3D declare_dependency(compile_args: config_host['LIBUSB_CFLAGS']= .split(), + link_args: config_host['LIBUSB_LIBS'].split(= )) +endif =20 create_config =3D find_program('scripts/create_config') minikconf =3D find_program('scripts/minikconf.py') --=20 1.8.3.1