diff --git a/openamp/Kconfig b/openamp/Kconfig index f4e02c735a..d9b0d072c6 100644 --- a/openamp/Kconfig +++ b/openamp/Kconfig @@ -22,4 +22,12 @@ config OPENAMP_DEBUG bool "Enable OpenAMP Debug" default n +config OPENAMP_VIRTIO_DEVICE_ONLY + bool "Enable VIRTIO_DEVICE_ONLY" + default n + +config OPENAMP_VIRTIO_DRIVER_ONLY + bool "Enable VIRTIO_DRIVER_ONLY" + default n + endif # OPENAMP diff --git a/openamp/open-amp.cmake b/openamp/open-amp.cmake index 3fea5fde9b..154a0e0293 100644 --- a/openamp/open-amp.cmake +++ b/openamp/open-amp.cmake @@ -99,6 +99,14 @@ endif() add_compile_definitions(elf_load=remoteproc_elf_load) +if(CONFIG_OPENAMP_VIRTIO_DEVICE_ONLY) + add_compile_definitions(VIRTIO_DEVICE_ONLY) +endif() + +if(CONFIG_OPENAMP_VIRTIO_DRIVER_ONLY) + add_compile_definitions(VIRTIO_DRIVER_ONLY) +endif() + set(WITH_LIBMETAL_FIND OFF) if(NOT CMAKE_SYSTEM_PROCESSOR) diff --git a/openamp/open-amp.defs b/openamp/open-amp.defs index 6985eedb86..73aeb7f43a 100644 --- a/openamp/open-amp.defs +++ b/openamp/open-amp.defs @@ -32,6 +32,14 @@ endif CFLAGS += -Delf_load=remoteproc_elf_load +ifeq ($(CONFIG_OPENAMP_VIRTIO_DEVICE_ONLY),y) + CFLAGS += -DVIRTIO_DEVICE_ONLY +endif + +ifeq ($(CONFIG_OPENAMP_VIRTIO_DRIVER_ONLY),y) + CFLAGS += -DVIRTIO_DRIVER_ONLY +endif + CSRCS += open-amp/lib/remoteproc/elf_loader.c CSRCS += open-amp/lib/remoteproc/remoteproc.c CSRCS += open-amp/lib/remoteproc/remoteproc_virtio.c