OpenCores
URL https://opencores.org/ocsvn/minsoc/minsoc/trunk

Subversion Repositories minsoc

[/] [minsoc/] [branches/] [rc-1.0/] [utils/] [contributions/] [setup/] [minsoc-install.sh] - Diff between revs 41 and 43

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 41 Rev 43
Line 1... Line 1...
#!/bin/bash
#!/bin/bash
# Xanthopoulos Constantinos
# Xanthopoulos Constantinos
# Installing cable drivers for the impact to work
 
# under Debian Squeeze.
 
 
 
 
 
# ===== CONFIGURATIONS =====
# ===== CONFIGURATIONS =====
# ==========================
# ==========================
 
 
# Where should I put the dir. minsoc?
# Where should I put the dir. minsoc?
# ex. /home/conx/Thesis/
# ex. /home/conx/Thesis/
DIR_TO_INSTALL=""
DIR_TO_INSTALL="/home/conx/Thesis/tmp/"
 
 
 
# This variable should be set to trunk
 
# or to stable.
 
VERSION="trunk"
 
 
 
# This variable should take one of
 
# the following values depending
 
# to your system: linux, cygwin, freebsd
 
ENV="linux"
 
 
 
# !!! DO NOT EDIT BELLOW THIS LINE !!!
 
# ===================================
 
 
# ===== SCRIPT ======
# ===== SCRIPT ======
# ===================
# ===================
 
 
 
# Debug ?
export DEBUG=0;
export DEBUG=0;
. conxshlib.sh
. beautify.sh
 
. func.sh
 
 
 
# User check!
if [ `whoami` == "root" ];
if [ `whoami` == "root" ];
then
then
        errormsg "You shouldn't be root for this script to run.";
        errormsg "You shouldn't be root for this script to run.";
fi;
fi;
 
 
 
# Wizard
 
if [ $DIR_TO_INSTALL == "" ]
 
then
 
        read $DIR_TO_INSTALL;
 
fi
 
 
 
# Directory exists?
if [ ! -d $DIR_TO_INSTALL ]
if [ ! -d $DIR_TO_INSTALL ]
then
then
        errormsg "Directory doesn't exist. Please create it";
        errormsg "Directory doesn't exist. Please create it";
fi;
fi;
 
 
cd $DIR_TO_INSTALL
cd $DIR_TO_INSTALL
 
 
if [ ! -f "minsoc.tar.gz" ];
 
 
if [ $VERSION == "" ]
then
then
        execcmd "Download minsoc" "wget http://xanthopoulos.info/pub/minsoc.tar.gz"
        while [ $VERSION != "trunk" -a $VERSION != "stable"]
 
        do
 
                cecho "Which version you want to install [stable/trunk]?"
 
                read $VERSION;
 
        done
fi
fi
 
 
if [ -d "minsoc" ]
if [ $ENV == "" ]
then
then
        rm minsoc -rf
        while [ $ENV != "linux" -a $ENV != "cygwin" -a $ENV != "freebsd" ]
 
        do
 
                cecho "In which environement are you installing MinSOC [linux/cygwin/freebsd]?"
 
                read $ENV;
 
        done
fi
fi
 
 
execcmd "Un-tar minsoc" "tar xf minsoc.tar.gz"
 
 
# Checkout MinSOC
 
if [ $VERSION == "trunk" ]
 
then
 
        execcmd "Download minsoc" "svn co -q http://opencores.org/ocsvn/minsoc/minsoc/trunk/ minsoc"
 
else
 
        execcmd "Download minsoc" "svn co -q http://opencores.org/ocsvn/minsoc/minsoc/tags/release-0.9/ minsoc"
 
fi
 
 
 
cd minsoc/rtl/verilog
 
 
 
execcmd "Checkout adv_jtag_bridge" "svn co -q http://opencores.org/ocsvn/adv_debug_sys/adv_debug_sys/trunk adv_debug_sys"
 
execcmd "Checkout ethmac" "svn co -q http://opencores.org/ocsvn/ethmac/ethmac/trunk ethmac"
 
execcmd "Checkout openrisc" "svn co -q  http://opencores.org/ocsvn/openrisc/openrisc/trunk/or1200 or1200"
 
execcmd "Checkout uart" "svn co -q http://opencores.org/ocsvn/uart16550/uart16550/trunk uart16550"
 
 
cecho "I will now start to compile everything that's needed";
cecho "I will now start to compile everything that's needed";
 
 
cd minsoc/sw/utils
cd ../../sw/utils
 
 
execcmd "Make utils" "make"
execcmd "Make utils" "make"
 
 
cd ../support
cd ../support
 
 
Line 61... Line 104...
 
 
cd ../uart
cd ../uart
 
 
execcmd "Make UART" "make"
execcmd "Make UART" "make"
 
 
 
# adv_jtag_bridge install
cd ${DIR_TO_INSTALL}/minsoc/rtl/verilog/adv_debug_sys/Software/adv_jtag_bridge
cd ${DIR_TO_INSTALL}/minsoc/rtl/verilog/adv_debug_sys/Software/adv_jtag_bridge
 
 
cecho "Installing FTDI headers! You will be asked to give root pass"
#cecho "Installing FTDI headers! You will be asked to give root pass"
 
 
 
#execcmd "Install FTDI headers" "su -c \"aptitude install libftdi-dev\""; #FIXME
 
 
 
if [ `grep "INCLUDE_JSP_SERVER=true" Makefile` != "" ]
 
then
 
        cecho "Switching off the adv_jtag_bridge JSP_SERVER option";
 
        sed 's/INCLUDE_JSP_SERVER=true/INCLUDE_JSP_SERVER=false/' Makefile > TMPFILE && mv TMPFILE Makefile
 
fi
 
 
execcmd "Install FTDI headers" "su -c \"aptitude install libftdi-dev\"";
if [ $ENV != "cygwin" ]
 
then
 
        cecho "Setting the right build environment";
 
        sed "s/BUILD_ENVIRONMENT=cygwin/BUILD_ENVIRONMENT=${ENV}/" Makefile > TMPFILE && mv TMPFILE Makefile
 
fi
 
 
execcmd "Make adv_jtag_bridge" "make"
execcmd "Make adv_jtag_bridge" "make"
 
 
cecho "Installation Finised"
cecho "Installation Finised"
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.