From b9c779ff7e473ea797d700c0c347ef061f382b4b Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 20 Sep 2023 21:07:21 +0300 Subject: [PATCH] BuildSystem: Add cmake target for debugging qemu --- CMakeLists.txt | 8 +++++++- qemu.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27b9ae2177..f31e35f524 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,13 @@ add_custom_target(check-fs ) add_custom_target(qemu - COMMAND ${CMAKE_COMMAND} -E env BANAN_ARCH="${BANAN_ARCH}" DISK_IMAGE_PATH="${DISK_IMAGE_PATH}" ${CMAKE_SOURCE_DIR}/qemu.sh + COMMAND ${CMAKE_COMMAND} -E env BANAN_ARCH="${BANAN_ARCH}" DISK_IMAGE_PATH="${DISK_IMAGE_PATH}" ${CMAKE_SOURCE_DIR}/qemu.sh -accel kvm + DEPENDS image + USES_TERMINAL +) + +add_custom_target(qemu-debug + COMMAND ${CMAKE_COMMAND} -E env BANAN_ARCH="${BANAN_ARCH}" DISK_IMAGE_PATH="${DISK_IMAGE_PATH}" ${CMAKE_SOURCE_DIR}/qemu.sh -d int -no-reboot DEPENDS image USES_TERMINAL ) diff --git a/qemu.sh b/qemu.sh index de68e47cab..17aa3791d7 100755 --- a/qemu.sh +++ b/qemu.sh @@ -6,4 +6,4 @@ qemu-system-$BANAN_ARCH \ -smp 2 \ -drive format=raw,media=disk,file=${DISK_IMAGE_PATH} \ -serial stdio \ - -accel kvm \ + $@ \