risc-v中文社区

 找回密码
 立即注册
查看: 1610|回复: 0

[原创] 手把手教你开始搭建Risc-v Rocket环境(2)

[复制链接]

347

主题

564

帖子

2237

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2237
发表于 2021-7-28 13:49:03 | 显示全部楼层 |阅读模式
4:参考 https://blog.csdn.net/feelingjun/article/details/52301548 中所说,修改.gitmodules内容(不需要)。参考 ~/rocketchip/rocket-chip/README.md中所说:

joe@joe-Inspiron-7460:~/rocketchip/rocket-chip$ cd riscv-tools
joe@joe-Inspiron-7460:~/rocketchip/rocket-chip/riscv-tools$ git submodule update --init --recursive
正克隆到 'firrtl'...
remote: Counting objects: 19723, done.
remote: Compressing objects: 100% (104/104), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: 过早的文件结束符(EOF)
fatal: index-pack failed
fatal: 无法克隆 'https://github.com/ucb-bar/firrtl.git' 到子模组路径 'firrtl'


执行这个命令的时候,发现~/rocketchip/rocket-chip/中出现了firrtl目录。但是当最终命令执行结果如上所示(无法
克隆'https://github.com/ucb-bar/firrtl.git' 到子模组路径 'firrtl')之后,firrtl目录又没有了。
我分析:firrtl无法克隆,而firrtl又需要依赖verilator和sbt。

5:安装sbt的包管理源 参考 https://github.com/freechipsproject/chisel3#installation

joe@joe-Inspiron-7460:~/rocketchip/rocket-chip/riscv-tools$ cd ~/Downloads/
joe@joe-Inspiron-7460:~/Downloads$ echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list

joe@joe-Inspiron-7460:~/Downloads$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
Executing: /tmp/tmp.VjJPK6Y8yt/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv
642AC823
gpg: 下载密钥‘642AC823’,从 hkp 服务器 keyserver.ubuntu.com
gpg: 密钥 642AC823:公钥“sbt build tool <scalasbt@gmail.com>”已导入
gpg: 合计被处理的数量:1
gpg:               已导入:1  (RSA: 1)

joe@joe-Inspiron-7460:~/Downloads$ sudo apt-get update

joe@joe-Inspiron-7460:~/Downloads$ sudo apt-get install sbt
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
下列【新】软件包将被安装:
  sbt
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 179 个软件包未被升级。
需要下载 1,322 kB 的归档。
解压缩后会消耗 1,300 kB 的额外空间。
获取:1 https://dl.bintray.com/sbt/debian  sbt 1.1.6 [1,322 kB]
已下载 1,322 kB,耗时 19秒 (69.1 kB/s)                                         
正在选中未选择的软件包 sbt。
(正在读取数据库 ... 系统当前共安装有 181537 个文件和目录。)
正准备解包 .../apt/archives/sbt_1.1.6_all.deb  ...
正在解包 sbt (1.1.6) ...
正在处理用于 man-db (2.7.5-1) 的触发器 ...
正在设置 sbt (1.1.6) ...
Creating system group: sbt
Creating system user: sbt in sbt with sbt daemon-user and shell /bin/false
6:安装verilator 也是参考前面所说的网页 https://github.com/freechipsproject/chisel3#installation

joe@joe-Inspiron-7460:~/Downloads$ sudo apt-get install git make autoconf g++ flex bison
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
autoconf 已经是最新版 (2.69-9)。
bison 已经是最新版 (2:3.0.4.dfsg-1)。
flex 已经是最新版 (2.6.0-11)。
g++ 已经是最新版 (4:5.3.1-1ubuntu1)。
make 已经是最新版 (4.1-6)。
git 已经是最新版 (1:2.7.4-0ubuntu1.4)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 179 个软件包未被升级。

joe@joe-Inspiron-7460:~/Downloads$ git clone http://git.veripool.org/git/verilator
正克隆到 'verilator'...
fatal: unable to access 'http://git.veripool.org/git/verilator/': Failed to connect to git.veripool.org port 80: 连接超时
joe@joe-Inspiron-7460:~/Downloads$ git clone http://git.veripool.org/git/verilator
正克隆到 'verilator'...
检查连接... 完成。

joe@joe-Inspiron-7460:~/Downloads$ ls
jdk-8u171-linux-x64.tar.gz  verilator
joe@joe-Inspiron-7460:~/Downloads$ cd verilator/
joe@joe-Inspiron-7460:~/Downloads/verilator$ ls
Artistic      COPYING.LESSER    install-sh     nodist        verilator.pc.in
bin           doxygen.config    internals.pod  README.pod
Changes       doxygen-mainpage  Makefile.in    src
configure.ac  examples          MANIFEST.SKIP  test_regress
COPYING       include           mkinstalldirs  TODO
joe@joe-Inspiron-7460:~/Downloads/verilator$ git pull
Already up-to-date.
joe@joe-Inspiron-7460:~/Downloads/verilator$ git branch -r
  origin/HEAD -> origin/master
  origin/develop-v4
  origin/foreach_test
  origin/master
  origin/stable

joe@joe-Inspiron-7460:~/Downloads/verilator$ git checkout verilator_3_904
Note: checking out 'verilator_3_904'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD 目前位于 0253017... Version bump
joe@joe-Inspiron-7460:~/Downloads/verilator$ git checkout -b verilator_3_904
切换到一个新分支 'verilator_3_904'
joe@joe-Inspiron-7460:~/Downloads/verilator$ unset VERILATOR_ROOT
joe@joe-Inspiron-7460:~/Downloads/verilator$ autoconf
joe@joe-Inspiron-7460:~/Downloads/verilator$ ./configure
joe@joe-Inspiron-7460:~/Downloads/verilator$ make
joe@joe-Inspiron-7460:~/Downloads/verilator$ make test
joe@joe-Inspiron-7460:~/Downloads/verilator$ sudo make install

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



Archiver|手机版|小黑屋|risc-v中文社区

GMT+8, 2024-4-20 20:32 , Processed in 0.014397 second(s), 17 queries .

risc-v中文社区论坛 官方网站

Copyright © 2018-2021, risc-v open source

快速回复 返回顶部 返回列表