From b7d252e97979d1a22ea9c9501bbb1b27a221bf2c Mon Sep 17 00:00:00 2001 From: WangRunji Date: Thu, 21 Feb 2019 01:56:18 +0800 Subject: [PATCH] update travis & README --- .travis.yml | 24 +++++++++++++----------- README.md | 31 +++++++++++++++++++++++++++++-- ucore/CMakeLists.txt | 6 +++++- 3 files changed, 47 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 63c2356..3f76a7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,25 +14,27 @@ os: env: matrix: - - ARCH="riscv32" - - ARCH="riscv64" - - ARCH="i386" -# - ARCH="x86_64" - - ARCH="aarch64" + - ARCH="riscv32" SRC="ucore" + - ARCH="riscv64" SRC="ucore" + - ARCH="i386" SRC="ucore" +# - ARCH="x86_64" SRC="ucore" + - ARCH="aarch64" SRC="ucore" + - ARCH="x86_64" SRC="biscuit" install: - 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 = osx ] && export FILE="riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-apple-darwin"; + [ $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-2019.01.0-x86_64-apple-darwin"; wget https://static.dev.sifive.com/dev-tools/$FILE.tar.gz; tar xf $FILE.tar.gz; export PATH=$PATH:$PWD/$FILE/bin; fi - if [ $ARCH = aarch64 ]; then if [ $TRAVIS_OS_NAME = linux ]; then - wget https://web.stanford.edu/class/cs140e/files/aarch64-none-elf-linux-x64.tar.gz; - tar -xzvf aarch64-none-elf-linux-x64.tar.gz; - export PATH=$PATH:$PWD/aarch64-none-elf/bin; + export FILE="gcc-arm-8.2-2018.11-x86_64-aarch64-elf"; + wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2018.11/$FILE.tar.xz; + tar -xvf $FILE.tar.xz; + export PATH=$PATH:$PWD/$FILE/bin; elif [ $TRAVIS_OS_NAME = osx ]; then brew tap SergioBenitez/osxct; brew install aarch64-none-elf; @@ -51,7 +53,7 @@ install: fi script: - - cd ucore + - cd $SRC - mkdir build && cd build - cmake -DARCH=$ARCH .. - make diff --git a/README.md b/README.md index ea2668a..7d5ae17 100644 --- a/README.md +++ b/README.md @@ -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) +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 + +For ucore: + ```bash +cd ucore mkdir build && cd build cmake -DARCH={i386,x86_64,riscv32,riscv64,aarch64} .. make -``` \ No newline at end of file +``` + +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. \ No newline at end of file diff --git a/ucore/CMakeLists.txt b/ucore/CMakeLists.txt index 78d87f2..ee594b1 100644 --- a/ucore/CMakeLists.txt +++ b/ucore/CMakeLists.txt @@ -34,7 +34,11 @@ elseif (${ARCH} STREQUAL riscv64) set(PREFIX riscv64-unknown-elf-) set(CMAKE_C_FLAGS "-march=rv64imac -mabi=lp64 -mcmodel=medany") 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(LINK_FLAGS "-Ttext 0xffff000000000000") else()