diff mbox series

[PULL,11/17] hw/usb: Add U2F key build recipe

Message ID 20200819054644.30610-12-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/17] hw: xhci: check return value of 'usb_packet_map' | expand

Commit Message

Gerd Hoffmann Aug. 19, 2020, 5:46 a.m. UTC
From: César Belley <cesar.belley@lse.epita.fr>

Signed-off-by: César Belley <cesar.belley@lse.epita.fr>
Message-id: 20200812094135.20550-8-cesar.belley@lse.epita.fr
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/Kconfig       | 5 +++++
 hw/usb/Makefile.objs | 7 +++++++
 2 files changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
index 5e63dc75f815..3fc8fbe3c74c 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/Makefile.objs b/hw/usb/Makefile.objs
index e342ff59fab0..7842a3175f8f 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -37,6 +37,13 @@  smartcard.mo-libs := $(SMARTCARD_LIBS)
 endif
 endif
 
+ifeq ($(CONFIG_USB_U2F),y)
+common-obj-y                          += u2f.o u2f-passthru.o
+common-obj-$(CONFIG_U2F)              += u2f-emulated.o
+u2f-emulated.o-cflags = $(U2F_CFLAGS)
+u2f-emulated.o-libs = $(U2F_LIBS)
+endif
+
 ifeq ($(CONFIG_POSIX),y)
 common-obj-$(CONFIG_USB_STORAGE_MTP)  += dev-mtp.o
 endif