update travis & README

master
WangRunji 6 years ago
parent fc8393f95e
commit b7d252e979

@ -14,25 +14,27 @@ os:
env: env:
matrix: matrix:
- ARCH="riscv32" - ARCH="riscv32" SRC="ucore"
- ARCH="riscv64" - ARCH="riscv64" SRC="ucore"
- ARCH="i386" - ARCH="i386" SRC="ucore"
# - ARCH="x86_64" # - ARCH="x86_64" SRC="ucore"
- ARCH="aarch64" - ARCH="aarch64" SRC="ucore"
- ARCH="x86_64" SRC="biscuit"
install: install:
- if [ $ARCH = riscv32 ] || [ $ARCH = riscv64 ]; then - if [ $ARCH = riscv32 ] || [ $ARCH = riscv64 ]; then
[ $TRAVIS_OS_NAME = linux ] && export FILE="riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-linux-ubuntu14"; [ $TRAVIS_OS_NAME = linux ] && export FILE="riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14";
[ $TRAVIS_OS_NAME = osx ] && export FILE="riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-apple-darwin"; [ $TRAVIS_OS_NAME = osx ] && export FILE="riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-apple-darwin";
wget https://static.dev.sifive.com/dev-tools/$FILE.tar.gz; wget https://static.dev.sifive.com/dev-tools/$FILE.tar.gz;
tar xf $FILE.tar.gz; tar xf $FILE.tar.gz;
export PATH=$PATH:$PWD/$FILE/bin; export PATH=$PATH:$PWD/$FILE/bin;
fi fi
- if [ $ARCH = aarch64 ]; then - if [ $ARCH = aarch64 ]; then
if [ $TRAVIS_OS_NAME = linux ]; then if [ $TRAVIS_OS_NAME = linux ]; then
wget https://web.stanford.edu/class/cs140e/files/aarch64-none-elf-linux-x64.tar.gz; export FILE="gcc-arm-8.2-2018.11-x86_64-aarch64-elf";
tar -xzvf aarch64-none-elf-linux-x64.tar.gz; wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2018.11/$FILE.tar.xz;
export PATH=$PATH:$PWD/aarch64-none-elf/bin; tar -xvf $FILE.tar.xz;
export PATH=$PATH:$PWD/$FILE/bin;
elif [ $TRAVIS_OS_NAME = osx ]; then elif [ $TRAVIS_OS_NAME = osx ]; then
brew tap SergioBenitez/osxct; brew tap SergioBenitez/osxct;
brew install aarch64-none-elf; brew install aarch64-none-elf;
@ -51,7 +53,7 @@ install:
fi fi
script: script:
- cd ucore - cd $SRC
- mkdir build && cd build - mkdir build && cd build
- cmake -DARCH=$ARCH .. - cmake -DARCH=$ARCH ..
- make - make

@ -1,10 +1,37 @@
# User programs from ucore_os_lab in C-lang # rCore-user
[![Build Status](https://travis-ci.org/wangrunji0408/rcore_user.svg?branch=master)](https://travis-ci.org/wangrunji0408/rcore_user) [![Build Status](https://travis-ci.org/wangrunji0408/rcore_user.svg?branch=master)](https://travis-ci.org/wangrunji0408/rcore_user)
User programs for [rCore OS](https://github.com/wangrunji0408/RustOS).
Now it has 2 parts:
* `ucore`: C-lang, from the original [ucore_os_lab](https://github.com/chyyuu/ucore_os_plus)
* `biscuit`: C/C++, from [Biscuit](https://github.com/mit-pdos/biscuit), based on a partial libc `litc`. (WIP)
## Build ## Build
For ucore:
```bash ```bash
cd ucore
mkdir build && cd build mkdir build && cd build
cmake -DARCH={i386,x86_64,riscv32,riscv64,aarch64} .. cmake -DARCH={i386,x86_64,riscv32,riscv64,aarch64} ..
make make
``` ```
For biscuit:
```bash
cd biscuit
mkdir build && cd build
cmake -DARCH=x86_64 ..
make
```
## Notice
* The syscall ids have been set compatible with Linux64.
* So the ucore part can not run on the original ucore.

@ -34,7 +34,11 @@ elseif (${ARCH} STREQUAL riscv64)
set(PREFIX riscv64-unknown-elf-) set(PREFIX riscv64-unknown-elf-)
set(CMAKE_C_FLAGS "-march=rv64imac -mabi=lp64 -mcmodel=medany") set(CMAKE_C_FLAGS "-march=rv64imac -mabi=lp64 -mcmodel=medany")
elseif (${ARCH} STREQUAL aarch64) elseif (${ARCH} STREQUAL aarch64)
set(PREFIX aarch64-none-elf-) if(APPLE)
set(PREFIX aarch64-none-elf-)
else()
set(PREFIX aarch64-elf-)
endif ()
set(CMAKE_C_FLAGS "-mgeneral-regs-only") set(CMAKE_C_FLAGS "-mgeneral-regs-only")
set(LINK_FLAGS "-Ttext 0xffff000000000000") set(LINK_FLAGS "-Ttext 0xffff000000000000")
else() else()

Loading…
Cancel
Save