Skip to content

Commit 3554e20

Browse files
committed
Do not fetch tools when running on qemu.
1 parent 818363f commit 3554e20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

os/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ disasm-vim: kernel
7171
@vim $(DISASM_TMP)
7272
@rm $(DISASM_TMP)
7373

74-
run: tools run-inner
74+
run: run-inner
7575

76-
tools:
77-
(which $(K210-BURNER)) || (cd .. && git clone https://github.com/sipeed/kflash.py.git && mv kflash.py tools)
76+
7877

7978
run-inner: build
8079
ifeq ($(BOARD),qemu)
@@ -86,6 +85,7 @@ ifeq ($(BOARD),qemu)
8685
-drive file=$(FS_IMG),if=none,format=raw,id=x0 \
8786
-device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0
8887
else
88+
(which $(K210-BURNER)) || (cd .. && git clone https://github.com/sipeed/kflash.py.git && mv kflash.py tools)
8989
@cp $(BOOTLOADER) $(BOOTLOADER).copy
9090
@dd if=$(KERNEL_BIN) of=$(BOOTLOADER).copy bs=$(K210_BOOTLOADER_SIZE) seek=1
9191
@mv $(BOOTLOADER).copy $(KERNEL_BIN)
@@ -100,4 +100,4 @@ debug: build
100100
tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \
101101
tmux -2 attach-session -d
102102

103-
.PHONY: build env kernel clean disasm disasm-vim run-inner tools
103+
.PHONY: build env kernel clean disasm disasm-vim run-inner

0 commit comments

Comments
 (0)