Skip to content

Commit 73da214

Browse files
committed
Update os/Makefile: Added QEMU_ARGS
1 parent 7a52aa8 commit 73da214

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

os/Makefile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,22 @@ disasm-vim: kernel
5656

5757
run: run-inner
5858

59-
59+
QEMU_ARGS := -machine virt \
60+
-nographic \
61+
-bios $(BOOTLOADER) \
62+
-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA)
6063

6164
run-inner: build
62-
@qemu-system-riscv64 \
63-
-machine virt \
64-
-nographic \
65-
-bios $(BOOTLOADER) \
66-
-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA)
65+
@qemu-system-riscv64 $(QEMU_ARGS)
6766

6867
debug: build
6968
@tmux new-session -d \
70-
"qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S" && \
69+
"qemu-system-riscv64 $(QEMU_ARGS) -s -S" && \
7170
tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \
7271
tmux -2 attach-session -d
7372

7473
gdbserver: build
75-
@qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
74+
@qemu-system-riscv64 $(QEMU_ARGS) -s -S
7675

7776
gdbclient:
7877
@riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'

0 commit comments

Comments
 (0)