source: ssp_aarch64/trunk/build_ssp.sh@ 356

Last change on this file since 356 was 356, checked in by nmir-saito, 6 years ago

set svn:mime-type to files

  • Property svn:executable set to *
  • Property svn:mime-type set to text/plain; charset=utf-8
File size: 1.7 KB
Line 
1#!/usr/bin/env bash
2set -eu
3
4if [ ! -v SCRIPTS_DIR ]; then
5 SCRIPTS_DIR=$(cd $(dirname $0);pwd)
6fi
7
8if [ ! -v WORK_DIR ]; then
9 WORK_DIR=$HOME/workdir
10fi
11
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_RUBYCFG_FILES_URL=http://dev.toppers.jp/svn_user/contrib/rubycfg_ssp/trunk
16SSP_TARGET_NAME=qemu_virt_gcc
17
18ASP3_DIR=$WORK_DIR/asp3
19ASP3_PACKAGE=asp3-3.1.0.tar.gz
20ASP3_DOWNLOAD_URL=https://www.toppers.jp/download.cgi/$ASP3_PACKAGE
21
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 svn co $SSP_RUBYCFG_FILES_URL rubycfg_ssp
56 rubycfg_ssp/install.sh $SSP_DIR
57
58 $SCRIPTS_DIR/install.sh $SSP_DIR
59
60 cd $SSP_DIR
61 ln -s $ASP3_DIR/configure.rb configure.rb
62 ln -s $ASP3_DIR/cfg cfg
63}
64
65: "build a kernel" && {
66 cd $SSP_DIR
67 if [ -e build ]; then
68 mv build build.$(date +%Y%m%d_%H%M%S)
69 fi
70 mkdir build
71 cd build
72 ../configure.rb -T $SSP_TARGET_NAME -w
73 make
74}
75
76exit 0
Note: See TracBrowser for help on using the repository browser.