mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-22 09:26:26 +04:00
Update os/Makefile: Added QEMU_ARGS
This commit is contained in:
parent
36b1d763f1
commit
e76bd3a768
49
os/Makefile
49
os/Makefile
@ -73,51 +73,34 @@ disasm-vim: kernel
|
|||||||
|
|
||||||
run: run-inner
|
run: run-inner
|
||||||
|
|
||||||
run-inner-none: build
|
QEMU_ARGS := -machine virt \
|
||||||
@qemu-system-riscv64 \
|
-nographic \
|
||||||
-M 128m \
|
-bios $(BOOTLOADER) \
|
||||||
-machine virt \
|
-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) \
|
||||||
-bios none \
|
-drive file=$(FS_IMG),if=none,format=raw,id=x0 \
|
||||||
$(GUI_OPTION) \
|
-device virtio-blk-device,drive=x0 \
|
||||||
-kernel $(KERNEL_ELF) \
|
-device virtio-gpu-device \
|
||||||
-drive file=$(FS_IMG),if=none,format=raw,id=x0 \
|
-device virtio-keyboard-device \
|
||||||
-device virtio-blk-device,drive=x0 \
|
-device virtio-mouse-device \
|
||||||
# -device virtio-gpu-device \
|
-device virtio-net-device,netdev=net0 \
|
||||||
-device virtio-keyboard-device \
|
-netdev user,id=net0,hostfwd=udp::6200-:2000,hostfwd=tcp::6201-:80
|
||||||
-device virtio-mouse-device \
|
|
||||||
-device virtio-net-device,netdev=net0 \
|
|
||||||
-netdev user,id=net0,hostfwd=udp::6200-:2000,hostfwd=tcp::6201-:80 \
|
|
||||||
-serial stdio
|
|
||||||
|
|
||||||
run-inner: build
|
|
||||||
@qemu-system-riscv64 \
|
|
||||||
-M 128m \
|
|
||||||
-machine virt \
|
|
||||||
-bios $(BOOTLOADER) \
|
|
||||||
$(GUI_OPTION) \
|
|
||||||
-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 \
|
|
||||||
-device virtio-gpu-device \
|
|
||||||
-device virtio-keyboard-device \
|
|
||||||
-device virtio-mouse-device \
|
|
||||||
-device virtio-net-device,netdev=net0 \
|
|
||||||
-netdev user,id=net0,hostfwd=udp::6200-:2000,hostfwd=tcp::6201-:80 \
|
|
||||||
-serial stdio
|
|
||||||
|
|
||||||
fdt:
|
fdt:
|
||||||
@qemu-system-riscv64 -M 128m -machine virt,dumpdtb=virt.out
|
@qemu-system-riscv64 -M 128m -machine virt,dumpdtb=virt.out
|
||||||
fdtdump virt.out
|
fdtdump virt.out
|
||||||
|
|
||||||
|
run-inner: build
|
||||||
|
@qemu-system-riscv64 $(QEMU_ARGS)
|
||||||
|
|
||||||
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…
Reference in New Issue
Block a user