Update Rust environment initialization.
This commit is contained in:
parent
08bc677d3b
commit
c0b4201623
1 changed files with 8 additions and 2 deletions
10
os/Makefile
10
os/Makefile
|
@ -25,7 +25,13 @@ OBJCOPY := rust-objcopy --binary-architecture=riscv64
|
||||||
# Disassembly
|
# Disassembly
|
||||||
DISASM ?= -x
|
DISASM ?= -x
|
||||||
|
|
||||||
build: $(KERNEL_BIN) $(FS_IMG)
|
build: env $(KERNEL_BIN) $(FS_IMG)
|
||||||
|
|
||||||
|
env:
|
||||||
|
rustup component add rust-src
|
||||||
|
rustup component add llvm-tools-preview
|
||||||
|
cargo install cargo-binutils
|
||||||
|
rustup target add riscv64gc-unknown-none-elf
|
||||||
|
|
||||||
sdcard: $(FS_IMG)
|
sdcard: $(FS_IMG)
|
||||||
@sudo dd if=/dev/zero of=$(SDCARD) bs=1M count=16
|
@sudo dd if=/dev/zero of=$(SDCARD) bs=1M count=16
|
||||||
|
@ -80,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 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
|
tmux -2 attach-session -d
|
||||||
|
|
||||||
.PHONY: build kernel clean disasm disasm-vim run-inner
|
.PHONY: build env kernel clean disasm disasm-vim run-inner
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue