Update README, travis, riscv crate.

master
WangRunji 6 years ago
parent 924c061d64
commit cd1bd55729

@ -2,7 +2,7 @@ sudo: required
language: rust language: rust
rust: nightly-2018-08-03 rust: nightly-2018-09-18
cache: cache:
cargo: true cargo: true
@ -10,7 +10,6 @@ cache:
addons: addons:
apt: apt:
packages: packages:
- nasm
- qemu - qemu
env: env:
@ -28,9 +27,8 @@ install:
before_script: before_script:
- rustup component add rust-src - rustup component add rust-src
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
- (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild) - (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild)
- cargo install-update -a - (test -x $HOME/.cargo/bin/bootimage || cargo install bootimage)
script: script:
- cd kernel && make build arch=$ARCH - cd kernel && make build arch=$ARCH

@ -22,22 +22,22 @@ In fact, it's more complicated than we expected to write an OS starting from scr
### Environment ### Environment
* Rust toolchain at nightly-2018-09-03 * [Rust](https://www.rust-lang.org) toolchain at nightly-2018-09-18
* `cargo-xbuild` * Cargo tools: [cargo-xbuild](https://github.com/rust-osdev/cargo-xbuild), [bootimage](https://github.com/rust-osdev/bootimage)
* `QEMU` >= 2.12.0 * QEMU >= 2.12.0
* riscv32 * [RISCV64 GNU toolchain](https://www.sifive.com/products/tools/) (for riscv32)
* RISCV64 GNU toolchain
* x86_64
* `nasm`
* `grub-mkrescue`
* `xorriso`
### How to run ### How to run
```bash
rustup component add rust-src
cargo install cargo-xbuild bootimage
```
```bash ```bash
git clone https://github.com/wangrunji0408/RustOS.git --recursive git clone https://github.com/wangrunji0408/RustOS.git --recursive
cd RustOS/kernel cd RustOS/kernel
rustup override set nightly-2018-09-03 rustup override set nightly-2018-09-18
make run arch=riscv32|x86_64 make run arch=riscv32|x86_64
# For FPGA: # For FPGA:
# make run arch=riscv32 board=1 # make run arch=riscv32 board=1

@ -1 +1 @@
Subproject commit 50d2008d7579e24fc4f29889b73831acdd9aa830 Subproject commit f358204af01f2374ab6ed6ea059f724cd5f2fe6f

@ -38,7 +38,6 @@ endif
ifeq ($(arch), riscv32) ifeq ($(arch), riscv32)
qemu_opts := -machine virt -kernel $(bin) -nographic qemu_opts := -machine virt -kernel $(bin) -nographic
endif endif
features := use_apic
ifdef board ifdef board
features := $(features) no_bbl features := $(features) no_bbl
@ -78,7 +77,7 @@ objdump := $(prefix)objdump
cc := $(prefix)gcc cc := $(prefix)gcc
as := $(prefix)as as := $(prefix)as
.PHONY: all clean run build asm doc justrun .PHONY: all clean run build asm doc justrun kernel
all: $(kernel) all: $(kernel)
@ -97,7 +96,7 @@ debug: $(bin)
@qemu-system-$(arch) $(qemu_opts) -s -S & @qemu-system-$(arch) $(qemu_opts) -s -S &
ifeq ($(arch), x86_64) ifeq ($(arch), x86_64)
build: $(kernel) build: kernel
else else
build: $(bin) build: $(bin)
endif endif
@ -108,7 +107,7 @@ asm:
elf-h: elf-h:
@$(objdump) -h $(kernel) @$(objdump) -h $(kernel)
$(bin): $(kernel) $(bin): kernel
ifdef board ifdef board
@cp $(kernel) $@ @cp $(kernel) $@
else else
@ -125,7 +124,7 @@ else
cp bbl ../../kernel/$@ cp bbl ../../kernel/$@
endif endif
$(kernel): kernel:
ifeq ($(arch), x86_64) ifeq ($(arch), x86_64)
@bootimage build $(build_args) @bootimage build $(build_args)
else else

Loading…
Cancel
Save