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/setup
    from Rev 109 to Rev 110
    Reverse comparison

Rev 109 → Rev 110

/minsoc-configure.sh
0,0 → 1,75
#!/bin/bash
# Author: Constantinos Xanthopoulos & Raul Fajardo
# This script install MinSOC tree
# under a specific directory.
 
# ===== CONFIGURATIONS =====
# ==========================
 
DIR_TO_INSTALL=`pwd`
 
# Debug ?
export DEBUG=0;
. beautify.sh
 
function testtool
{
# is_missing=`which $1 2>&1 | grep no`
is_missing=`whereis -b $1 2>&1 | grep :$`
if [ -z "$is_missing" ]
then
cecho "$1 is installed, pass"
else
errormsg "$1 is not installed, install it and re-run this installation script."
fi
}
 
 
#Setting environment
ENV=`uname -o`
if [ "$ENV" != "GNU/Linux" ] && [ "$ENV" != "Cygwin" ]
then
errormsg "Environment $ENV not supported by this script."
fi
cecho "Building tools for ${ENV} system"
 
is_arch64=`uname -m | grep 64`
if [ -z $is_arch64 ]
then
KERNEL_ARCH="32"
else
KERNEL_ARCH="64"
fi
 
 
# User check!
if [ `whoami` = "root" ];
then
errormsg "You shouldn't be root for this script to run.";
fi;
 
 
# Testing necessary tools
cecho "Testing if necessary tools are installed, program "whereis" is required."
testtool sed
testtool patch
 
# Wizard
if [ -z "${ALTDIR}" ]
then
cnecho "Give full path (ex. /home/foo/) of the directory where minsoc is under or leave empty for "${DIR_TO_INSTALL}": ";
read ALTDIR;
if [ ! -z "${ALTDIR}" ]
then
DIR_TO_INSTALL=${ALTDIR}
fi
cecho "${DIR_TO_INSTALL} selected";
fi
 
if [ ! -d ${DIR_TO_INSTALL} ]
then
errormsg "Directory doesn't exist. Please create it";
fi;
 
export ${DIR_TO_INSTALL}
bash configure.sh
minsoc-configure.sh Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: minsoc-install.sh =================================================================== --- minsoc-install.sh (revision 109) +++ minsoc-install.sh (revision 110) @@ -1,31 +1,12 @@ #!/bin/bash -# Author: Constantinos Xanthopoulos +# Author: Constantinos Xanthopoulos & Raul Fajardo # This script install MinSOC tree # under a specific directory. # ===== CONFIGURATIONS ===== # ========================== +MINSOC_SVN_URL="http://opencores.org/ocsvn/minsoc/minsoc/branches/rc-0.1" -# Where should I put the dir. minsoc? -# ex. /home/conx/Thesis/ -DIR_TO_INSTALL=`pwd` - -# 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 @@ -88,6 +69,7 @@ # Wizard +DIR_TO_INSTALL=`pwd` if [ -z "${ALTDIR}" ] then cnecho "Give full path (ex. /home/foo/) for installation directory or leave empty for "${DIR_TO_INSTALL}": "; @@ -116,7 +98,7 @@ cecho "\nDownloading packages" cd ${DIR_TO_INSTALL} cecho "Download MinSoC" -svn co -q http://opencores.org/ocsvn/minsoc/minsoc/trunk/ minsoc #user need to input password, execcmd omits command output and should be this way +svn co -q ${MINSOC_SVN_URL} minsoc #user need to input password, execcmd omits command output and should be this way execcmd "cd ${DIR_TO_INSTALL}/download" if [ "$ENV" == "Cygwin" ] then @@ -243,39 +225,11 @@ execcmd "make install" -#Configuring MinSoC -cecho "\nConfiguring MinSoC" -execcmd "cd ${DIR_TO_INSTALL}/minsoc/backend/std" -execcmd "Configuring MinSoC as standard board (simulatable but not synthesizable)" "./configure" -execcmd "cd ${DIR_TO_INSTALL}" +#Configuring MinSoC, Advanced Debug System and patching OpenRISC +export ${DIR_TO_INSTALL} +bash configure.sh -#Configuring Advanced Debug System to work with MinSoC -cecho "\nConfiguring Advanced Debug System to work with MinSoC" -execcmd "cd ${DIR_TO_INSTALL}/minsoc/rtl/verilog/adv_debug_sys/Hardware/adv_dbg_if/rtl/verilog" -sed "s%\`define DBG_JSP_SUPPORTED%//\`define DBG_JSP_SUPPORTED%" adbg_defines.v > TMPFILE && mv TMPFILE adbg_defines.v - -#Compiling and moving adv_jtag_bridge debug modules for simulation -execcmd "cd ${DIR_TO_INSTALL}/minsoc/rtl/verilog/adv_debug_sys/Software/adv_jtag_bridge/sim_lib/icarus" -execcmd "make" -execcmd "cp jp-io-vpi.vpi ${DIR_TO_INSTALL}/minsoc/bench/verilog/vpi" - - -#Precompiling firmwares -cecho "\nPrecompiling delivered firmwares"; -execcmd "cd ${DIR_TO_INSTALL}/minsoc/sw/utils" -execcmd "Make utils" "make" - -execcmd "cd ${DIR_TO_INSTALL}/minsoc/sw/support" -execcmd "Make support tools" "make" - -execcmd "cd ${DIR_TO_INSTALL}/minsoc/sw/drivers" -execcmd "Make drivers" "make" - -execcmd "cd ${DIR_TO_INSTALL}/minsoc/sw/uart" -execcmd "Make UART" "make" - - #Setting-up new variables cecho "\nSystem configurations" execcmd "Adding MinSoC tools to PATH" "echo \"PATH=\\\$PATH:$DIR_TO_INSTALL/tools/bin\" >> /home/$(whoami)/.bashrc;";
/configure.sh
0,0 → 1,37
. beautify.sh
 
#Configuring MinSoC
cecho "\nConfiguring MinSoC"
execcmd "cd ${DIR_TO_INSTALL}/minsoc/backend/std"
execcmd "Configuring MinSoC as standard board (simulatable but not synthesizable)" "./configure"
execcmd "cd ${DIR_TO_INSTALL}"
 
 
#Configuring Advanced Debug System to work with MinSoC
cecho "\nConfiguring Advanced Debug System to work with MinSoC"
execcmd "cd ${DIR_TO_INSTALL}/minsoc/rtl/verilog/adv_debug_sys/Hardware/adv_dbg_if/rtl/verilog"
sed "s%\`define DBG_JSP_SUPPORTED%//\`define DBG_JSP_SUPPORTED%" adbg_defines.v > TMPFILE && mv TMPFILE adbg_defines.v
 
#Compiling and moving adv_jtag_bridge debug modules for simulation
execcmd "cd ${DIR_TO_INSTALL}/minsoc/rtl/verilog/adv_debug_sys/Software/adv_jtag_bridge/sim_lib/icarus"
execcmd "make"
execcmd "cp jp-io-vpi.vpi ${DIR_TO_INSTALL}/minsoc/bench/verilog/vpi"
 
#Patching OpenRISC Release 1 with Advanced Debug System patch for Watchpoints
execcmd "cd ${DIR_TO_INSTALL}/minsoc/rtl/verilog/or1200/rtl/verilog"
execcmd "patch -p0 < ${DIR_TO_INSTALL}/minsoc/rtl/verilog/adv_debug_sys/Patches/OR1200v1/or1200v1_hwbkpt.patch"
 
 
#Precompiling firmwares
cecho "\nPrecompiling delivered firmwares";
execcmd "cd ${DIR_TO_INSTALL}/minsoc/sw/utils"
execcmd "Make utils" "make"
 
execcmd "cd ${DIR_TO_INSTALL}/minsoc/sw/support"
execcmd "Make support tools" "make"
 
execcmd "cd ${DIR_TO_INSTALL}/minsoc/sw/drivers"
execcmd "Make drivers" "make"
 
execcmd "cd ${DIR_TO_INSTALL}/minsoc/sw/uart"
execcmd "Make UART" "make"

powered by: WebSVN 2.1.0

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