aboutsummaryrefslogtreecommitdiff
path: root/Common.mk
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-18 23:20:32 -0800
committerChristian Cunningham <cc@localhost>2021-12-18 23:20:32 -0800
commite7668e69d43afd7d25a7a8da1eac894d3f4ff677 (patch)
tree35c0300655e59af79dfb7191caebc2a09f799496 /Common.mk
parent956d6a5376474f0f1e99977e466719f7eaa4063e (diff)
Logging serial output
Diffstat (limited to 'Common.mk')
-rw-r--r--Common.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/Common.mk b/Common.mk
index 3c0b3ef..25c7456 100644
--- a/Common.mk
+++ b/Common.mk
@@ -15,7 +15,7 @@ QEMU = qemu-system-arm
GDB = gdb-multiarch
CFLAGS = -mcpu=cortex-a7 -fpic -ffreestanding -std=gnu99 -O3 -Wall -Wextra -nostdlib -g
AFLAGS = -mcpu=cortex-a7 -g
-QFLAGS = -M raspi2 -cpu arm1176 -m 1G -serial mon:stdio
+QFLAGS = -M raspi2 -cpu arm1176 -m 1G -chardev stdio,id=char0,mux=on,logfile=serial.log,signal=off -serial chardev:char0 -mon chardev=char0
QFLAGS += -nographic
BSP ?= 2
@@ -60,10 +60,12 @@ obj/%.ao: src/%.S
run: build/kernel.elf
@echo Starting QEMU
+ @sleep 2
@${QEMU} -kernel $< ${QFLAGS}
run-debug: build/kernel-g.elf
@echo Starting QEMU in Debug Mode
+ @sleep 2
@${QEMU} -kernel $< -s -S ${QFLAGS}
debug: build/kernel-g.elf build/kernel.list