Do not fetch tools when running on qemu.

ch2-dev
Yifan Wu 4 years ago
parent 17edea929b
commit 0305a62a76

@ -59,10 +59,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)
@ -72,6 +71,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)
@ -86,4 +86,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

Loading…
Cancel
Save