migrate from xobs/toolchain-* to open-tool-forge/fpga-toolchain

This commit is contained in:
umarcor 2020-10-11 01:34:23 +02:00
parent a065098f5b
commit 00e028bcc8

View File

@ -1,21 +1,17 @@
#!/bin/sh -x
set -e
win_nextpnr_url="https://github.com/xobs/toolchain-nextpnr-ice40/releases/download/v1.46-fomu/nextpnr-ice40-windows_amd64-v1.46-fomu.zip"
win_yosys_url="https://github.com/xobs/toolchain-icestorm/releases/download/v1.43-fomu/toolchain-icestorm-windows_amd64-v1.43-fomu.zip"
win_openfpgatoolchain_url="https://github.com/open-tool-forge/fpga-toolchain/releases/download/nightly-20201010/fpga-toolchain-windows_amd64-nightly-20201010.zip"
win_wishbone_tool_url="https://github.com/litex-hub/wishbone-utils/releases/download/v0.6.10/wishbone-tool-v0.6.10-x86_64-pc-windows-gnu.tar.gz"
win_riscv_url="https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-w64-mingw32.zip"
win_python_url="https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-amd64.zip"
win_make_url="https://sourceforge.net/projects/ezwinports/files/make-4.3-without-guile-w32-bin.zip/download"
win_teraterm_url="https://osdn.net/frs/redir.php?m=constant&f=ttssh2%2F71232%2Fteraterm-4.103.zip"
mac_nextpnr_url="https://github.com/xobs/toolchain-nextpnr-ice40/releases/download/v1.46-fomu/nextpnr-ice40-darwin-v1.46-fomu.tar.gz"
mac_yosys_url="https://github.com/xobs/toolchain-icestorm/releases/download/v1.43-fomu/toolchain-icestorm-darwin-v1.43-fomu.tar.gz"
mac_openfpgatoolchain_url="https://github.com/open-tool-forge/fpga-toolchain/releases/download/nightly-20201010/fpga-toolchain-darwin-nightly-20201010.tar.xz"
mac_wishbone_tool_url="https://github.com/litex-hub/wishbone-utils/releases/download/v0.6.10/wishbone-tool-v0.6.10-x86_64-apple-darwin.tar.gz"
mac_riscv_url="https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-apple-darwin.tar.gz"
linux_nextpnr_url="https://github.com/xobs/toolchain-nextpnr-ice40/releases/download/v1.46-fomu/nextpnr-ice40-linux_x86_64-v1.46-fomu.tar.gz"
linux_yosys_url="https://github.com/xobs/toolchain-icestorm/releases/download/v1.43-fomu/toolchain-icestorm-linux_x86_64-v1.43-fomu.tar.gz"
linux_openfpgatoolchain_url="https://github.com/open-tool-forge/fpga-toolchain/releases/download/nightly-20201010/fpga-toolchain-linux_x86_64-nightly-20201010.tar.xz"
linux_wishbone_tool_url="https://github.com/litex-hub/wishbone-utils/releases/download/v0.6.10/wishbone-tool-v0.6.10-x86_64-unknown-linux-gnu.tar.gz"
linux_riscv_url="https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz"
@ -51,16 +47,10 @@ extract_zip() {
case "${ARCH}" in
"Windows")
# Python 3.7.3 (which matches the version in nextpnr)
extract_zip $win_python_url $input/python-${ARCH}.zip "/bin"
rm python37.zip # we already have this unzipped from nextpnr-ice40
rm -f python37._pth # If this file is present, PYTHONPATH is very broken
# Nextpnr
extract_zip $win_nextpnr_url $input/nextpnr-${ARCH}.zip "/bin"
# Yosys, icestorm, and dfu_util
extract_zip $win_yosys_url $input/yosys-${ARCH}.zip
# Open FPGA toolchain
wget -O $input/openfpgatoolchain-${ARCH}.zip $win_openfpgatoolchain_url
unzip $input/openfpgatoolchain-${ARCH}.zip
mv fpga-toolchain/* $output/
# Teraterm Terminal
extract_zip $win_teraterm_url $input/teraterm-${ARCH}.zip "/bin"
@ -91,11 +81,9 @@ case "${ARCH}" in
;;
"macOS")
# Nextpnr
curl -fsSL $mac_nextpnr_url | tar xvzf - -C $output
# Yosys, icestorm, and dfu_util
curl -fsSL $mac_yosys_url | tar xvzf - -C $output
# Open FPGA toolchain
curl -fsSL $mac_openfpgatoolchain_url | tar xvJf - -C $input
mv $input/fpga-toolchain/* $output/
# Wishbone Tool
curl -fsSL $mac_wishbone_tool_url | tar xvzf - -C $output/bin
@ -118,11 +106,9 @@ case "${ARCH}" in
;;
"Linux")
# Nextpnr
curl -fsSL $linux_nextpnr_url | tar xvzf - -C $output
# Yosys, icestorm, and dfu_util
curl -fsSL $linux_yosys_url | tar xvzf - -C $output
# Open FPGA toolchain
curl -fsSL $linux_openfpgatoolchain_url | tar xvJf - -C $input
mv $input/fpga-toolchain/* $output/
# Wishbone Tool
curl -fsSL $linux_wishbone_tool_url | tar xvzf - -C $output/bin
@ -130,7 +116,7 @@ case "${ARCH}" in
# Riscv Toolchain
# Note that we want to strip the front part of the path.
# Also, we do "cp -l" then "rm -rf" to merge the directories.
wget -O $input/riscv-${ARCH}.tar.gz $linux_riscv_url
wget -O $input/riscv-${ARCH}.tar.gz $linux_riscv_url
cd $input
mkdir re
cd re