[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 07/13] hw/usb: Add U2F key build recipe
From: |
César Belley |
Subject: |
[PATCH v2 07/13] hw/usb: Add U2F key build recipe |
Date: |
Mon, 24 Aug 2020 13:48:21 +0200 |
Signed-off-by: César Belley <cesar.belley@lse.epita.fr>
---
hw/usb/Kconfig | 5 +++++
hw/usb/meson.build | 5 +++++
meson.build | 6 ++++++
3 files changed, 16 insertions(+)
diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
index 5e63dc75f8..3fc8fbe3c7 100644
--- a/hw/usb/Kconfig
+++ b/hw/usb/Kconfig
@@ -96,6 +96,11 @@ config USB_STORAGE_MTP
default y
depends on USB
+config USB_U2F
+ bool
+ default y
+ depends on USB
+
config IMX_USBPHY
bool
default y
diff --git a/hw/usb/meson.build b/hw/usb/meson.build
index 3c44a1b069..cac7639924 100644
--- a/hw/usb/meson.build
+++ b/hw/usb/meson.build
@@ -50,6 +50,11 @@ if config_host.has_key('CONFIG_SMARTCARD')
hw_usb_modules += {'smartcard': usbsmartcard_ss}
endif
+# U2F
+softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c'))
+softmmu_ss.add(when: ['CONFIG_LINUX', 'CONFIG_USB_U2F'], if_true:
files('u2f-passthru.c'))
+softmmu_ss.add(when: ['CONFIG_U2F', 'CONFIG_USB_U2F'], if_true: [u2f,
files('u2f-emulated.c')])
+
# usb redirect
if config_host.has_key('CONFIG_USB_REDIR')
usbredir_ss = ss.source_set()
diff --git a/meson.build b/meson.build
index df5bf728b5..1e6c9c598f 100644
--- a/meson.build
+++ b/meson.build
@@ -360,6 +360,11 @@ if 'CONFIG_SMARTCARD' in config_host
cacard = declare_dependency(compile_args:
config_host['SMARTCARD_CFLAGS'].split(),
link_args: config_host['SMARTCARD_LIBS'].split())
endif
+u2f = not_found
+if 'CONFIG_U2F' in config_host
+ u2f = declare_dependency(compile_args: config_host['U2F_CFLAGS'].split(),
+ link_args: config_host['U2F_LIBS'].split())
+endif
usbredir = not_found
if 'CONFIG_USB_REDIR' in config_host
usbredir = declare_dependency(compile_args:
config_host['USB_REDIR_CFLAGS'].split(),
@@ -1359,6 +1364,7 @@ summary_info += {'spice support':
config_host.has_key('CONFIG_SPICE')}
summary_info += {'rbd support': config_host.has_key('CONFIG_RBD')}
summary_info += {'xfsctl support': config_host.has_key('CONFIG_XFS')}
summary_info += {'smartcard support': config_host.has_key('CONFIG_SMARTCARD')}
+summary_info += {'U2F support': config_host.has_key('CONFIG_U2F')}
summary_info += {'libusb': config_host.has_key('CONFIG_USB_LIBUSB')}
summary_info += {'usb net redir': config_host.has_key('CONFIG_USB_REDIR')}
summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')}
--
2.28.0
- [PATCH v2 00/13] Introduce USB U2F key device, César Belley, 2020/08/24
- [PATCH v2 01/13] hw/usb: Regroup USB HID protocol values, César Belley, 2020/08/24
- [PATCH v2 02/13] docs: Add USB U2F key device documentation, César Belley, 2020/08/24
- [PATCH v2 03/13] hw/usb: Add U2F key base class, César Belley, 2020/08/24
- [PATCH v2 04/13] hw/usb: Add U2F key base class implementation, César Belley, 2020/08/24
- [PATCH v2 06/13] hw/usb: Add U2F key emulated mode, César Belley, 2020/08/24
- [PATCH v2 05/13] hw/usb: Add U2F key passthru mode, César Belley, 2020/08/24
- [PATCH v2 08/13] configure: Add USB U2F key device, César Belley, 2020/08/24
- [PATCH v2 07/13] hw/usb: Add U2F key build recipe,
César Belley <=
- [PATCH v2 09/13] docs/system: Add U2F key to the USB devices examples, César Belley, 2020/08/24
- [PATCH v2 10/13] docs/qdev-device-use.txt: Add USB U2F key to the QDEV devices examples, César Belley, 2020/08/24
- [PATCH v2 11/13] scripts: Add u2f-setup-gen script, César Belley, 2020/08/24
- [PATCH v2 12/13] hw/usb: Add U2F device check to passthru mode, César Belley, 2020/08/24
- [PATCH v2 13/13] hw/usb: Add U2F device autoscan to passthru mode, César Belley, 2020/08/24