lib-qemu: support to use qemu-usb w/o webcam

for other VMMs beside Virtualbox, e.g. Seoul or potentially arm/vmm. The
webcam model depends on libyuv, which uses stdcxx + full libc, which is not
desired or required for all VMM implementations.

Fixes #5208
This commit is contained in:
Alexander Boettcher 2024-05-07 16:24:27 +02:00 committed by Christian Helmuth
parent 6c9d3326ec
commit 59c42ffb46
7 changed files with 20 additions and 13 deletions

View File

@ -1,6 +1,6 @@
QEMU_CONTRIB_DIR := $(call select_from_ports,qemu-usb)/src/lib/qemu
LIB_DIR := $(REP_DIR)/src/lib/qemu-usb
LIB_DIR := $(call select_from_repositories,src/lib/qemu-usb)
LIB_INC_DIR := $(LIB_DIR)/include
#

View File

@ -0,0 +1,12 @@
include $(REP_DIR)/lib/mk/qemu-usb.inc
LIBS += libc
LIBS += libyuv
LIBS += format
SRC_CC += webcam.cc
SRC_C += dev-webcam.c
vpath dev-webcam.c $(LIB_DIR)
SHARED_LIB = yes

View File

@ -1,4 +1,4 @@
LIB_DIR = $(REP_DIR)/src/lib/qemu-usb
LIB_DIR = $(call select_from_repositories,src/lib/qemu-usb)
QEMU_USB_DIR := $(call select_from_ports,qemu-usb)/src/lib/qemu/hw/usb
CC_WARN=
@ -6,20 +6,13 @@ CC_WARN=
INC_DIR += $(LIB_DIR) $(QEMU_USB_DIR)
LIBS = qemu-usb_include
LIBS += libc
LIBS += libyuv
LIBS += format
SRC_CC = dummies.cc qemu_emul.cc host.cc webcam.cc
SRC_CC += dummies.cc qemu_emul.cc host.cc
SRC_C = desc.c hcd-xhci.c hcd-xhci-pci.c core.c bus.c
SRC_C += dev-webcam.c
SHARED_LIB = yes
SRC_C += desc.c hcd-xhci.c hcd-xhci-pci.c core.c bus.c
LD_OPT += --version-script=$(LIB_DIR)/symbol.map
vpath dev-webcam.c $(LIB_DIR)
vpath %.c $(QEMU_USB_DIR)
vpath %.cc $(LIB_DIR)

View File

@ -1 +1 @@
include $(REP_DIR)/lib/mk/qemu-usb.inc
include $(REP_DIR)/lib/mk/qemu-usb-webcam.inc

View File

@ -1 +1 @@
include $(REP_DIR)/lib/mk/qemu-usb.inc
include $(REP_DIR)/lib/mk/qemu-usb-webcam.inc

View File

@ -43,6 +43,7 @@ MIRROR_FROM_LIBPORTS := lib/mk/libc-mem.mk \
lib/import/import-qemu-usb_include.mk \
lib/mk/qemu-usb_include.mk \
lib/mk/qemu-usb.inc \
lib/mk/qemu-usb-webcam.inc \
lib/mk/spec/x86_32/qemu-usb.mk \
lib/mk/spec/x86_64/qemu-usb.mk \
include/qemu \

View File

@ -35,6 +35,7 @@ MIRROR_FROM_LIBPORTS := \
lib/mk/libc-mem.mk \
lib/mk/qemu-usb.inc \
lib/mk/qemu-usb_include.mk \
lib/mk/qemu-usb-webcam.inc \
lib/mk/spec/x86_32/qemu-usb.mk \
lib/mk/spec/x86_64/qemu-usb.mk \
src/lib/libc/internal/init.h \