mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-22 08:06:17 +04:00
remove dependency cargo-binutils
This commit is contained in:
parent
b8b961b4ee
commit
ab06b2cd55
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
@ -55,14 +55,6 @@ jobs:
|
|||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
run: brew install dtc
|
run: brew install dtc
|
||||||
|
|
||||||
- name: Cache cargo bins
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cargo/bin
|
|
||||||
key: ${{ runner.os }}-cargo-bin
|
|
||||||
- name: Install cargo-binutils
|
|
||||||
run: test -x $HOME/.cargo/bin/cargo-objdump || cargo install cargo-binutils
|
|
||||||
|
|
||||||
- name: Download prebuilt user image
|
- name: Download prebuilt user image
|
||||||
run: cd user && make sfsimg arch=${{ matrix.arch }} prebuilt=1 && cd ..
|
run: cd user && make sfsimg arch=${{ matrix.arch }} prebuilt=1 && cd ..
|
||||||
- name: Build kernel
|
- name: Build kernel
|
||||||
|
@ -28,7 +28,6 @@ Setup on Linux or macOS:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ rustup component add rust-src llvm-tools-preview
|
$ rustup component add rust-src llvm-tools-preview
|
||||||
$ cargo install cargo-binutils
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use Docker container:
|
Or use Docker container:
|
||||||
|
@ -230,9 +230,10 @@ prefix ?= aarch64-linux-musl-
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
gdb := gdb
|
gdb := gdb
|
||||||
objdump := cargo objdump $(build_args) -- -print-imm-hex
|
sysroot := $(shell rustc --print sysroot)
|
||||||
objcopy := cargo objcopy -- --binary-architecture=$(subst _,-,$(arch))
|
objdump := $(shell find $(sysroot) -name llvm-objdump) -print-imm-hex
|
||||||
strip := cargo strip --
|
objcopy := $(shell find $(sysroot) -name llvm-objcopy)
|
||||||
|
strip := $(shell find $(sysroot) -name llvm-strip)
|
||||||
dtc := dtc
|
dtc := dtc
|
||||||
hostcc := gcc
|
hostcc := gcc
|
||||||
|
|
||||||
@ -245,7 +246,7 @@ clean:
|
|||||||
@cd $(user_dir) && make clean
|
@cd $(user_dir) && make clean
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
@cargo rustdoc -- --document-private-items
|
@cargo doc $(build_args) --no-deps --document-private-items
|
||||||
|
|
||||||
run: build justrun
|
run: build justrun
|
||||||
test: build justtest
|
test: build justtest
|
||||||
@ -304,9 +305,7 @@ endif
|
|||||||
|
|
||||||
kernel: $(dtb)
|
kernel: $(dtb)
|
||||||
@echo Building $(arch) kernel
|
@echo Building $(arch) kernel
|
||||||
ifeq ($(arch), x86_64)
|
ifeq ($(arch), $(filter $(arch), riscv32 riscv64))
|
||||||
@cargo build $(build_args)
|
|
||||||
else ifeq ($(arch), $(filter $(arch), riscv32 riscv64))
|
|
||||||
ifeq ($(board), k210)
|
ifeq ($(board), k210)
|
||||||
@cp src/arch/riscv/board/k210/linker.ld src/arch/riscv/boot/linker64.ld
|
@cp src/arch/riscv/board/k210/linker.ld src/arch/riscv/boot/linker64.ld
|
||||||
else ifeq ($(board), rocket_chip)
|
else ifeq ($(board), rocket_chip)
|
||||||
@ -315,18 +314,15 @@ else
|
|||||||
@cp src/arch/riscv/board/u540/linker.ld src/arch/riscv/boot/linker64.ld
|
@cp src/arch/riscv/board/u540/linker.ld src/arch/riscv/boot/linker64.ld
|
||||||
endif
|
endif
|
||||||
@-patch -p0 -N -b \
|
@-patch -p0 -N -b \
|
||||||
$(shell rustc --print sysroot)/lib/rustlib/src/rust/src/libcore/sync/atomic.rs \
|
$(sysroot)/lib/rustlib/src/rust/src/libcore/sync/atomic.rs \
|
||||||
src/arch/riscv/atomic.patch
|
src/arch/riscv/atomic.patch
|
||||||
@cargo build $(build_args)
|
|
||||||
else ifeq ($(arch), aarch64)
|
|
||||||
@cargo build $(build_args)
|
|
||||||
else ifeq ($(arch), mipsel)
|
else ifeq ($(arch), mipsel)
|
||||||
@for file in context entry trap ; do \
|
@for file in context entry trap ; do \
|
||||||
$(hostcc) -Dboard_$(board) -E src/arch/$(arch)/boot/$${file}.S -o src/arch/$(arch)/boot/$${file}.gen.s ; \
|
$(hostcc) -Dboard_$(board) -E src/arch/$(arch)/boot/$${file}.S -o src/arch/$(arch)/boot/$${file}.gen.s ; \
|
||||||
done
|
done
|
||||||
$(hostcc) -Dboard_$(board) -E src/arch/$(arch)/boot/linker.ld.S -o src/arch/$(arch)/boot/linker.ld
|
$(hostcc) -Dboard_$(board) -E src/arch/$(arch)/boot/linker.ld.S -o src/arch/$(arch)/boot/linker.ld
|
||||||
@cargo build $(build_args)
|
|
||||||
endif
|
endif
|
||||||
|
@cargo build $(build_args)
|
||||||
|
|
||||||
|
|
||||||
### user programs ###
|
### user programs ###
|
||||||
|
Loading…
Reference in New Issue
Block a user