Meta: Run 64-bit kernels with qemu-system-x86_64

This commit is contained in:
Gunnar Beutner 2021-06-24 12:52:27 +02:00 committed by Andreas Kling
parent 5eb65286b6
commit 1979c7d185
Notes: sideshowbarker 2024-07-18 11:33:28 +09:00
2 changed files with 8 additions and 2 deletions

View file

@ -40,7 +40,7 @@ option(ENABLE_KERNEL_LTO "Build the kernel with link-time optimization" OFF)
include(Meta/CMake/wasm_spec_tests.cmake)
add_custom_target(run
COMMAND ${CMAKE_SOURCE_DIR}/Meta/run.sh
COMMAND ${CMAKE_COMMAND} -E env "SERENITY_ARCH=${SERENITY_ARCH}" ${CMAKE_SOURCE_DIR}/Meta/run.sh
USES_TERMINAL
)

View file

@ -27,7 +27,13 @@ fi
SERENITY_RUN="${SERENITY_RUN:-$1}"
[ -z "$SERENITY_QEMU_BIN" ] && SERENITY_QEMU_BIN="qemu-system-i386"
if [ -z "$SERENITY_QEMU_BIN" ]; then
if [ "$SERENITY_ARCH" = "x86_64" ]; then
SERENITY_QEMU_BIN="qemu-system-x86_64"
else
SERENITY_QEMU_BIN="qemu-system-i386"
fi
fi
[ -z "$SERENITY_KERNEL_CMDLINE" ] && SERENITY_KERNEL_CMDLINE="hello"