Update README, travis, riscv crate.

master
WangRunji 6 years ago
parent 924c061d64
commit cd1bd55729

@ -2,7 +2,7 @@ sudo: required
language: rust
rust: nightly-2018-08-03
rust: nightly-2018-09-18
cache:
cargo: true
@ -10,7 +10,6 @@ cache:
addons:
apt:
packages:
- nasm
- qemu
env:
@ -28,9 +27,8 @@ install:
before_script:
- 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)
- cargo install-update -a
- (test -x $HOME/.cargo/bin/bootimage || cargo install bootimage)
script:
- 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
* Rust toolchain at nightly-2018-09-03
* `cargo-xbuild`
* `QEMU` >= 2.12.0
* riscv32
* RISCV64 GNU toolchain
* x86_64
* `nasm`
* `grub-mkrescue`
* `xorriso`
* [Rust](https://www.rust-lang.org) toolchain at nightly-2018-09-18
* Cargo tools: [cargo-xbuild](https://github.com/rust-osdev/cargo-xbuild), [bootimage](https://github.com/rust-osdev/bootimage)
* QEMU >= 2.12.0
* [RISCV64 GNU toolchain](https://www.sifive.com/products/tools/) (for riscv32)
### How to run
```bash
rustup component add rust-src
cargo install cargo-xbuild bootimage
```
```bash
git clone https://github.com/wangrunji0408/RustOS.git --recursive
cd RustOS/kernel
rustup override set nightly-2018-09-03
rustup override set nightly-2018-09-18
make run arch=riscv32|x86_64
# For FPGA:
# make run arch=riscv32 board=1

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

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

Loading…
Cancel
Save