代码拉取完成,页面将自动刷新
#!/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。