Update os/Makefile: Added QEMU_ARGS
This commit is contained in:
parent
9831b9e7e9
commit
8e663030cb
1 changed files with 10 additions and 9 deletions
19
os/Makefile
19
os/Makefile
|
@ -67,24 +67,25 @@ disasm-vim: kernel
|
||||||
|
|
||||||
run: run-inner
|
run: run-inner
|
||||||
|
|
||||||
|
QEMU_ARGS := -machine virt \
|
||||||
|
-nographic \
|
||||||
|
-bios $(BOOTLOADER) \
|
||||||
|
-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) \
|
||||||
|
-drive file=$(FS_IMG),if=none,format=raw,id=x0 \
|
||||||
|
-device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0
|
||||||
|
|
||||||
run-inner: build
|
run-inner: build
|
||||||
@qemu-system-riscv64 \
|
@qemu-system-riscv64 $(QEMU_ARGS)
|
||||||
-machine virt \
|
|
||||||
-nographic \
|
|
||||||
-bios $(BOOTLOADER) \
|
|
||||||
-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) \
|
|
||||||
-drive file=$(FS_IMG),if=none,format=raw,id=x0 \
|
|
||||||
-device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0
|
|
||||||
|
|
||||||
debug: build
|
debug: build
|
||||||
@tmux new-session -d \
|
@tmux new-session -d \
|
||||||
"qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S" && \
|
"qemu-system-riscv64 $(QEMU_ARGS) -s -S" && \
|
||||||
tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \
|
tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \
|
||||||
tmux -2 attach-session -d
|
tmux -2 attach-session -d
|
||||||
|
|
||||||
|
|
||||||
gdbserver: build
|
gdbserver: build
|
||||||
@qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
@qemu-system-riscv64 $(QEMU_ARGS) -s -S
|
||||||
|
|
||||||
gdbclient:
|
gdbclient:
|
||||||
@riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'
|
@riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue