实验3环境初始化

Makefile里的gdb和之前不一样了!要添加$(QEMUOPTS),不然会导致没有挂载交换分区。
This commit is contained in:
2024-04-28 22:00:55 +08:00
parent 11043d4656
commit 4c81247971
5 changed files with 27 additions and 6 deletions

View File

@@ -210,7 +210,8 @@ endif
# files for grade script
TARGETS: $(TARGETS)
targets: $(TARGETS)
all: $(TARGETS)
.DEFAULT_GOAL := TARGETS
QEMUOPTS = -hda $(UCOREIMG) -drive file=$(SWAPIMG),media=disk,cache=writeback
@@ -225,7 +226,8 @@ qemu-nox: $(UCOREIMG) $(SWAPIMG)
$(V)$(QEMU) -serial mon:stdio $(QEMUOPTS) -nographic
TERMINAL := gnome-terminal
gdb: $(UCOREIMG) $(SWAPIMG)
$(V)$(QEMU) -S -s -parallel stdio $(QEMUOPTS) -serial null
debug: $(UCOREIMG) $(SWAPIMG)
$(V)$(QEMU) -S -s -parallel stdio $(QEMUOPTS) -serial null &
$(V)sleep 2