Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Sep 9, 2015
1 parent cc8d4bf commit 91748d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
19 changes: 11 additions & 8 deletions scripts/get-env.sh
@@ -1,19 +1,21 @@
#! /bin/bash
#!/bin/bash

SETUP_SRC=$(realpath ${BASH_SOURCE[@]})
SETUP_DIR=$(dirname $SETUP_SRC)
USER=$(whoami)

BUILD_DIR=$SETUP_DIR/../build
SETUP_SRC=$(realpath ${BASH_SOURCE[0]})
SETUP_DIR=$(dirname $SETUP_SRC)
TOP_DIR=$(realpath $SETUP_DIR/..)
BUILD_DIR=$TOP_DIR/build
CONDA_DIR=$SETUP_DIR/build/conda
mkdir -p $BUILD_DIR


set -x
set -e

mkdir -p $BUILD_DIR

# Get and build gcc+binutils for the target
export PATH=$CONDA_DIR/bin:$PATH
(
export PATH=$CONDA_DIR/bin:$PATH
if [ ! -d $CONDA_DIR ]; then
cd $BUILD_DIR
wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
Expand All @@ -26,7 +28,6 @@ set -e
conda install binutils-lm32-elf
conda install gcc-lm32-elf
)
export PATH=$CONDA_DIR/bin:$PATH

# Get iverilog
(
Expand Down Expand Up @@ -78,6 +79,8 @@ export PATH=$CONDA_DIR/bin:$PATH
cd libfpgalink
make deps
)

USER=$(whoami)
# Load custom udev rules
(
cd $SETUP_DIR
Expand Down
8 changes: 2 additions & 6 deletions scripts/setup-env.sh
Expand Up @@ -7,8 +7,8 @@ SETUP_SRC=$(realpath ${BASH_SOURCE[0]})
SETUP_DIR=$(dirname $SETUP_SRC)
TOP_DIR=$(realpath $SETUP_DIR/..)
BUILD_DIR=$TOP_DIR/build
CONDA_DIR=$SETUP_DIR/build/conda

GNU_DIR=$BUILD_DIR/gnu
MIGEN_DIR=$BUILD_DIR/migen
MISOC_DIR=$BUILD_DIR/misoc
MAKESTUFF_DIR=$BUILD_DIR/makestuff
Expand All @@ -28,13 +28,9 @@ HDMI2USB_ENV=1
echo " This script is: $SETUP_SRC"
echo " Firmware directory: $TOP_DIR"
echo " Build directory is: $BUILD_DIR"
#echo " gnu toolchain installed at: $GNU_DIR"
#echo " migen found at: $MIGEN_DIR"
#echo " misoc found at: $MISOC_DIR"
#echo " fpgalink found at: $MAKESTUFF_DIR"

export LD_LIBRARY_PATH=$MAKESTUFF_DIR/libs/libfpgalink/lin.x64/rel:$LD_LIBRARY_PATH
export PYTHONPATH=$MIGEN_DIR:$MISOC_DIR:$MAKESTUFF_DIR/libs/libfpgalink/examples/python/:$PYTHONPATH
export PATH=$GNU_DIR/output/bin:/opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/:$PATH
export PATH=$CONDA_PATH/bin:/opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/:$PATH

alias python=python3

0 comments on commit 91748d2

Please sign in to comment.