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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [scripts/] [setup] - Rev 591

Go to most recent revision | Compare with Previous | Blame | View Log

#!/bin/bash

CFG=setup.cache

# RTEMS tools setup

if test ! -f ./$CFG;
then
 echo -n "restoring default setup.cache .." 
 cp ./setup.def ./$CFG
 echo " done"
fi

echo -n "loading setup from ./$CFG .."
. ./$CFG
echo " done"
echo

menu_setup()
{
while true;
do
  echo
  echo "       Source packages setup"
  echo
  echo "0 binutils version        : $binutils_version"
  echo "1 binutils patch version  : $binutils_patch_version"
  echo "2 binutils rpm release    : $binutils_rpm_release"
  echo "3 gcc version             : $gcc_version"
  echo "4 gcc patch version       : $gcc_patch_version"
  echo "5 newlib version          : $newlib_version"
  echo "6 newlib patch version    : $newlib_patch_version"
  echo "7 gcc/newlib rpm release  : $gccnewlib_rpm_release"
  echo "8 gdb version             : $gdb_version"
  echo "9 gdb patch version       : $gdb_patch_version"
  echo "a gdb rpm release         : $gdb_rpm_release"
  echo "b rtems version           : $rtems_version"
  echo "c rtems rpm release       : $rtems_rpm_release"
  echo "d rpm build root          : $rpm_build_root"
  echo

  echo -n "[0-9a-d] or any other key to quit >"
  read sel
  case $sel in
  0) echo -n "BINUTILS source >"
     read binutils_version ;;
  1) echo -n "BINUTILS patch version >"
     read binutils_patch_version ;;
  2) echo -n "BINUTILS RPM release >"
     read binutils_rpm_release ;;
  3) echo -n "GCC source >"
     read gcc_version ;;
  4) echo -n "GCC patch version>"
     read gcc_patch_version ;;
  5) echo -n "NEWLIB source >"
     read newlib_version ;;
  6) echo -n "NEWLIB patch version>"
     read newlib_patch_version ;;
  7) echo -n "GCC/NEWLIB RPM release >"
     read gccnewlib_rpm_release ;;
  8) echo -n "GDB source >"
     read gdb_version ;;
  9) echo -n "GDB patch version>"
     read gdb_patch_version ;;
  a) echo -n "GDB RPM release >"
     read gdb_rpm_release ;;
  b) echo -n "RTEMS source >"
     read rtems_version ;;
  c) echo -n "RTEMS RPM release >"
     read rtems_rpm_release ;;
  d) echo -n "RPM build root >"
     read rpm_build_root ;;
  *) 
     return 0 ;;
  esac
done
}


save_setup()
{
echo -n "saving setup to $CFG .."

echo "# RTEMS tools setup" > $CFG
echo "binutils_version=$binutils_version" >> $CFG
echo "binutils_patch_version=$binutils_patch_version" >> $CFG
echo "binutils_rpm_release=$binutils_rpm_release" >> $CFG
echo "newlib_version=$newlib_version" >> $CFG
echo "newlib_patch_version=$newlib_patch_version" >> $CFG
echo "gcc_version=$gcc_version" >> $CFG
echo "gcc_patch_version=$gcc_patch_version" >> $CFG
echo "gccnewlib_rpm_release=$gccnewlib_rpm_release" >> $CFG
echo "gdb_version=$gdb_version" >> $CFG
echo "gdb_patch_version=$gdb_patch_version" >> $CFG
echo "gdb_rpm_release=$gdb_rpm_release" >> $CFG
echo "rtems_version=$rtems_version" >> $CFG
echo "rtems_rpm_release=$rtems_rpm_release" >> $CFG
echo "rpm_build_root=$rpm_build_root" >> $CFG

echo " done"
test -f Makefile || ./configure
}

menu_setup

echo
echo -n "Save setup [y|n] >"
read sel
case $sel in
''|y*|Y*) save_setup ;;
*) ;;
esac

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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