From 261f7dd68eb67946208bbf0fd899fad22b1761c9 Mon Sep 17 00:00:00 2001 From: Paul Pan Date: Wed, 3 Jul 2024 21:09:34 +0800 Subject: [PATCH] chore: makefile: adjust loglevel when debug enabled --- .gitignore | 3 +++ Makefile | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 83d15b0..f1211c5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ /target /replay.* /kernel.asm +/*.log +/*.dtb +/*.dts \ No newline at end of file diff --git a/Makefile b/Makefile index 7abe7d4..7df1a0e 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,9 @@ QEMU_ARGS = -nographic -serial mon:stdio -smp 1 QEMU_ARGS += -machine virt # TODO: override by $(BOARD) QEMU_ARGS += -kernel target/$(BUILD_TARGET)/$(MODE)/kernel QEMU_ARGS += -initrd root/init.cpio -QEMU_ARGS += -append "loglevel=4" +ifeq ($(MODE), debug) + QEMU_ARGS += -append "loglevel=4" +endif kernel: env RUSTFLAGS="$(RUSTFLAGS)" cargo build --bin kernel $(CARGO_BUILD_ARGS)