* Nios eCos builds now survive reboots under Linux and multiple
[nios2ecos.git] / nios_env.sh
blobdf0b1dd7d938099af609969c0bdb310065290ba0
1 # set up enviornment variables.
3 # cd nios2ecos
4 # source nios_env.sh
6 # Intended to work on Cygwin & Linux out of the box(tested on Ubuntu 9.04
7 # as of writing).
9 export NIOS_ECOS=`pwd`/packages
11 if [ `uname` = Linux ] ;then
12 echo "Linux box"
13 export WIN_ALTERA_ROOTDIR=/opt/altera9.0
14 export CYG_ALTERA_ROOTDIR=/opt/altera9.0
15 export PATH=$PATH:$CYG_ALTERA_ROOTDIR/nios2eds/bin/nios2-gnutools/H-i686-pc-linux-gnu/bin
16 export TMP=/tmp
17 else
18 echo "Cygwin"
19 export CYGWIN=nontsec
20 export WIN_ALTERA_ROOTDIR=c:/altera/90
21 export CYG_ALTERA_ROOTDIR=/cygdrive/c/altera/90
22 export PATH=$PATH:$CYG_ALTERA_ROOTDIR/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin
25 # DANGER!!! here we need windows-like paths for compatibility.
26 export QUARTUS_ROOTDIR=$WIN_ALTERA_ROOTDIR/quartus
27 export SOPC_KIT_NIOS2=$WIN_ALTERA_ROOTDIR/nios2eds
28 export PERL5LIB=/bin:$CYG_ALTERA_ROOTDIR/quartus/sopc_builder/bin/perl_lib:$CYG_ALTERA_ROOTDIR/quartus/sopc_builder/bin/europa:$CYG_ALTERA_ROOTDIR/quartus/sopc_builder/bin
30 # This is the standard installation directory for eCos 3.0
31 echo "Adding eCos 3.0 tools to path: ~/ecos/ecos-3.0/tools/bin"
32 # FIX!!! check if ecosconfig is already in the path and only add
33 # this to path if it isn't
34 export PATH=$PATH:~/ecos/ecos-3.0/tools/bin
35 # FIX!!! check if ECOS_REPOSITORY variable is already set up
36 export ECOS_REPOSITORY=~/ecos/ecos-3.0/packages
37 echo "Prepend Nios eCos repository to ECOS_REPOSITORY=$ECOS_REPOSITORY"
38 export ECOS_REPOSITORY=$NIOS_ECOS:$ECOS_REPOSITORY
39 export ECOS_REPOSITORY=$NIOS_ECOS/../tools/gcc4libstdxx/ecos:$ECOS_REPOSITORY
40 echo "ECOS_REPOSITORY=$ECOS_REPOSITORY"
43 # generally place the altera stuff *LAST* in the path because it contains
44 # lots of obsolete stuff
45 export PATH=$PATH:$NIOS_ECOS/hal/nios2/arch/current/host
46 export PATH=$PATH:$CYG_ALTERA_ROOTDIR/quartus/sopc_builder/bin
47 export PATH=$PATH:$CYG_ALTERA_ROOTDIR/quartus/bin
48 export PATH=$PATH:$CYG_ALTERA_ROOTDIR/nios2eds/bin
52 # Workaround for cygpath problems.
53 if [ `uname` = Linux ] ;then
54 export PATH=$PATH:$NIOS_ECOS/hal/nios2/arch/current/host/cygpath