mirror of
https://github.com/LearningOS/rust-based-os-comp2022.git
synced 2026-05-11 18:36:03 +08:00
fix: update rust-toolchain file
fix: remove link_app.S Signed-off-by: YdrMaster <ydrml@hotmail.com>
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -2,11 +2,7 @@
|
|||||||
.idea
|
.idea
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
target
|
target
|
||||||
os/src/link_app.S
|
|
||||||
os/last-*
|
os/last-*
|
||||||
tools
|
tools
|
||||||
workplace/
|
workplace/
|
||||||
os2-ref/src/link_app.S
|
/os*/link_app.S
|
||||||
os3-ref/src/link_app.S
|
|
||||||
os4-ref/src/link_app.S
|
|
||||||
os5-ref/src/link_app.S
|
|
||||||
|
|||||||
@@ -77,9 +77,7 @@ RUN rustup --version && \
|
|||||||
# See os1/Makefile `env:` for example.
|
# See os1/Makefile `env:` for example.
|
||||||
# This avoids having to wait for these steps each time using a new container.
|
# This avoids having to wait for these steps each time using a new container.
|
||||||
RUN rustup target add riscv64gc-unknown-none-elf && \
|
RUN rustup target add riscv64gc-unknown-none-elf && \
|
||||||
cargo install cargo-binutils --vers ~0.2 && \
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src && \
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
# Ready to go
|
# Ready to go
|
||||||
WORKDIR ${HOME}
|
WORKDIR ${HOME}
|
||||||
|
|||||||
@@ -23,9 +23,7 @@ $(KERNEL_BIN): kernel
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
kernel:
|
kernel:
|
||||||
@cargo build --release
|
@cargo build --release
|
||||||
|
|||||||
@@ -23,9 +23,7 @@ $(KERNEL_BIN): kernel
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.2
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
kernel:
|
kernel:
|
||||||
@cargo build --release
|
@cargo build --release
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ disasm:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
kernel:
|
kernel:
|
||||||
@make -C ../user build TEST=$(TEST) CHAPTER=$(CHAPTER) BASE=$(BASE)
|
@make -C ../user build TEST=$(TEST) CHAPTER=$(CHAPTER) BASE=$(BASE)
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ disasm:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.2
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
kernel:
|
kernel:
|
||||||
@make -C ../user build TEST=$(TEST) CHAPTER=$(CHAPTER) BASE=$(BASE)
|
@make -C ../user build TEST=$(TEST) CHAPTER=$(CHAPTER) BASE=$(BASE)
|
||||||
|
|||||||
@@ -29,9 +29,7 @@ $(KERNEL_BIN): kernel
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
|
|||||||
@@ -29,9 +29,7 @@ $(KERNEL_BIN): kernel
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.2
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
|
|||||||
@@ -29,9 +29,7 @@ $(KERNEL_BIN): kernel
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
@@ -59,4 +57,4 @@ debug: build
|
|||||||
dbg: build
|
dbg: build
|
||||||
qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
||||||
|
|
||||||
.PHONY: build env kernel clean run-inner
|
.PHONY: build env kernel clean run-inner
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ build: env $(KERNEL_BIN)
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.2
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
|
|||||||
@@ -25,9 +25,7 @@ build: env $(KERNEL_BIN)
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
@@ -55,4 +53,4 @@ debug: build
|
|||||||
dbg: build
|
dbg: build
|
||||||
qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
||||||
|
|
||||||
.PHONY: build env kernel clean run-inner
|
.PHONY: build env kernel clean run-inner
|
||||||
|
|||||||
@@ -25,9 +25,7 @@ build: env $(KERNEL_BIN)
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
@@ -55,4 +53,4 @@ debug: build
|
|||||||
dbg: build
|
dbg: build
|
||||||
qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
||||||
|
|
||||||
.PHONY: build env kernel clean run-inner
|
.PHONY: build env kernel clean run-inner
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ fs-img: $(APPS)
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
@@ -68,4 +66,4 @@ dbg: build
|
|||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = true
|
debug = true
|
||||||
opt-level = 0
|
opt-level = 0
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ fs-img: $(APPS)
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
|
|||||||
@@ -1,140 +0,0 @@
|
|||||||
|
|
||||||
.align 3
|
|
||||||
.section .data
|
|
||||||
.global _num_app
|
|
||||||
_num_app:
|
|
||||||
.quad 13
|
|
||||||
.quad app_0_start
|
|
||||||
.quad app_1_start
|
|
||||||
.quad app_2_start
|
|
||||||
.quad app_3_start
|
|
||||||
.quad app_4_start
|
|
||||||
.quad app_5_start
|
|
||||||
.quad app_6_start
|
|
||||||
.quad app_7_start
|
|
||||||
.quad app_8_start
|
|
||||||
.quad app_9_start
|
|
||||||
.quad app_10_start
|
|
||||||
.quad app_11_start
|
|
||||||
.quad app_12_start
|
|
||||||
.quad app_12_end
|
|
||||||
|
|
||||||
.global _app_names
|
|
||||||
_app_names:
|
|
||||||
.string "ch2b_bad_address"
|
|
||||||
.string "ch2b_bad_instructions"
|
|
||||||
.string "ch2b_bad_register"
|
|
||||||
.string "ch2b_hello_world"
|
|
||||||
.string "ch2b_power_3"
|
|
||||||
.string "ch2b_power_5"
|
|
||||||
.string "ch2b_power_7"
|
|
||||||
.string "ch3_taskinfo"
|
|
||||||
.string "ch3b_sleep"
|
|
||||||
.string "ch3b_sleep1"
|
|
||||||
.string "ch3b_yield0"
|
|
||||||
.string "ch3b_yield1"
|
|
||||||
.string "ch3b_yield2"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_0_start
|
|
||||||
.global app_0_end
|
|
||||||
.align 3
|
|
||||||
app_0_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_bad_address.bin"
|
|
||||||
app_0_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_1_start
|
|
||||||
.global app_1_end
|
|
||||||
.align 3
|
|
||||||
app_1_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_bad_instructions.bin"
|
|
||||||
app_1_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_2_start
|
|
||||||
.global app_2_end
|
|
||||||
.align 3
|
|
||||||
app_2_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_bad_register.bin"
|
|
||||||
app_2_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_3_start
|
|
||||||
.global app_3_end
|
|
||||||
.align 3
|
|
||||||
app_3_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_hello_world.bin"
|
|
||||||
app_3_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_4_start
|
|
||||||
.global app_4_end
|
|
||||||
.align 3
|
|
||||||
app_4_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_power_3.bin"
|
|
||||||
app_4_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_5_start
|
|
||||||
.global app_5_end
|
|
||||||
.align 3
|
|
||||||
app_5_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_power_5.bin"
|
|
||||||
app_5_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_6_start
|
|
||||||
.global app_6_end
|
|
||||||
.align 3
|
|
||||||
app_6_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_power_7.bin"
|
|
||||||
app_6_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_7_start
|
|
||||||
.global app_7_end
|
|
||||||
.align 3
|
|
||||||
app_7_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3_taskinfo.bin"
|
|
||||||
app_7_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_8_start
|
|
||||||
.global app_8_end
|
|
||||||
.align 3
|
|
||||||
app_8_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_sleep.bin"
|
|
||||||
app_8_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_9_start
|
|
||||||
.global app_9_end
|
|
||||||
.align 3
|
|
||||||
app_9_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_sleep1.bin"
|
|
||||||
app_9_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_10_start
|
|
||||||
.global app_10_end
|
|
||||||
.align 3
|
|
||||||
app_10_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_yield0.bin"
|
|
||||||
app_10_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_11_start
|
|
||||||
.global app_11_end
|
|
||||||
.align 3
|
|
||||||
app_11_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_yield1.bin"
|
|
||||||
app_11_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_12_start
|
|
||||||
.global app_12_end
|
|
||||||
.align 3
|
|
||||||
app_12_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_yield2.bin"
|
|
||||||
app_12_end:
|
|
||||||
@@ -31,9 +31,7 @@ fs-img: $(APPS)
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ fs-img: $(APPS)
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
|
|||||||
@@ -1,140 +0,0 @@
|
|||||||
|
|
||||||
.align 3
|
|
||||||
.section .data
|
|
||||||
.global _num_app
|
|
||||||
_num_app:
|
|
||||||
.quad 13
|
|
||||||
.quad app_0_start
|
|
||||||
.quad app_1_start
|
|
||||||
.quad app_2_start
|
|
||||||
.quad app_3_start
|
|
||||||
.quad app_4_start
|
|
||||||
.quad app_5_start
|
|
||||||
.quad app_6_start
|
|
||||||
.quad app_7_start
|
|
||||||
.quad app_8_start
|
|
||||||
.quad app_9_start
|
|
||||||
.quad app_10_start
|
|
||||||
.quad app_11_start
|
|
||||||
.quad app_12_start
|
|
||||||
.quad app_12_end
|
|
||||||
|
|
||||||
.global _app_names
|
|
||||||
_app_names:
|
|
||||||
.string "ch2b_bad_address"
|
|
||||||
.string "ch2b_bad_instructions"
|
|
||||||
.string "ch2b_bad_register"
|
|
||||||
.string "ch2b_hello_world"
|
|
||||||
.string "ch2b_power_3"
|
|
||||||
.string "ch2b_power_5"
|
|
||||||
.string "ch2b_power_7"
|
|
||||||
.string "ch3_taskinfo"
|
|
||||||
.string "ch3b_sleep"
|
|
||||||
.string "ch3b_sleep1"
|
|
||||||
.string "ch3b_yield0"
|
|
||||||
.string "ch3b_yield1"
|
|
||||||
.string "ch3b_yield2"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_0_start
|
|
||||||
.global app_0_end
|
|
||||||
.align 3
|
|
||||||
app_0_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_bad_address.bin"
|
|
||||||
app_0_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_1_start
|
|
||||||
.global app_1_end
|
|
||||||
.align 3
|
|
||||||
app_1_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_bad_instructions.bin"
|
|
||||||
app_1_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_2_start
|
|
||||||
.global app_2_end
|
|
||||||
.align 3
|
|
||||||
app_2_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_bad_register.bin"
|
|
||||||
app_2_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_3_start
|
|
||||||
.global app_3_end
|
|
||||||
.align 3
|
|
||||||
app_3_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_hello_world.bin"
|
|
||||||
app_3_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_4_start
|
|
||||||
.global app_4_end
|
|
||||||
.align 3
|
|
||||||
app_4_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_power_3.bin"
|
|
||||||
app_4_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_5_start
|
|
||||||
.global app_5_end
|
|
||||||
.align 3
|
|
||||||
app_5_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_power_5.bin"
|
|
||||||
app_5_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_6_start
|
|
||||||
.global app_6_end
|
|
||||||
.align 3
|
|
||||||
app_6_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_power_7.bin"
|
|
||||||
app_6_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_7_start
|
|
||||||
.global app_7_end
|
|
||||||
.align 3
|
|
||||||
app_7_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3_taskinfo.bin"
|
|
||||||
app_7_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_8_start
|
|
||||||
.global app_8_end
|
|
||||||
.align 3
|
|
||||||
app_8_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_sleep.bin"
|
|
||||||
app_8_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_9_start
|
|
||||||
.global app_9_end
|
|
||||||
.align 3
|
|
||||||
app_9_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_sleep1.bin"
|
|
||||||
app_9_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_10_start
|
|
||||||
.global app_10_end
|
|
||||||
.align 3
|
|
||||||
app_10_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_yield0.bin"
|
|
||||||
app_10_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_11_start
|
|
||||||
.global app_11_end
|
|
||||||
.align 3
|
|
||||||
app_11_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_yield1.bin"
|
|
||||||
app_11_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_12_start
|
|
||||||
.global app_12_end
|
|
||||||
.align 3
|
|
||||||
app_12_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_yield2.bin"
|
|
||||||
app_12_end:
|
|
||||||
@@ -31,9 +31,7 @@ fs-img: $(APPS)
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ fs-img: $(APPS)
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add $(TARGET)
|
||||||
cargo install cargo-binutils --vers ~0.3
|
cargo install cargo-binutils
|
||||||
rustup component add rust-src
|
|
||||||
rustup component add llvm-tools-preview
|
|
||||||
|
|
||||||
$(KERNEL_BIN): kernel
|
$(KERNEL_BIN): kernel
|
||||||
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
@$(OBJCOPY) $(KERNEL_ELF) --strip-all -O binary $@
|
||||||
|
|||||||
@@ -1,140 +0,0 @@
|
|||||||
|
|
||||||
.align 3
|
|
||||||
.section .data
|
|
||||||
.global _num_app
|
|
||||||
_num_app:
|
|
||||||
.quad 13
|
|
||||||
.quad app_0_start
|
|
||||||
.quad app_1_start
|
|
||||||
.quad app_2_start
|
|
||||||
.quad app_3_start
|
|
||||||
.quad app_4_start
|
|
||||||
.quad app_5_start
|
|
||||||
.quad app_6_start
|
|
||||||
.quad app_7_start
|
|
||||||
.quad app_8_start
|
|
||||||
.quad app_9_start
|
|
||||||
.quad app_10_start
|
|
||||||
.quad app_11_start
|
|
||||||
.quad app_12_start
|
|
||||||
.quad app_12_end
|
|
||||||
|
|
||||||
.global _app_names
|
|
||||||
_app_names:
|
|
||||||
.string "ch2b_bad_address"
|
|
||||||
.string "ch2b_bad_instructions"
|
|
||||||
.string "ch2b_bad_register"
|
|
||||||
.string "ch2b_hello_world"
|
|
||||||
.string "ch2b_power_3"
|
|
||||||
.string "ch2b_power_5"
|
|
||||||
.string "ch2b_power_7"
|
|
||||||
.string "ch3_taskinfo"
|
|
||||||
.string "ch3b_sleep"
|
|
||||||
.string "ch3b_sleep1"
|
|
||||||
.string "ch3b_yield0"
|
|
||||||
.string "ch3b_yield1"
|
|
||||||
.string "ch3b_yield2"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_0_start
|
|
||||||
.global app_0_end
|
|
||||||
.align 3
|
|
||||||
app_0_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_bad_address.bin"
|
|
||||||
app_0_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_1_start
|
|
||||||
.global app_1_end
|
|
||||||
.align 3
|
|
||||||
app_1_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_bad_instructions.bin"
|
|
||||||
app_1_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_2_start
|
|
||||||
.global app_2_end
|
|
||||||
.align 3
|
|
||||||
app_2_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_bad_register.bin"
|
|
||||||
app_2_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_3_start
|
|
||||||
.global app_3_end
|
|
||||||
.align 3
|
|
||||||
app_3_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_hello_world.bin"
|
|
||||||
app_3_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_4_start
|
|
||||||
.global app_4_end
|
|
||||||
.align 3
|
|
||||||
app_4_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_power_3.bin"
|
|
||||||
app_4_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_5_start
|
|
||||||
.global app_5_end
|
|
||||||
.align 3
|
|
||||||
app_5_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_power_5.bin"
|
|
||||||
app_5_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_6_start
|
|
||||||
.global app_6_end
|
|
||||||
.align 3
|
|
||||||
app_6_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch2b_power_7.bin"
|
|
||||||
app_6_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_7_start
|
|
||||||
.global app_7_end
|
|
||||||
.align 3
|
|
||||||
app_7_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3_taskinfo.bin"
|
|
||||||
app_7_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_8_start
|
|
||||||
.global app_8_end
|
|
||||||
.align 3
|
|
||||||
app_8_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_sleep.bin"
|
|
||||||
app_8_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_9_start
|
|
||||||
.global app_9_end
|
|
||||||
.align 3
|
|
||||||
app_9_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_sleep1.bin"
|
|
||||||
app_9_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_10_start
|
|
||||||
.global app_10_end
|
|
||||||
.align 3
|
|
||||||
app_10_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_yield0.bin"
|
|
||||||
app_10_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_11_start
|
|
||||||
.global app_11_end
|
|
||||||
.align 3
|
|
||||||
app_11_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_yield1.bin"
|
|
||||||
app_11_end:
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
.global app_12_start
|
|
||||||
.global app_12_end
|
|
||||||
.align 3
|
|
||||||
app_12_start:
|
|
||||||
.incbin "../ci-user/user/build/bin/ch3b_yield2.bin"
|
|
||||||
app_12_end:
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
nightly-2022-04-11
|
|
||||||
5
rust-toolchain.toml
Normal file
5
rust-toolchain.toml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[toolchain]
|
||||||
|
profile = "minimal"
|
||||||
|
channel = "nightly-2022-08-05"
|
||||||
|
components = ["rust-src", "llvm-tools-preview", "rustfmt", "clippy"]
|
||||||
|
targets = ["riscv64gc-unknown-none-elf"]
|
||||||
Reference in New Issue
Block a user