mirror of
https://github.com/im-tomu/fomu-toolchain.git
synced 2024-09-20 02:40:08 +00:00
initial commit
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
commit
12bfa457b4
12
.gitattributes
vendored
Normal file
12
.gitattributes
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
*.py text eol=lf
|
||||||
|
*.dfu binary
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
*.bin binary
|
||||||
|
*.elf binary
|
||||||
|
*.h text eol=lf
|
||||||
|
*.c text eol=lf
|
||||||
|
README.* text eol=lf
|
||||||
|
LICENSE text eol=lf
|
||||||
|
Makefile text eol=lf
|
||||||
|
*.mk text eol=lf
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fomu-toolchain-*
|
||||||
|
input/
|
||||||
|
.vscode/
|
30
.travis.yml
Normal file
30
.travis.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
language: minimal
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- env: ARCH=windows
|
||||||
|
- env: ARCH=macos
|
||||||
|
- env: ARCH=linux_x86_64
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- unzip
|
||||||
|
- zip
|
||||||
|
install: skip
|
||||||
|
script: ./build.sh
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
api_key:
|
||||||
|
secure: XQT7uml8NgeV21l8fjJkcRxN+MjN1RZoI3uoLd+c9dKqLT3KPRx2qsVkq2PyuWnMLGJfnYEeguocq7nDPKYLbXEhG9Q5t+C7pKDKFwwhKkIvjBESN6e1qzVrRfKgCyQltO1F4+xQ39ks8sxAWl2oGF5ag9JoG0HN3SCKsFvQtWb05DYU3ijIGyUdDsx2IMZZW6N2RguF4iiFzgzP062YDiz1e0rJ9JcOWRkmt6D/2srur2pay5xl9+x8F8QjWdBwk4O/JldavRo0PQhT0osvr8MDqdG9Ad+/9116OWeOO4a0kIj1RwIhcRmgvbjTX2HAU5UW9IPP4IgZp2fT5TQ4Wc6c3ov7UU0o/hXRJJBO52EbnAcqlucnKPggYfun8svvqD6efsj3wHCLr0SaGYeZ0bmehn+b5iHudHM9XNslRxqEiKwaAGpJy9Uk9ncLqNnspel288CGh9zJfXDcWH4uHlA6Dy/NU3WQ9rHifUBIScobJVVdgEfaYctPKN7kLS7SYFUr/E2EPRiBCB5DuuGngjiie73KoU6O9kyFWvpfdjV4g9BnG2MmRd2k1CBU6Qx0H1e9teWqvkLAYvibiA0VcJuhlaC14PDJgWTgIOVJG4i36DBUilvLX2bBwqnBQ+E+j3WY8Mh8kw4zNmGAzjn5jPRHSXWpfhlktYbGHOeC0K0=
|
||||||
|
file:
|
||||||
|
- output/*.tar.gz
|
||||||
|
- output/*.zip
|
||||||
|
file_glob: true
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
repo: im-fomu/fomu-toolchain
|
||||||
|
all_branches: true
|
||||||
|
tags: true
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
# Release tags
|
||||||
|
- /^v\d+\.\d+/
|
14
README.md
Normal file
14
README.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Fomu Toolchain
|
||||||
|
|
||||||
|
Fomu is an FPGA in your USB port. This repository contains prebuilt versions of all the tools you will need to develop for Fomu.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Download the [latest release](https://github.com/im-fomu/fomu-toolchain/releases/latest) for your platform and extract it somewhere on your disk. Then set your PATH:
|
||||||
|
|
||||||
|
* MacOS: `export PATH=[path-to-bin]:$PATH`
|
||||||
|
* Linux: `export PATH=[path-to-bin]:$PATH`
|
||||||
|
* Windows Powershell: `$ENV:PATH = "[path-to-bin];" + $ENV:PATH`
|
||||||
|
* Windows cmd.exe: `PATH=[path-to-bin];%PATH`
|
||||||
|
|
||||||
|
To confirm installation, run a command such as `nextpnr-ice40` or `yosys`.
|
149
build.sh
Normal file
149
build.sh
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
#!/bin/sh -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
win_python_url="https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-amd64.zip"
|
||||||
|
win_nextpnr_url="https://github.com/xobs/toolchain-nextpnr-ice40/releases/download/v1.25-fomu/nextpnr-windows_amd64-v1.25-fomu.zip"
|
||||||
|
win_icestorm_url="https://github.com/xobs/toolchain-icestorm/releases/download/v1.26-fomu/toolchain-icestorm-windows_amd64-v1.26-fomu.zip"
|
||||||
|
win_wishbone_tool_url="https://github.com/xobs/wishbone-utils/releases/download/v0.2.10/wishbone-tool-v0.2.10-x86_64-pc-windows-gnu.tar.gz"
|
||||||
|
win_riscv_url="https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.2.0-2019.05.3-x86_64-w64-mingw32.zip"
|
||||||
|
win_make_url="https://sourceforge.net/projects/ezwinports/files/make-4.2.1-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.25-fomu/nextpnr-ice40-darwin-v1.25-fomu.tar.gz
|
||||||
|
mac_icestorm_url=https://github.com/xobs/toolchain-icestorm/releases/download/v1.26-fomu/toolchain-icestorm-darwin-v1.26-fomu.tar.gz
|
||||||
|
mac_wishbone_tool_url=https://github.com/xobs/wishbone-utils/releases/download/v0.2.10/wishbone-tool-v0.2.10-x86_64-apple-darwin.tar.gz
|
||||||
|
mac_riscv_url=https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.2.0-2019.05.3-x86_64-apple-darwin.tar.gz
|
||||||
|
|
||||||
|
linux_nextpnr_url=https://github.com/xobs/toolchain-nextpnr-ice40/releases/download/v1.25-fomu/nextpnr-ice40-linux_x86_64-v1.25-fomu.tar.gz
|
||||||
|
linux_icestorm_url=https://github.com/xobs/toolchain-icestorm/releases/download/v1.26-fomu/toolchain-icestorm-linux_x86_64-v1.26-fomu.tar.gz
|
||||||
|
linux_wishbone_tool_url=https://github.com/xobs/wishbone-utils/releases/download/v0.2.10/wishbone-tool-v0.2.10-x86_64-unknown-linux-gnu.tar.gz
|
||||||
|
linux_riscv_url=https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.2.0-2019.05.3-x86_64-linux-centos6.tar.gz
|
||||||
|
|
||||||
|
base="$(pwd)"
|
||||||
|
output_name="fomu-toolchain-${ARCH}-${TRAVIS_TAG}"
|
||||||
|
output="${base}/output/${output_name}"
|
||||||
|
input="${base}/input"
|
||||||
|
mkdir -p $output
|
||||||
|
mkdir -p $input
|
||||||
|
mkdir -p $output/bin
|
||||||
|
|
||||||
|
echo "${TRAVIS_TAG}" > $output/VERSION
|
||||||
|
|
||||||
|
case "${ARCH}" in
|
||||||
|
"windows")
|
||||||
|
# Python 3.7.3 (which matches the version in nextpnr)
|
||||||
|
wget -O $input/python-${ARCH}.zip $win_python_url
|
||||||
|
cd $output/bin
|
||||||
|
unzip -o $input/python-${ARCH}.zip
|
||||||
|
rm python37.zip # we already have this unzipped from nextpnr-ice40
|
||||||
|
|
||||||
|
# Nextpnr
|
||||||
|
wget -O $input/nextpnr-${ARCH}.zip $win_nextpnr_url
|
||||||
|
cd $output/bin
|
||||||
|
unzip -o $input/nextpnr-${ARCH}.zip
|
||||||
|
|
||||||
|
# Yosys, icestorm, and dfu_util
|
||||||
|
wget -O $input/icestorm-${ARCH}.zip $win_icestorm_url
|
||||||
|
cd $output
|
||||||
|
unzip -o $input/icestorm-${ARCH}.zip
|
||||||
|
|
||||||
|
# Teraterm Terminal
|
||||||
|
wget -O $input/teraterm-${ARCH}.zip $win_teraterm_url
|
||||||
|
cd $output/bin
|
||||||
|
unzip -o $input/teraterm-${ARCH}.zip
|
||||||
|
|
||||||
|
# Wishbone Tool
|
||||||
|
wget -O $input/wishbone-tool-${ARCH}.tar.gz $win_wishbone_tool_url
|
||||||
|
cd $output/bin
|
||||||
|
tar xvzf $input/wishbone-tool-${ARCH}.tar.gz
|
||||||
|
|
||||||
|
# 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}.zip $win_riscv_url
|
||||||
|
cd $input
|
||||||
|
mkdir re
|
||||||
|
cd re
|
||||||
|
unzip -o $input/riscv-${ARCH}.zip
|
||||||
|
cp -f -l -r */* $output
|
||||||
|
cd ..
|
||||||
|
rm -rf re
|
||||||
|
|
||||||
|
# Make.exe
|
||||||
|
wget -O $input/make-${ARCH}.zip $win_make_url
|
||||||
|
cd $output
|
||||||
|
unzip -o $input/make-${ARCH}.zip
|
||||||
|
|
||||||
|
cd $base/output
|
||||||
|
zip -r $output_name.zip $output_name
|
||||||
|
;;
|
||||||
|
|
||||||
|
"macos")
|
||||||
|
# Nextpnr
|
||||||
|
wget -O $input/nextpnr-${ARCH}.tar.gz $mac_nextpnr_url
|
||||||
|
cd $output
|
||||||
|
tar xvzf $input/nextpnr-${ARCH}.tar.gz
|
||||||
|
|
||||||
|
# Yosys, icestorm, and dfu_util
|
||||||
|
wget -O $input/icestorm-${ARCH}.tar.gz $mac_icestorm_url
|
||||||
|
cd $output
|
||||||
|
tar xvzf $input/icestorm-${ARCH}.tar.gz
|
||||||
|
|
||||||
|
# Wishbone Tool
|
||||||
|
wget -O $input/wishbone-tool-${ARCH}.tar.gz $mac_wishbone_tool_url
|
||||||
|
cd $output/bin
|
||||||
|
tar xvzf $input/wishbone-tool-${ARCH}.tar.gz
|
||||||
|
|
||||||
|
# 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 $mac_riscv_url
|
||||||
|
cd $input
|
||||||
|
mkdir re
|
||||||
|
cd re
|
||||||
|
tar xvzf $input/riscv-${ARCH}.tar.gz
|
||||||
|
cp -f -l -r */* $output
|
||||||
|
cd ..
|
||||||
|
rm -rf re
|
||||||
|
|
||||||
|
cd $base/output
|
||||||
|
zip -r $output_name.zip $output_name
|
||||||
|
;;
|
||||||
|
|
||||||
|
"linux_x86_64")
|
||||||
|
# Nextpnr
|
||||||
|
wget -O $input/nextpnr-${ARCH}.tar.gz $linux_nextpnr_url
|
||||||
|
cd $output
|
||||||
|
tar xvzf $input/nextpnr-${ARCH}.tar.gz
|
||||||
|
|
||||||
|
# Yosys, icestorm, and dfu_util
|
||||||
|
wget -O $input/icestorm-${ARCH}.tar.gz $linux_icestorm_url
|
||||||
|
cd $output
|
||||||
|
tar xvzf $input/icestorm-${ARCH}.tar.gz
|
||||||
|
|
||||||
|
# Wishbone Tool
|
||||||
|
wget -O $input/wishbone-tool-${ARCH}.tar.gz $linux_wishbone_tool_url
|
||||||
|
cd $output/bin
|
||||||
|
tar xvzf $input/wishbone-tool-${ARCH}.tar.gz
|
||||||
|
|
||||||
|
# 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
|
||||||
|
cd $input
|
||||||
|
mkdir re
|
||||||
|
cd re
|
||||||
|
tar xvzf $input/riscv-${ARCH}.tar.gz
|
||||||
|
cp -f -l -r */* $output
|
||||||
|
cd ..
|
||||||
|
rm -rf re
|
||||||
|
|
||||||
|
cd $base/output
|
||||||
|
tar cvzf $output_name.tar.gz $output_name
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unrecognized architecture: ${ARCH}"
|
||||||
|
echo "Supported architectures: macos, windows, linux_x86_64"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
Reference in New Issue
Block a user