#!/bin/sh # # @file usbsetup.sh # @brief USB disk setup script for Armadillo 240 # @date $Date$ # @author Noriaki Ando # Harumi Miyamoto # # Copyright (C) 2008 # Task-intelligence Research Group, # Intelligent Systems Research Institute, # National Institute of # Advanced Industrial Science and Technology (AIST), Japan # All rights reserved. # # $Id$ # # # @if jp # # このシェルスクリプトは Almadillo240 で RTコンポーネントを動かすのに必 # 要なファイルやライブラリ等を適当なディレクトリ構造でUSBメモリにコピー # します。OpenRTM-aist Webページで紹介されているRTコンポーネント自動起 # 動用 romfs (romイメージ) を Armadillo に書き込むことにより、このUSBメ # モリ上にコピーされたRTコンポーネントを自動で起動することができるよう # になります。 # # 使用方法 # # 引数なしで起動すると、ATDEのデフォルトのUSBディスクマウントディレクト # リである /media/usbdisk に適当なディレクトリを作成しファイルをコピー # します。 # # それ以外の場所にディレクトリ作成およびファイルのコピーを行いたい場合 # は、引数にディレクトリを指定してください。ディレクトリはあらかじめ作 # 成する必要があります。 # # @else # # This shell script will create appropriate directory tree and will # copy files to run RT-Components on Armadillo240. RTCs that are # copied to a usb disk by this shell script are automatically launched # on the romfs (rom image) that is introduced on OpenRTM web page. # # Usage # # Without any arguments, this script will create directories and will # copy files into the usb disk mounted on the ATDE's default mount # point /media/usbdisk. # # In order to set up directories and files on any other location, # please give the target directory as an argument. The directory has # to be created in advance. # # @endif # usbdisk="/media/usbdisk" usbdisk="/tmp/usbdisk" srclibdir="/usr/arm-linux-gnu/lib/" #srclibdir="/usr/lib/" libs="libomniDynamic4.so.0 libomniORB4.so.0 libomnithread.so.3 libRTC-0.4.2.so.0 librt.so.1 libACE.so.5.4.7" #------------------------------------------------------------ # usage #------------------------------------------------------------ usage() { cat < ${dstdir}/boot.sh fi # create rtc.conf if ! fexist $dstdir/rtc.conf ; then rtc_conf > $dstdir/rtc.conf echo "new rtc.conf created" new_conf="yes" fi # create component dir if test ! -d $dstdir/component ; then mkdir $dstdir/component new_cdir="yes" fi # create lib dir and copy libs if test ! -d $dstdir/lib ; then mkdir $dstdir/lib fi lib_copy # message test "x$new_cdir" = "xyes" && compdir_msg test "x$new_conf" = "xyes" && rtcconf_msg echo "done"