1 Star 1 Fork 2

ic-starter/SpinalHDL-Easy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.sh 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
ic-starter 提交于 2020-12-21 23:18 . add riscv toolchain support
#!/usr/bin/env bash
#
# for ubuntu 18+, ubuntu 20+/latest is recommendded
#
# Usage:
# 1. perpare sbt package
# - scp/cp sbt-scala-spinalhdl-deps.tar.bz2 to /tmp
# - wget/cp sbt-1.4.5.deb to /tmp
# 2. run auto setup
# - $ chmod +x setup.sh
# - $ sudo ./setup.sh
# setup apt source to aliyun/mirrors
sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/' /etc/apt/sources.list
sed -i 's/security.ubuntu.com/mirrors.aliyun.com/' /etc/apt/sources.list
apt update
# install requirments tools
# interactive is needed for openjdk-8-jdk installation
apt install -y --fix-missing vim python3 python3-pip bison flex openssh-client wget \
openjdk-8-jdk git verilator iverilog
# prepare sbt adn scala/spinalhdl dependencies
#wget https://dl.bintray.com/sbt/debian/sbt-1.4.5.deb
dpkg -i ./extra/sbt-1.4.5.deb
# install riscv toolchain
if [[ -f "extra/riscv64-unknown-elf-gcc-8.3.0-"*".tar.gz" ]]; then
tar -xzvf ./extra/riscv64-unknown-elf-gcc-8.3.0-*.tar.gz
mv riscv64-unknown-elf-gcc-8.3.0-* /opt/riscv
echo "export PATH=$PATH:/opt/riscv/bin" >> ~/.bash_aliases
source ~/.bashrc
fi
tar -xjvf ./extra/sbt-scala-spinalhdl-deps.tar.bz2
mkdir -p ~/.cache/couriser
cp -rf sbt-scala-spinalhdl-deps/.sbt ~/
cp -rf sbt-scala-spinalhdl-deps/.ivy2 ~/
cp -rf sbt-scala-spinalhdl-deps/coursier ~/.cache
rm -rf sbt-scala-spinalhdl-deps
# pull/run spinalhdl project for test
mkdir -p ~/projects/spinalhdl
cd ~/projects/spinalhdl
#git clone https://gitee.com/ic-starter/SpinalTemplateSbt.git
git clone --recursive https://gitee.com/ic-starter/SpinalTemplateSbtDependencies.git
cd SpinalTemplateSbtDependencies && sbt run
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ic-starter/SpinalHDL-Easy.git
git@gitee.com:ic-starter/SpinalHDL-Easy.git
ic-starter
SpinalHDL-Easy
SpinalHDL-Easy
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385