diff --git a/apps/Arm/odroid_vm/CMakeLists.txt b/apps/Arm/odroid_vm/CMakeLists.txt index 553674fa..1f43a52a 100644 --- a/apps/Arm/odroid_vm/CMakeLists.txt +++ b/apps/Arm/odroid_vm/CMakeLists.txt @@ -32,8 +32,6 @@ add_subdirectory(components/spi) add_subdirectory(components/clk) add_subdirectory(components/timer) -set(linux_binary_name "${CAMKES_ARM_LINUX_DIR}/linux") - # Different device tree if compiling with VmVUSB if(VmVUSB) set(device_tree_src "linux-secure-vusb-dtb") @@ -51,10 +49,14 @@ add_custom_command( # Create custom target for setting the dtb add_custom_target(set_dtb DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/linux/linux-dtb") -# Add Linux VM images into file server -AddToFileServer("linux" "${linux_binary_name}") -AddToFileServer("linux-dtb" "${CMAKE_CURRENT_BINARY_DIR}/linux/linux-dtb" DEPENDS set_dtb) -DefineCAmkESVMFileServer() +# Create file server with Add Linux VM images +DefineCAmkESVMFileServer( + FILES + "linux:${CAMKES_ARM_LINUX_DIR}/linux" + "linux-dtb:${CMAKE_CURRENT_BINARY_DIR}/linux/linux-dtb" + DEPENDS + set_dtb +) # Declare odroid root server DeclareCAmkESRootserver( diff --git a/apps/Arm/vm_cross_connector/CMakeLists.txt b/apps/Arm/vm_cross_connector/CMakeLists.txt index 64697289..4c7146fa 100644 --- a/apps/Arm/vm_cross_connector/CMakeLists.txt +++ b/apps/Arm/vm_cross_connector/CMakeLists.txt @@ -37,8 +37,6 @@ elseif("${KernelARMPlatform}" STREQUAL "qemu-arm-virt") endif() endif() -AddToFileServer("linux" "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux") - if(BUILD_CROSSVM) set(rootfs_file "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/rootfs.cpio.gz") # Checkout and configure linux to build crossvm module @@ -205,7 +203,6 @@ AddOverlayDirToRootfs( rootfs_target GZIP ) -AddToFileServer("linux-initrd" ${output_overlayed_rootfs_location} DEPENDS rootfs_target) AddCamkesCPPFlag( cpp_flags @@ -218,7 +215,13 @@ AddCamkesCPPFlag( VmVirtioNetVirtqueue ) -DefineCAmkESVMFileServer() +DefineCAmkESVMFileServer( + FILES + "linux:${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux" + "linux-initrd:${output_overlayed_rootfs_location}" + DEPENDS + rootfs_target +) CAmkESAddImportPath(${KernelARMPlatform}) diff --git a/apps/Arm/vm_introspect/CMakeLists.txt b/apps/Arm/vm_introspect/CMakeLists.txt index 8db76bbf..a92dbc3f 100644 --- a/apps/Arm/vm_introspect/CMakeLists.txt +++ b/apps/Arm/vm_introspect/CMakeLists.txt @@ -54,8 +54,6 @@ elseif("${KernelARMPlatform}" STREQUAL "qemu-arm-virt") endif() -AddToFileServer("linux" "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux") - set(rootfs_file "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/rootfs_crossvm.cpio.gz") ExternalProject_Add( @@ -108,8 +106,6 @@ AddOverlayDirToRootfs( GZIP ) -AddToFileServer("linux-initrd" ${output_overlayed_rootfs_location} DEPENDS rootfs_target) - AddCamkesCPPFlag( cpp_flags CONFIG_VARS @@ -121,7 +117,13 @@ AddCamkesCPPFlag( VmVirtioNetVirtqueue ) -DefineCAmkESVMFileServer() +DefineCAmkESVMFileServer( + FILES + "linux:${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux" + "linux-initrd:${output_overlayed_rootfs_location}" + DEPENDS + rootfs_target +) CAmkESAddImportPath(${KernelARMPlatform}) diff --git a/apps/Arm/vm_multi/CMakeLists.txt b/apps/Arm/vm_multi/CMakeLists.txt index 26456ece..ad853d34 100644 --- a/apps/Arm/vm_multi/CMakeLists.txt +++ b/apps/Arm/vm_multi/CMakeLists.txt @@ -73,25 +73,18 @@ AddOverlayDirToRootfs( GZIP ) -AddToFileServer( - "linux-initrd-vm0" - "${vm0_output_overlayed_rootfs_location}" +AddCamkesCPPFlag(cpp_flags CONFIG_VARS VmEmmc2NoDMA VmVUSB VmVchan Tk1DeviceFwd Tk1Insecure) + +DefineCAmkESVMFileServer( + FILES + "linux-initrd-vm0:${vm0_output_overlayed_rootfs_location}" + "linux-initrd-vm-client:${client_output_overlayed_rootfs_location}" + "linux:${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux" DEPENDS rootfs_target_vm0 -) -AddToFileServer( - "linux-initrd-vm-client" - "${client_output_overlayed_rootfs_location}" - DEPENDS rootfs_target_client_vm ) -AddToFileServer("linux" "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux") - -AddCamkesCPPFlag(cpp_flags CONFIG_VARS VmEmmc2NoDMA VmVUSB VmVchan Tk1DeviceFwd Tk1Insecure) - -DefineCAmkESVMFileServer() - CAmkESAddImportPath(${KernelARMPlatform}) # Declare root server diff --git a/apps/Arm/vm_serial_server/CMakeLists.txt b/apps/Arm/vm_serial_server/CMakeLists.txt index 1547aef0..8e8a9e6a 100644 --- a/apps/Arm/vm_serial_server/CMakeLists.txt +++ b/apps/Arm/vm_serial_server/CMakeLists.txt @@ -16,7 +16,6 @@ include(${CAMKES_VM_LINUX_HELPERS_PATH}) # Create our CPP Flags based on ARM VM config variables set(cpp_flags "-DKERNELARMPLATFORM_EXYNOS5422") -AddToFileServer("linux" "${CAMKES_VM_IMAGES_DIR}/exynos5422/linux") # Generate overlayed rootfs set(rootfs_file "${CAMKES_VM_IMAGES_DIR}/exynos5422/rootfs.cpio.gz") AddFileToOverlayDir( @@ -35,7 +34,7 @@ AddOverlayDirToRootfs( rootfs_target GZIP ) -AddToFileServer("linux-initrd" ${output_overlayed_rootfs_location} DEPENDS rootfs_target) + # Updated dtb based on generated initrd UpdateDtbFromInitrd( "${CAMKES_VM_IMAGES_DIR}/exynos5422/linux-dtb-virtcon" @@ -46,11 +45,18 @@ UpdateDtbFromInitrd( DEPENDS rootfs_target ) -AddToFileServer("linux-dtb" "${output_dtb_location}" DEPENDS dtb_gen_target) AddCamkesCPPFlag(cpp_flags CONFIG_VARS VmEmmc2NoDMA VmVUSB Tk1DeviceFwd Tk1Insecure) -DefineCAmkESVMFileServer() +DefineCAmkESVMFileServer( + FILES + "linux:${CAMKES_VM_IMAGES_DIR}/exynos5422/linux" + "linux-initrd:${output_overlayed_rootfs_location}" + "linux-dtb:${output_dtb_location}" + DEPENDS + rootfs_target + dtb_gen_target +) CAmkESAddImportPath(exynos5422) diff --git a/apps/Arm/vm_virtio_net/CMakeLists.txt b/apps/Arm/vm_virtio_net/CMakeLists.txt index 77fca436..7b699c29 100644 --- a/apps/Arm/vm_virtio_net/CMakeLists.txt +++ b/apps/Arm/vm_virtio_net/CMakeLists.txt @@ -73,10 +73,6 @@ UpdateDtbFromInitrd( rootfs_target ) -AddToFileServer("linux-dtb" "${output_dtb_location}" DEPENDS dtb_gen_target) -AddToFileServer("linux-initrd" ${output_overlayed_rootfs_location} DEPENDS rootfs_target) -AddToFileServer("linux" "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux") - AddCamkesCPPFlag( cpp_flags CONFIG_VARS @@ -87,7 +83,15 @@ AddCamkesCPPFlag( VmVirtioNetVirtqueue ) -DefineCAmkESVMFileServer() +DefineCAmkESVMFileServer( + FILES + "linux:${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux" + "linux-initrd:${output_overlayed_rootfs_location}" + "linux-dtb:${output_dtb_location}" + DEPENDS + rootfs_target + dtb_gen_target +) CAmkESAddImportPath(${KernelARMPlatform})