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

Subversion Repositories minsoc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 43 to Rev 42
    Reverse comparison

Rev 43 → Rev 42

/minsoc/trunk/utils/contributions/setup/conxshlib.sh
0,0 → 1,65
#!/bin/bash
# Xanthopoulos Constantinos
# Some useful function for my scripts
 
function cecho
{
echo -e "\033[1m\033[33m$1\033[0m"
}
 
function errormsg
{
echo -e "\033[1m\033[31mError: $1\033[0m\n";
exit 1;
}
 
function readpass
{
stty_orig=`stty -g`
stty -echo
read `echo $1`
stty $stty_orig
}
 
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
}
 
function changelinefile
{
a=0;
b=0;
sed -e "s/$1/$2/" $3 > /tmp/changedfile;
if [ $? -eq 0 ]
then
a=1;
fi
mv /tmp/changedfile $3;
if [ $? -eq 0 ]
then
b=1;
fi
execcmd "Change file $3" "test $a -eq 1 -a $b -eq 1"
}
 
if [ $DEBUG -eq 1 ]
then
cecho "Debug mode on! Nothing will actually run";
fi
/minsoc/trunk/utils/contributions/setup/cable-install.sh
0,0 → 1,70
#!/bin/bash
# Xanthopoulos Constantinos
# Installing cable drivers for the impact to work
# under Debian Squeeze.
 
 
# ===== CONFIGURATIONS =====
# ==========================
# Webpack installation directory ex. ISE_PATH=/opt/WebPackISE/12.3/
# make sure this directory contains ISE_DS
 
ISE_PATH=""
 
 
# ===== SCRIPT ======
# ===================
export DEBUG=0;
. conxshlib.sh
 
ISE_PATH=${ISE_PATH}"/ISE_DS/ISE/";
 
if [ ! -d $ISE_PATH ];
then
errormsg "You must set the configuration variable ISE_PATH of this script";
fi
 
if [ `whoami` != "root" ];
then
errormsg "You must be root for this script to run.";
fi;
 
execcmd "Installing make" "aptitude install -y make"
 
execcmd "Add WebPack binaries to PATH" "echo \"PATH=\\\$PATH:${ISE_PATH}/bin/lin/\" >> /etc/bash.bashrc;";
 
execcmd "Downloading drivers" "wget -O usb-driver-HEAD.tar.gz http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver?a=snapshot;h=HEAD;sf=tgz ";
 
execcmd "Move tar to $ISE_PATH" "mv usb-driver-HEAD.tar.gz $ISE_PATH"
 
cd $ISE_PATH;
 
execcmd "Un-tar usb drivers" "tar xf usb-driver-HEAD.tar.gz";
 
execcmd "Removing tar" "rm usb-driver-HEAD.tar.gz"
 
cd usb-driver
 
execcmd "Install libusb" "aptitude install -y libusb-dev";
 
execcmd "Compile usb-driver" "make"
 
execcmd "Adding the export line to bashrc" "echo \"export LD_PRELOAD=${ISE_PATH}/usb-driver/libusb-driver.so\" >> /etc/bash.bashrc"
 
cecho "Unplug the cable if it is plugged and press enter"
 
read nothing;
 
execcmd "Creating new udev rule" "echo \"ACTION==\\\"add\\\", SUBSYSTEMS==\\\"usb\\\", ATTRS{idVendor}==\\\"03fd\\\", MODE=\\\"666\\\"\" > /etc/udev/rules.d/libusb-driver.rules";
 
execcmd "Copy udev rules" "cp ${ISE_PATH}/bin/lin/xusbdfwu.rules /etc/udev/rules.d/";
 
execcmd "Apply patch for Squeeze" "sed -i -e 's/TEMPNODE/tempnode/' -e 's/SYSFS/ATTRS/g' -e 's/BUS/SUBSYSTEMS/' /etc/udev/rules.d/xusbdfwu.rules";
 
execcmd "Install fxload" "aptitude install -y fxload";
 
execcmd "Copy .hex files to /usr/share" "cp ${ISE_PATH}/bin/lin/xusb*.hex /usr/share";
 
execcmd "Restart udev" "/etc/init.d/udev restart";
 
cecho "Ready!!!"
minsoc/trunk/utils/contributions/setup/cable-install.sh Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: minsoc/trunk/utils/contributions/setup/minsoc-install.sh =================================================================== --- minsoc/trunk/utils/contributions/setup/minsoc-install.sh (revision 43) +++ minsoc/trunk/utils/contributions/setup/minsoc-install.sh (revision 42) @@ -1,5 +1,7 @@ #!/bin/bash # Xanthopoulos Constantinos +# Installing cable drivers for the impact to work +# under Debian Squeeze. # ===== CONFIGURATIONS ===== @@ -7,41 +9,19 @@ # Where should I put the dir. minsoc? # ex. /home/conx/Thesis/ -DIR_TO_INSTALL="/home/conx/Thesis/tmp/" +DIR_TO_INSTALL="" -# 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 ====== # =================== - -# Debug ? export DEBUG=0; -. beautify.sh -. func.sh +. conxshlib.sh -# User check! if [ `whoami` == "root" ]; then errormsg "You shouldn't be root for this script to run."; fi; -# Wizard -if [ $DIR_TO_INSTALL == "" ] -then - read $DIR_TO_INSTALL; -fi - -# Directory exists? if [ ! -d $DIR_TO_INSTALL ] then errormsg "Directory doesn't exist. Please create it"; @@ -49,44 +29,21 @@ cd $DIR_TO_INSTALL - -if [ $VERSION == "" ] +if [ ! -f "minsoc.tar.gz" ]; then - while [ $VERSION != "trunk" -a $VERSION != "stable"] - do - cecho "Which version you want to install [stable/trunk]?" - read $VERSION; - done + execcmd "Download minsoc" "wget http://xanthopoulos.info/pub/minsoc.tar.gz" fi -if [ $ENV == "" ] +if [ -d "minsoc" ] then - while [ $ENV != "linux" -a $ENV != "cygwin" -a $ENV != "freebsd" ] - do - cecho "In which environement are you installing MinSOC [linux/cygwin/freebsd]?" - read $ENV; - done + rm minsoc -rf 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"; -cd ../../sw/utils +cd minsoc/sw/utils execcmd "Make utils" "make" @@ -106,25 +63,12 @@ execcmd "Make UART" "make" -# adv_jtag_bridge install 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 +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/trunk/utils/contributions/setup/README
0,0 → 1,24
===== STEPS =====
 
A. Install Cable Drivers:
- Edit the cable-install.sh file and set the variable ISE_PATH to the directory
where you have installed ISE (that directory must contain a directory ISE_DS).
- Run the script: ./cable-install.sh
- When finished type lsusb and you should get a line similar to
"Bus 001 Device 005: ID 03fd:0008 Xilinx, Inc." where the ID
should be as shown (03fd:0008).
- You should be able to run IMPACT and see the devices in the JTAG chain.
 
B. Install GNU Toolchain for OR:
- Edit the toolchain-install.sh file and set the variables DIR_TO_INSTALL and
KERNEL_ARCH as explained in the file.
- Run the script: ./toolchain-install.sh
- When finished you should be able to run or32-elf-gdb in a new terminal.
 
C. Install minsoc:
- Edit the minsoc-install.sh file and the variable DIR_TO_INSTALL.
- Run the script: ./minsoc-install.sh
- When finished you should have a working copy of minsoc project in the
specified directory.
 
Hope it works!

powered by: WebSVN 2.1.0

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