LoginSignup
0
0

TOPPERS/SSPカーネルソース勉強会(0) docker, build_ssp.sh, build_ssp_ruby.sh 「名古屋のIoTは名古屋のOSで」

Last updated at Posted at 2018-03-13

TOPPERSには
C++のconfigurator
Rubyのconfigurator
の2種類がある。

それぞれを使うshell scriptを用意

<この項は書きかけです。順次追記します。>

#C++のconfigurator
~/workdir/scripts/build_ssp.sh

build_ssp.sh
#!/usr/bin/env bash
set -eu

# build a configurator
if [ ! -e cfg-1.8.0 ]; then
  if [ ! -e cfg-1.8.0.tar.gz ]; then
    curl http://www.toppers.jp/download.cgi/cfg-1.8.0.tar.gz -o cfg-1.8.0.tar.gz
  fi
  mkdir cfg-1.8.0
  tar xvf cfg-1.8.0.tar.gz -C cfg-1.8.0 --strip-components 2
fi

cd cfg-1.8.0
./configure --with-libraries=/usr/lib/x86_64-linux-gnu/
make
cd ..

# build a SSP kernel
if [ ! -e ssp ]; then
  if [ ! -e ssp-1.3.0.tar.gz ]; then
    curl http://www.toppers.jp/download.cgi/ssp-1.3.0.tar.gz -o ssp-1.3.0.tar.gz
  fi
  tar xvf ssp-1.3.0.tar.gz
fi

cd ssp
ln -s ../cfg-1.8.0 cfg

mkdir build; cd build
perl ../configure -T cq_frk_fm3_gcc
make depend
make

exit 0

rubyのconfigurator

build_ssp_ruby.sh
#!/usr/bin/env bash
set -eu

if [ ! -e asp3 ]; then
  if [ ! -e asp3-3.1.0.tar.gz ]; then
    curl https://www.toppers.jp/download.cgi/asp3-3.1.0.tar.gz -o asp3-3.1.0.tar.gz
  fi
  tar xvf asp3-3.1.0.tar.gz
fi

if [ ! -e ssp_ruby ]; then
  if [ ! -e ssp-1.3.0.tar.gz ]; then
    curl http://www.toppers.jp/download.cgi/ssp-1.3.0.tar.gz -o ssp-1.3.0.tar.gz
  fi
  mkdir ssp_ruby
  tar xvf ssp-1.3.0.tar.gz -C ssp_ruby --strip-components 2
fi

for i in `find ssp_ruby -type f` ; do nkf --overwrite --oc=UTF-8 $i; done
cp -a asp3/sample/Makefile ssp_ruby/sample

svn co http://dev.toppers.jp/svn_user/contrib/rubycfg_ssp/trunk rubycfg_ssp
rubycfg_ssp/install.sh ssp_ruby

cd ssp_ruby
ln -s ../asp3/configure.rb configure.rb
ln -s ../asp3/cfg cfg

# build a kernel with the ruby configurator 
mkdir build
cd build
../configure.rb -T cq_frk_fm3_gcc -w
make

exit 0

setup

../scripts/setup_user.sh
#!/usr/bin/env bash

set -eu

echo export LANG=ja_JP.UTF-8 >> ${HOME}/.profile
echo export LANGUAGE=ja_JP:ja >> ${HOME}/.profile
echo LV="-Au8" >> ${HOME}/.profile
cat << EOS >> ${HOME}/.vimrc
:set fenc=utf-8
:set fencs=iso-2022-jp,euc-jp,cp932,utf-8
:set enc=utf-8
EOS

exit 0

<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>

文書履歴(document history)

ver. 0.01 初稿  201801313
ver. 0.02 ありがとう追記 20230513

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0