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

Subversion Repositories minsoc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /minsoc/branches/rc-1.0/utils/contributions/setup
    from Rev 45 to Rev 109
    Reverse comparison

Rev 45 → Rev 109

/beautify.sh
0,0 → 1,45
#!/bin/bash
# Xanthopoulos Constantinos
# Some useful function for my scripts
 
function cecho
{
echo -e "\033[1m\033[33m$1\033[0m"
}
 
function cnecho
{
echo -e -n "\033[0m\033[33m$1\033[0m"
}
 
function errormsg
{
echo -e "\033[1m\033[31mError: $1\033[0m\n";
exit 1;
}
 
function execcmd
{
# Print Message
echo -e "\033[35m$1\033[0m"
# Execute command
echo $2
if [ $DEBUG -ne 1 ];
then
eval $2;
fi;
# Check Execution
if [ $? -eq 0 ]
then
echo -e "\033[32mSuccessfully \"$1\"\033[0m\n";
else
errormsg "$1";
exit 1;
 
fi
}
 
if [ $DEBUG -eq 1 ]
then
cecho "Debug mode on! Nothing will actually run";
fi
/TODO.txt
0,0 → 1,4
# TODO list for the setup script
 
* Install ftdi drivers according to the $ENV
* Test it in cygwin and freebsd.
/minsoc-install.sh
0,0 → 1,132
#!/bin/bash
# Author: Constantinos Xanthopoulos
# This script install MinSOC tree
# under a specific directory.
 
# ===== CONFIGURATIONS =====
# ==========================
 
# Where should I put the dir. minsoc?
# ex. /home/conx/Thesis/
DIR_TO_INSTALL=""
 
# This variable should be set to trunk
# or to stable.
VERSION=""
 
# This variable should take one of
# the following values depending
# to your system: linux, cygwin, freebsd
ENV=""
 
# !!! DO NOT EDIT BELLOW THIS LINE !!!
# ===================================
 
# ===== SCRIPT ======
# ===================
 
# Debug ?
export DEBUG=0;
. beautify.sh
 
# User check!
if [ `whoami` = "root" ];
then
errormsg "You shouldn't be root for this script to run.";
fi;
 
# Wizard
if [ -z ${DIR_TO_INSTALL} ]
then
cnecho "Give full path (ex. /home/foo/): ";
read DIR_TO_INSTALL;
fi
 
# Directory exists?
if [ ! -d ${DIR_TO_INSTALL} ]
then
errormsg "Directory doesn't exist. Please create it";
fi;
 
cd ${DIR_TO_INSTALL}
 
# Which Version?
if [ -z ${VERSION} ]
then
while [ "$VERSION" != "trunk" -a "$VERSION" != "stable" ]
do
cnecho "Select MinSOC Version [stable/trunk]: "
read VERSION;
done
fi
 
if [ -z ${ENV} ]
then
while [ "$ENV" != "linux" -a "$ENV" != "cygwin" -a "$ENV" != "freebsd" ]
do
cnecho "Select build environment [linux/cygwin/freebsd]: "
read ENV;
done
fi
 
 
 
# 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";
 
cd ${DIR_TO_INSTALL}/minsoc/sw/utils
 
echo $PWD
 
execcmd "Make utils" "make"
 
cd ../support
 
execcmd "Make support tools" "make"
 
cd ../drivers
 
execcmd "Make drivers" "make"
 
 
cd ../uart
 
execcmd "Make UART" "make"
 
# adv_jtag_bridge install
cd ${DIR_TO_INSTALL}/minsoc/rtl/verilog/adv_debug_sys/Software/adv_jtag_bridge
 
# FIXME: install FTDI headers for all build environments
#cecho "Installing FTDI headers! You will be asked to give root pass"
 
#execcmd "Install FTDI headers" "su -c \"aptitude install libftdi-dev\"";
 
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
 
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"
 
cecho "Installation Finised"
minsoc-install.sh Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: toolchain-install.sh =================================================================== --- toolchain-install.sh (nonexistent) +++ toolchain-install.sh (revision 109) @@ -0,0 +1,51 @@ +#!/bin/bash +# Xanthopoulos Constantinos +# Installing OR GNU Toolchain. +# Only tested in Debian Squeeze. + + +# ===== CONFIGURATIONS ===== +# ========================== + +# Where will I put the binaries? +# ex. /opt/openrisc/bin +DIR_TO_INSTALL=""; + +# Debian's kernel architecture {32,64} +# ex. KERNEL_ARCH="32" +KERNEL_ARCH="" + +# ===== SCRIPT ====== +# =================== +export DEBUG=0; +. conxshlib.sh + +if [ `whoami` == "root" ]; +then + errormsg "You shouldn't be root for this script to run."; +fi; + +if [ ! -d $DIR_TO_INSTALL ] +then + errormsg "Directory doesn't exist. Please create it"; +fi; + +execcmd "Change permissions" "chmod 777 $DIR_TO_INSTALL"; + +cd $DIR_TO_INSTALL; + +if [ $KERNEL_ARCH == "32" ]; +then + execcmd "Download toolchain (it may take a while)" "wget ftp://ocuser:oc@opencores.org/toolchain/or32-elf-linux-x86.tar.bz2"; +elif [ $KERNEL_ARCH == "64"]; +then + execcmd "Download toolchain (it may take a while)" "wget ftp://ocuser:oc@opencores.org/toolchain/or32-elf-linux-x86_64.tar.bz2"; +else + errormsg "Not a correct architecture. Check Configurations"; +fi + +execcmd "Un-tar" "tar xf *bz2"; + +execcmd "Adding toolchain to PATH" "echo \"PATH=\\\$PATH:$DIR_TO_INSTALL/or32-elf/bin/\" >> /home/$(whoami)/.bashrc;"; + +cecho "Install completed"
toolchain-install.sh Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property

powered by: WebSVN 2.1.0

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