Skip to content

Commit

Permalink
Meta: Run 64-bit kernels with qemu-system-x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarbeutner authored and awesomekling committed Jun 25, 2021
1 parent 5eb6528 commit 1979c7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
8 changes: 7 additions & 1 deletion Meta/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 1979c7d

Please sign in to comment.