source: build_ssp3a/build_ssp3a.sh@ 403

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

add shell scripts

  • Property svn:executable set to *
  • Property svn:mime-type set to text/plain; charset=utf-8
File size: 1.1 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=$SCRIPTS_DIR/workdir
10fi
11
12SSP3_FILE=ssp3_arm_gcc-20190902.tar.gz
13SSP3_DOWNLOAD_URL="https://www.toppers.jp/MEMBERS/early/third/$SSP3_FILE"
14SSP3_DIR=$WORK_DIR/ssp3
15SSP3_BUILD_DIR=$SSP3_DIR/build
16
17: "confirm username and password" && {
18 read -p "username for http://www.toppers.jp/MEMBERS): " user
19 read -s -p "password: " pass
20 echo
21}
22
23: "install build tools" && {
24 if [ -e $SCRIPTS_DIR/setup_tools.sh ]; then
25 bash $SCRIPTS_DIR/setup_tools.sh
26 else
27 echo "script file \"setup_tools.sh\" is not found in \"$SCRIPTS_DIR\". abort."
28 exit 1
29 fi
30}
31
32: "download ssp3 kernel file" && {
33 mkdir -p $WORK_DIR
34 cd $WORK_DIR
35 wget $SSP3_DOWNLOAD_URL --http-user=$user --http-password=$pass
36}
37
38: "setup files" && {
39 mkdir -p $SSP3_DIR
40 tar xvf $SSP3_FILE -C $SSP3_DIR --strip-components=2
41 cd $SSP3_DIR
42 sed -i -e 's/\#COPTS/COPTS/g' target/ct11mpcore_gcc/Makefile.target
43}
44
45: "build kernel" && {
46 mkdir -p $SSP3_BUILD_DIR
47 cd $SSP3_BUILD_DIR
48 $SSP3_DIR/configure.rb -T ct11mpcore_gcc
49 make
50}
Note: See TracBrowser for help on using the repository browser.