buildtools: feat #135: Check the version of QEMU ahead
This commit is contained in:
parent
5c2fb93267
commit
eaacb4fa25
2 changed files with 34 additions and 4 deletions
12
os/Makefile
12
os/Makefile
|
@ -61,19 +61,23 @@ QEMU_ARGS := -machine virt \
|
|||
-bios $(BOOTLOADER) \
|
||||
-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA)
|
||||
|
||||
run-inner: build
|
||||
QEMU_NAME := qemu-system-riscv64
|
||||
qemu-version-check:
|
||||
@sh scripts/qemu-ver-check.sh $(QEMU_NAME)
|
||||
|
||||
run-inner: qemu-version-check build
|
||||
@qemu-system-riscv64 $(QEMU_ARGS)
|
||||
|
||||
debug: build
|
||||
debug: qemu-version-check build
|
||||
@tmux new-session -d \
|
||||
"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 -2 attach-session -d
|
||||
|
||||
gdbserver: build
|
||||
gdbserver: qemu-version-check build
|
||||
@qemu-system-riscv64 $(QEMU_ARGS) -s -S
|
||||
|
||||
gdbclient:
|
||||
@riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'
|
||||
|
||||
.PHONY: build env kernel clean disasm disasm-vim run-inner gdbserver gdbclient
|
||||
.PHONY: build env kernel clean disasm disasm-vim run-inner gdbserver gdbclient qemu-version-check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue