Skip to content

Commit

Permalink
cmake: put elf files for Qemu in /zephyr
Browse files Browse the repository at this point in the history
The ELF files were placed in ${CMAKE_BINARY_DIR} when all other ELF
files are actually in ${CMAKE_BINARY_DIR}/zephyr, so keep things
consistent and in one place.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Aug 13, 2020
1 parent d548a89 commit 07b4df1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmake/emu/qemu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ if(CONFIG_X86_64)
${CMAKE_OBJCOPY}
-O elf32-i386
$<TARGET_FILE:${logical_target_for_zephyr_elf}>
${CMAKE_BINARY_DIR}/zephyr-qemu.elf
${ZEPHYR_BINARY_DIR}/zephyr-qemu.elf
DEPENDS ${logical_target_for_zephyr_elf}
)

Expand All @@ -257,8 +257,8 @@ if(CONFIG_X86_64)
COMMAND
${CMAKE_OBJCOPY}
-j .locore
${CMAKE_BINARY_DIR}/zephyr-qemu.elf
${CMAKE_BINARY_DIR}/zephyr-qemu-locore.elf
${ZEPHYR_BINARY_DIR}/zephyr-qemu.elf
${ZEPHYR_BINARY_DIR}/zephyr-qemu-locore.elf
2>&1 | grep -iv \"empty loadable segment detected\" || true
DEPENDS qemu_image_target
)
Expand All @@ -267,8 +267,8 @@ if(CONFIG_X86_64)
COMMAND
${CMAKE_OBJCOPY}
-R .locore
${CMAKE_BINARY_DIR}/zephyr-qemu.elf
${CMAKE_BINARY_DIR}/zephyr-qemu-main.elf
${ZEPHYR_BINARY_DIR}/zephyr-qemu.elf
${ZEPHYR_BINARY_DIR}/zephyr-qemu-main.elf
2>&1 | grep -iv \"empty loadable segment detected\" || true
DEPENDS qemu_image_target
)
Expand All @@ -278,10 +278,10 @@ if(CONFIG_X86_64)
DEPENDS qemu_locore_image_target qemu_main_image_target
)

set(QEMU_KERNEL_FILE "${CMAKE_BINARY_DIR}/zephyr-qemu-locore.elf")
set(QEMU_KERNEL_FILE "${ZEPHYR_BINARY_DIR}/zephyr-qemu-locore.elf")

list(APPEND QEMU_EXTRA_FLAGS
"-device;loader,file=${CMAKE_BINARY_DIR}/zephyr-qemu-main.elf"
"-device;loader,file=${ZEPHYR_BINARY_DIR}/zephyr-qemu-main.elf"
)
endif()

Expand Down

0 comments on commit 07b4df1

Please sign in to comment.