Changeset 357 for rubycfg_ssp


Ignore:
Timestamp:
Jun 8, 2018, 1:11:16 PM (6 years ago)
Author:
nmir-saito
Message:

使用するDockerイメージを docker-toppersベースにするために変更

Location:
rubycfg_ssp/trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • rubycfg_ssp/trunk/build_ssp_ruby.sh

    r292 r357  
    22set -eu
    33
    4 SCRIPT_DIR=$(cd $(dirname $0);pwd)
    5 
    6 if [ ! -e asp3 ]; then
    7   if [ ! -e asp3-3.1.0.tar.gz ]; then
    8     curl https://www.toppers.jp/download.cgi/asp3-3.1.0.tar.gz -o asp3-3.1.0.tar.gz
    9   fi
    10   tar xvf asp3-3.1.0.tar.gz
     4if [ ! -v SCRIPTS_DIR ]; then
     5  SCRIPTS_DIR=$(cd $(dirname $0);pwd)
    116fi
    127
    13 if [ ! -e ssp_ruby ]; then
    14   if [ ! -e ssp-1.3.0.tar.gz ]; then
    15     curl http://www.toppers.jp/download.cgi/ssp-1.3.0.tar.gz -o ssp-1.3.0.tar.gz
    16   fi
    17   mkdir ssp_ruby
    18   tar xvf ssp-1.3.0.tar.gz -C ssp_ruby --strip-components 2
     8if [ ! -v WORK_DIR ]; then
     9  WORK_DIR=$HOME/workdir
    1910fi
    2011
    21 for i in `find ssp_ruby -type f` ; do nkf --overwrite --oc=UTF-8 $i; done
    22 cp -a asp3/sample/Makefile ssp_ruby/sample
     12SSP_DIR=$WORK_DIR/ssp
     13SSP_PACKAGE=ssp-1.3.0.tar.gz
     14SSP_DOWNLOAD_URL=http://www.toppers.jp/download.cgi/$SSP_PACKAGE
     15SSP_TARGET_NAME=cq_frk_fm3_gcc
    2316
    24 ${SCRIPT_DIR}/install.sh ssp_ruby
     17ASP3_DIR=$WORK_DIR/asp3
     18ASP3_PACKAGE=asp3-3.1.0.tar.gz
     19ASP3_DOWNLOAD_URL=https://www.toppers.jp/download.cgi/$ASP3_PACKAGE
    2520
    26 cd ssp_ruby
    27 ln -s ../asp3/configure.rb configure.rb
    28 ln -s ../asp3/cfg cfg
    2921
    30 # build a kernel with the ruby configurator
    31 mkdir build
    32 cd build
    33 ../configure.rb -T cq_frk_fm3_gcc -w
    34 make
     22: "setup tools (compiler, emulator, etc.)" && {
     23  $SCRIPTS_DIR/setup_tools.sh
     24  . $HOME/.profile
     25}
     26
     27: "Download TOPPERS/ASP3 package to get a configurator files"  && {
     28  cd $WORK_DIR
     29  if [ ! -e $ASP3_DIR ]; then
     30    if [ ! -e $ASP3_PACKAGE ]; then
     31      curl $ASP3_DOWNLOAD_URL -o $ASP3_PACKAGE
     32    fi
     33    tar xvf $ASP3_PACKAGE
     34  fi
     35}
     36
     37: "if ssp directory already exists, rename it and create new directory" && {
     38  cd $WORK_DIR
     39  if [ -e $SSP_DIR ]; then
     40    mv $SSP_DIR $SSP_DIR.$(date +%Y%m%d_%H%M%S)
     41  fi
     42
     43  if [ ! -e $SSP_PACKAGE ]; then
     44    curl $SSP_DOWNLOAD_URL -o $SSP_PACKAGE
     45  fi
     46
     47  mkdir $SSP_DIR
     48  tar xvf $SSP_PACKAGE -C $SSP_DIR --strip-components 2
     49}
     50
     51: "setup source code(convert to UTF8, patch, etc.)" && {
     52  for i in `find $SSP_DIR -type f` ; do nkf --overwrite --oc=UTF-8 $i; done
     53  cp -a $ASP3_DIR/sample/Makefile $SSP_DIR/sample
     54
     55  $SCRIPTS_DIR/install.sh $SSP_DIR
     56
     57  cd $SSP_DIR
     58  ln -s $ASP3_DIR/configure.rb configure.rb
     59  ln -s $ASP3_DIR/cfg cfg
     60}
     61
     62: "build a kernel" && {
     63  cd $SSP_DIR
     64  if [ -e build ]; then
     65    mv build build.$(date +%Y%m%d_%H%M%S)
     66  fi
     67  mkdir build
     68  cd build
     69  ../configure.rb -T $SSP_TARGET_NAME -w
     70  make
     71}
    3572
    3673exit 0
    37 
Note: See TracChangeset for help on using the changeset viewer.