From 29e9aa690fdd2d2202ff95d3c3a885ad2bee9c2b Mon Sep 17 00:00:00 2001 From: Yifan Wu Date: Sat, 6 Mar 2021 03:21:55 +0800 Subject: [PATCH] Do not fetch tools when running on qemu. --- os/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/os/Makefile b/os/Makefile index e7aa6b78..9be727a0 100644 --- a/os/Makefile +++ b/os/Makefile @@ -58,10 +58,9 @@ disasm-vim: kernel @vim $(DISASM_TMP) @rm $(DISASM_TMP) -run: tools run-inner +run: run-inner -tools: - (which $(K210-BURNER)) || (cd .. && git clone https://github.com/sipeed/kflash.py.git && mv kflash.py tools) + run-inner: build ifeq ($(BOARD),qemu) @@ -71,6 +70,7 @@ ifeq ($(BOARD),qemu) -bios $(BOOTLOADER) \ -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) else + (which $(K210-BURNER)) || (cd .. && git clone https://github.com/sipeed/kflash.py.git && mv kflash.py tools) @cp $(BOOTLOADER) $(BOOTLOADER).copy @dd if=$(KERNEL_BIN) of=$(BOOTLOADER).copy bs=$(K210_BOOTLOADER_SIZE) seek=1 @mv $(BOOTLOADER).copy $(KERNEL_BIN) @@ -85,4 +85,4 @@ debug: build 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 -.PHONY: build env kernel clean disasm disasm-vim run-inner tools +.PHONY: build env kernel clean disasm disasm-vim run-inner