Merge pull request #13 from 0xKSor/refactor/build
build: removed drun, dcrun, crun and combined it as flags to run
This commit is contained in:
@@ -67,44 +67,47 @@ _prep:
|
||||
@mcopy -i {{IMG_FILE}} {{BOOT_BIN}} ::/EFI/BOOT/BOOTAA64.EFI
|
||||
@mcopy -i {{IMG_FILE}} {{BUILD_DIR}}/Kernel/ksOSKernel.elf ::/ksOSKernel.elf
|
||||
|
||||
@run: _image
|
||||
@echo "🚀 Launching (accel: {{ACCEL_INFO}})..."
|
||||
qemu-system-aarch64 {{ACCEL}} \
|
||||
-machine virt,acpi=off \
|
||||
-cpu {{CPU}} \
|
||||
-m {{RAM}} \
|
||||
-device ramfb \
|
||||
{{DISPLAY_FLAGS}} \
|
||||
-drive if=pflash,format=raw,readonly=on,file={{OVMF_ARM}} \
|
||||
-drive file={{IMG_FILE}},format=raw,if=none,id=hd0 \
|
||||
-device virtio-blk-device,drive=hd0 \
|
||||
-serial stdio \
|
||||
-monitor telnet:127.0.0.1:5555,server,nowait
|
||||
|
||||
@drun: _image
|
||||
@echo "🚀 Debugging (accel: {{ACCEL_INFO}})..."
|
||||
run *FLAGS:
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
FLAGS=" {{FLAGS}} "
|
||||
|
||||
if [[ "$FLAGS" == *" -clean "* ]]; then
|
||||
echo "🧹 Cleaning..."
|
||||
just clean
|
||||
fi
|
||||
|
||||
just _image
|
||||
|
||||
DEBUG_ARGS=""
|
||||
DISPLAY_ARGS="{{DISPLAY_FLAGS}}"
|
||||
STATE_MSG="Launching"
|
||||
|
||||
if [[ "$FLAGS" == *" -debug "* ]]; then
|
||||
DEBUG_ARGS="-s -S"
|
||||
STATE_MSG="Debugging"
|
||||
fi
|
||||
|
||||
if [[ "$FLAGS" == *" -nographic "* ]]; then
|
||||
DISPLAY_ARGS="-nographic"
|
||||
fi
|
||||
|
||||
echo "🚀 $STATE_MSG (accel: {{ACCEL_INFO}})..."
|
||||
|
||||
qemu-system-aarch64 {{ACCEL}} \
|
||||
-machine virt,acpi=off \
|
||||
-cpu {{CPU}} \
|
||||
-m {{RAM}} \
|
||||
-device ramfb \
|
||||
{{DISPLAY_FLAGS}} \
|
||||
$DISPLAY_ARGS \
|
||||
-drive if=pflash,format=raw,readonly=on,file={{OVMF_ARM}} \
|
||||
-drive file={{IMG_FILE}},format=raw,if=none,id=hd0 \
|
||||
-device virtio-blk-device,drive=hd0 \
|
||||
-serial stdio \
|
||||
-monitor telnet:127.0.0.1:5555,server,nowait \
|
||||
-s -S
|
||||
|
||||
@crun:
|
||||
@echo "🧹 Cleaning and running.."
|
||||
just clean
|
||||
just run
|
||||
|
||||
@dcrun:
|
||||
@echo "🧹 Cleaning and debugging.."
|
||||
just clean
|
||||
just drun
|
||||
$DEBUG_ARGS
|
||||
|
||||
@clean:
|
||||
just Bootloader clean
|
||||
|
||||
Reference in New Issue
Block a user