官方教程:
https://github.com/freechipsproject/rocket-chip
https://github.com/riscv/riscv-tools
1、使用ubuntu,且GCC版本>=4.8
用了一天的centos安装,各种出错,乖乖用官方推荐的Ubuntu。
2、在/home/xj(自己决定)下面执行下列步骤:
$ git clone https://github.com/ucb-bar/rocket-chip.git $ cd rocket-chip $ git submodule update --init
3、安装相关工具:
sudo apt-get install autoconf automake autotools-dev curl device-tree-compiler libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev
4、
$ cd rocket-chip/riscv-tools $ git submodule update --init --recursive
(执行这步的时候,注意如果出现fatal、error等,删除所有文件,回到第2步重来) $ export RISCV=/home/xj/rocket-chip/riscv-tools/riscv-gnu-toolchain $ export MAKEFLAGS="$MAKEFLAGS -j8"
5、执行./build.sh
结果:安装成功,如下图: