From fbca6703d692fcbace0da7cdf59f3696cc4211b8 Mon Sep 17 00:00:00 2001 From: Andy Bui Date: Tue, 11 Oct 2022 05:40:29 +0000 Subject: [PATCH] virtio: Rename VM virtio component to virtioarm This avoids conflicting with the new util_libs/virtio library. Signed-off-by: Andy Bui --- CMakeLists.txt | 1 + arm_vm_helpers.cmake | 2 +- components/VM_Arm/src/modules/virtio_con.c | 2 +- components/VM_Arm/src/modules/virtio_net_arping.c | 2 +- components/VM_Arm/src/modules/virtio_net_virtqueue.c | 2 +- libs/libvirtio/CMakeLists.txt | 6 +++--- libs/libvirtio/include/{virtio => virtioarm}/virtio.h | 0 .../include/{virtio => virtioarm}/virtio_console.h | 0 libs/libvirtio/include/{virtio => virtioarm}/virtio_net.h | 0 .../exynos5/{virtio => virtioarm}/virtio_plat.h | 0 .../qemu-arm-virt/{virtio => virtioarm}/virtio_plat.h | 0 .../plat_include/tx2/{virtio => virtioarm}/virtio_plat.h | 0 libs/libvirtio/src/virtio_console.c | 6 +++--- libs/libvirtio/src/virtio_net.c | 6 +++--- 14 files changed, 14 insertions(+), 13 deletions(-) rename libs/libvirtio/include/{virtio => virtioarm}/virtio.h (100%) rename libs/libvirtio/include/{virtio => virtioarm}/virtio_console.h (100%) rename libs/libvirtio/include/{virtio => virtioarm}/virtio_net.h (100%) rename libs/libvirtio/plat_include/exynos5/{virtio => virtioarm}/virtio_plat.h (100%) rename libs/libvirtio/plat_include/qemu-arm-virt/{virtio => virtioarm}/virtio_plat.h (100%) rename libs/libvirtio/plat_include/tx2/{virtio => virtioarm}/virtio_plat.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97d68d5e..1dca8360 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,7 @@ add_subdirectory(components/Firewall) add_subdirectory(components/StringReverse) add_subdirectory(components/UDPServer) add_subdirectory(components/Sataserver) +add_subdirectory(libs/libvirtio camkes-arm-vm/libs/libvirtio) # Declare connectors with templates. # We can rely on the naming scheme being consistent to allow for easier declaration. diff --git a/arm_vm_helpers.cmake b/arm_vm_helpers.cmake index cec10ec5..f0a9cf7f 100644 --- a/arm_vm_helpers.cmake +++ b/arm_vm_helpers.cmake @@ -138,7 +138,7 @@ function(DeclareCAmkESARMVM init_component) ) if(VmVirtioNetArping OR VmVirtioNetVirtqueue OR VmVirtioConsole) - DeclareCAmkESComponent(${init_component} LIBS virtio vswitch) + DeclareCAmkESComponent(${init_component} LIBS virtioarm vswitch) endif() # Append the USB driver library if building for exynos diff --git a/components/VM_Arm/src/modules/virtio_con.c b/components/VM_Arm/src/modules/virtio_con.c index bb8d9cf4..a662fa04 100644 --- a/components/VM_Arm/src/modules/virtio_con.c +++ b/components/VM_Arm/src/modules/virtio_con.c @@ -20,7 +20,7 @@ #include #include -#include +#include static virtio_con_t *virtio_con = NULL; extern void *serial_getchar_buf; diff --git a/components/VM_Arm/src/modules/virtio_net_arping.c b/components/VM_Arm/src/modules/virtio_net_arping.c index b669ba99..57af3fda 100644 --- a/components/VM_Arm/src/modules/virtio_net_arping.c +++ b/components/VM_Arm/src/modules/virtio_net_arping.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/components/VM_Arm/src/modules/virtio_net_virtqueue.c b/components/VM_Arm/src/modules/virtio_net_virtqueue.c index 5f2408fe..81679a18 100644 --- a/components/VM_Arm/src/modules/virtio_net_virtqueue.c +++ b/components/VM_Arm/src/modules/virtio_net_virtqueue.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include static virtio_net_t *virtio_net = NULL; static vswitch_t virtio_vswitch; diff --git a/libs/libvirtio/CMakeLists.txt b/libs/libvirtio/CMakeLists.txt index 4f968761..b424dac2 100644 --- a/libs/libvirtio/CMakeLists.txt +++ b/libs/libvirtio/CMakeLists.txt @@ -12,8 +12,8 @@ add_compile_options(-std=gnu99) set(sources src/virtio_net.c src/virtio_console.c) -add_library(virtio STATIC EXCLUDE_FROM_ALL ${sources}) +add_library(virtioarm STATIC EXCLUDE_FROM_ALL ${sources}) -target_include_directories(virtio PUBLIC include plat_include/${KernelPlatform}) +target_include_directories(virtioarm PUBLIC include plat_include/${KernelPlatform}) -target_link_libraries(virtio muslc sel4 sel4camkes sel4vm sel4vmmplatsupport sel4_autoconf) +target_link_libraries(virtioarm muslc sel4 sel4camkes sel4vm sel4vmmplatsupport sel4_autoconf) diff --git a/libs/libvirtio/include/virtio/virtio.h b/libs/libvirtio/include/virtioarm/virtio.h similarity index 100% rename from libs/libvirtio/include/virtio/virtio.h rename to libs/libvirtio/include/virtioarm/virtio.h diff --git a/libs/libvirtio/include/virtio/virtio_console.h b/libs/libvirtio/include/virtioarm/virtio_console.h similarity index 100% rename from libs/libvirtio/include/virtio/virtio_console.h rename to libs/libvirtio/include/virtioarm/virtio_console.h diff --git a/libs/libvirtio/include/virtio/virtio_net.h b/libs/libvirtio/include/virtioarm/virtio_net.h similarity index 100% rename from libs/libvirtio/include/virtio/virtio_net.h rename to libs/libvirtio/include/virtioarm/virtio_net.h diff --git a/libs/libvirtio/plat_include/exynos5/virtio/virtio_plat.h b/libs/libvirtio/plat_include/exynos5/virtioarm/virtio_plat.h similarity index 100% rename from libs/libvirtio/plat_include/exynos5/virtio/virtio_plat.h rename to libs/libvirtio/plat_include/exynos5/virtioarm/virtio_plat.h diff --git a/libs/libvirtio/plat_include/qemu-arm-virt/virtio/virtio_plat.h b/libs/libvirtio/plat_include/qemu-arm-virt/virtioarm/virtio_plat.h similarity index 100% rename from libs/libvirtio/plat_include/qemu-arm-virt/virtio/virtio_plat.h rename to libs/libvirtio/plat_include/qemu-arm-virt/virtioarm/virtio_plat.h diff --git a/libs/libvirtio/plat_include/tx2/virtio/virtio_plat.h b/libs/libvirtio/plat_include/tx2/virtioarm/virtio_plat.h similarity index 100% rename from libs/libvirtio/plat_include/tx2/virtio/virtio_plat.h rename to libs/libvirtio/plat_include/tx2/virtioarm/virtio_plat.h diff --git a/libs/libvirtio/src/virtio_console.c b/libs/libvirtio/src/virtio_console.c index dfdb77bf..63afc13b 100644 --- a/libs/libvirtio/src/virtio_console.c +++ b/libs/libvirtio/src/virtio_console.c @@ -16,9 +16,9 @@ #include #include -#include -#include -#include +#include +#include +#include typedef struct virtio_con_cookie { virtio_con_t *virtio_con; diff --git a/libs/libvirtio/src/virtio_net.c b/libs/libvirtio/src/virtio_net.c index d2fad126..1b85dff1 100644 --- a/libs/libvirtio/src/virtio_net.c +++ b/libs/libvirtio/src/virtio_net.c @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include typedef struct virtio_net_cookie { virtio_net_t *virtio_net;