Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README, Makefile: adjust targets. #301

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ QEMU_PARAMS_NOGFX := -display none -vga none -vnc none
QEMU_PARAMS_GFX := $(QEMU_PARAMS)
QEMU_PARAMS += $(QEMU_PARAMS_NOGFX)

QEMU_PARAMS_KERNEL := -append "param1 param2 param3"
QEMU_PARAMS_DEBUG := -s &
QEMU_PARAMS_DEBUG := -s -S &

ISO_FILE := boot.iso

Expand Down Expand Up @@ -298,17 +297,9 @@ boot_gfx: $(ISO_FILE)
boot_debug: $(ISO_FILE)
$(QEMU_BIN) -cdrom $(ISO_FILE) $(QEMU_PARAMS) $(QEMU_PARAMS_DEBUG)

.PHONY: run
run: $(TARGET)
$(QEMU_BIN) -kernel $(TARGET) $(QEMU_PARAMS) $(QEMU_PARAMS_KERNEL)

.PHONY: debug
debug: $(TARGET)
$(QEMU_BIN) -kernel $(TARGET) $(QEMU_PARAMS) $(QEMU_PARAMS_KERNEL) $(QEMU_PARAMS_DEBUG)

.PHONY: gdb
gdb: debug
$(GDB) $(TARGET) -ex 'target remote :1234' -ex 'b _start' -ex 'c'
gdb: boot_debug
$(GDB) $(TARGET_DEBUG) -ex 'target remote :1234' -ex 'hb _start' -ex c
killall -9 $(QEMU_BIN)

define all_sources
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ For booting run:
make boot
```

For debugging ISO run:
For debugging run:
```
make boot_debug
```

For debugging kernel image run:
For debugging with gdb run:
```
make debug
make gdb
```

#### Xen guest
Expand Down