Skip to content

Commit

Permalink
CMake: remove redundancy
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
Axel Heider committed Mar 23, 2023
1 parent 442669a commit 7150f6b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions apps/Arm/vm_minimal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,27 @@ if("${KernelARMPlatform}" STREQUAL "tk1")

# Different device tree if compiling with Tk1Insecure
if(Tk1Insecure)
set(device_tree_src "linux-tk1-nonsecured.dts")
set(device_tree_src "${CAMKES_ARM_LINUX_DIR}/linux-tk1-nonsecured.dts")
else()
set(device_tree_src "linux-tk1-secure.dts")
set(device_tree_src "${CAMKES_ARM_LINUX_DIR}/linux-tk1-secure.dts")
endif()

if(VmTk1InitrdRootfs)
set(linux_binary_name "linux-tk1-initrd")
else()
set(linux_binary_name "linux-tk1-debian")
endif()
set(output_dtb_location "linux/linux-dtb")
add_custom_command(
OUTPUT linux/linux-dtb
OUTPUT "${output_dtb_location}"
COMMAND
bash -c
"which dtc && dtc -I dts -O dtb ${CAMKES_ARM_LINUX_DIR}/${device_tree_src} > linux/linux-dtb"
"which dtc && dtc -I dts -O dtb ${device_tree_src} > ${output_dtb_location}"
VERBATIM
DEPENDS ${CAMKES_ARM_LINUX_DIR}/${device_tree_src}
DEPENDS ${device_tree_src}
)
# Create custom target for setting the dtb
add_custom_target(set_dtb DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/linux/linux-dtb")
add_custom_target(set_dtb DEPENDS "${output_dtb_location}")

# Add Linux VM images into file server
AddToFileServer("linux" "${CAMKES_ARM_LINUX_DIR}/${linux_binary_name}")
Expand Down

0 comments on commit 7150f6b

Please sign in to comment.