Fix os/Makefile: Support macOS
This commit is contained in:
parent
2beee556e8
commit
e4eee06cb2
1 changed files with 6 additions and 6 deletions
12
os/Makefile
12
os/Makefile
|
@ -25,10 +25,10 @@ DISASM ?= -x
|
||||||
build: env $(KERNEL_BIN)
|
build: env $(KERNEL_BIN)
|
||||||
|
|
||||||
env:
|
env:
|
||||||
rustup component add rust-src
|
(rustup component list | grep "rust-src") || rustup component add rust-src
|
||||||
rustup component add llvm-tools-preview
|
(rustup component list | grep "llvm-tools-preview") || rustup component add llvm-tools-preview
|
||||||
cargo install cargo-binutils
|
(which rust-objdump) || cargo install cargo-binutils
|
||||||
rustup target add riscv64gc-unknown-none-elf
|
(rustup target list | grep "riscv64gc-unknown-none-elf") || rustup target add riscv64gc-unknown-none-elf
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
|
@ -59,11 +59,11 @@ ifeq ($(BOARD),qemu)
|
||||||
-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA)
|
-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA)
|
||||||
else
|
else
|
||||||
@cp $(BOOTLOADER) $(BOOTLOADER).copy
|
@cp $(BOOTLOADER) $(BOOTLOADER).copy
|
||||||
@dd if=$(KERNEL_BIN) of=$(BOOTLOADER).copy bs=128K seek=1
|
@dd if=$(KERNEL_BIN) of=$(BOOTLOADER).copy bs=131072 seek=1
|
||||||
@mv $(BOOTLOADER).copy $(KERNEL_BIN)
|
@mv $(BOOTLOADER).copy $(KERNEL_BIN)
|
||||||
@sudo chmod 777 $(K210-SERIALPORT)
|
@sudo chmod 777 $(K210-SERIALPORT)
|
||||||
python3 $(K210-BURNER) -p $(K210-SERIALPORT) -b 1500000 $(KERNEL_BIN)
|
python3 $(K210-BURNER) -p $(K210-SERIALPORT) -b 1500000 $(KERNEL_BIN)
|
||||||
miniterm --eol LF --dtr 0 --rts 0 --filter direct $(K210-SERIALPORT) 115200
|
python3 -m serial.tools.miniterm --eol LF --dtr 0 --rts 0 --filter direct $(K210-SERIALPORT) 115200
|
||||||
endif
|
endif
|
||||||
|
|
||||||
debug: build
|
debug: build
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue