16 lines
528 B
Bash
Executable file
16 lines
528 B
Bash
Executable file
#!/bin/sh
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
bear --output "$SCRIPT_DIR/compile_commands.json" -- make -C "$SCRIPT_DIR/kernel" all || exit 1
|
|
mkdir -p "$SCRIPT_DIR/testenv/dist"
|
|
cp "$SCRIPT_DIR/kernel/output/kernel.iso" "$SCRIPT_DIR/testenv/dist/kernel.iso"
|
|
cd "$SCRIPT_DIR/testenv" || exit 1
|
|
|
|
CPU="-cpu Opteron_G1-v1,pdpe1gb=on"
|
|
|
|
if [ "$1" = "debug" ]; then
|
|
qemu-system-x86_64 -nodefaults -readconfig qemuConfig.cfg $CPU -s -S -daemonize
|
|
else
|
|
qemu-system-x86_64 -nodefaults -readconfig qemuConfig.cfg $CPU
|
|
fi
|