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}} {{BOOT_BIN}} ::/EFI/BOOT/BOOTAA64.EFI
|
||||||
@mcopy -i {{IMG_FILE}} {{BUILD_DIR}}/Kernel/ksOSKernel.elf ::/ksOSKernel.elf
|
@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
|
run *FLAGS:
|
||||||
@echo "🚀 Debugging (accel: {{ACCEL_INFO}})..."
|
#!/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}} \
|
qemu-system-aarch64 {{ACCEL}} \
|
||||||
-machine virt,acpi=off \
|
-machine virt,acpi=off \
|
||||||
-cpu {{CPU}} \
|
-cpu {{CPU}} \
|
||||||
-m {{RAM}} \
|
-m {{RAM}} \
|
||||||
-device ramfb \
|
-device ramfb \
|
||||||
{{DISPLAY_FLAGS}} \
|
$DISPLAY_ARGS \
|
||||||
-drive if=pflash,format=raw,readonly=on,file={{OVMF_ARM}} \
|
-drive if=pflash,format=raw,readonly=on,file={{OVMF_ARM}} \
|
||||||
-drive file={{IMG_FILE}},format=raw,if=none,id=hd0 \
|
-drive file={{IMG_FILE}},format=raw,if=none,id=hd0 \
|
||||||
-device virtio-blk-device,drive=hd0 \
|
-device virtio-blk-device,drive=hd0 \
|
||||||
-serial stdio \
|
-serial stdio \
|
||||||
-monitor telnet:127.0.0.1:5555,server,nowait \
|
-monitor telnet:127.0.0.1:5555,server,nowait \
|
||||||
-s -S
|
$DEBUG_ARGS
|
||||||
|
|
||||||
@crun:
|
|
||||||
@echo "🧹 Cleaning and running.."
|
|
||||||
just clean
|
|
||||||
just run
|
|
||||||
|
|
||||||
@dcrun:
|
|
||||||
@echo "🧹 Cleaning and debugging.."
|
|
||||||
just clean
|
|
||||||
just drun
|
|
||||||
|
|
||||||
@clean:
|
@clean:
|
||||||
just Bootloader clean
|
just Bootloader clean
|
||||||
|
|||||||
Reference in New Issue
Block a user