X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=trc6500-master-file%2Fscript%2Fflash_fe306.sh;fp=trc6500-master-file%2Fscript%2Fflash_fe306.sh;h=0000000000000000000000000000000000000000;hb=84523910649b50272f5a8693bf7c5cdb73ad1353;hp=423b6d4b9be1e0a01ba8247259852ab233e60ad9;hpb=f81c83b65ada3bc612e87705f15860934f2f5a6d;p=debian6500.git diff --git a/trc6500-master-file/script/flash_fe306.sh b/trc6500-master-file/script/flash_fe306.sh deleted file mode 100755 index 423b6d4..0000000 --- a/trc6500-master-file/script/flash_fe306.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -# parameters -# -# ============================================================================ -# -# Copyright (C) THALES. All rights reserved -# Author: Laurent Mazet -# -# 2014-10-06 V1.0 : Creation -# -# ============================================================================ - -DRY= -FIRMWARE=/opt/trc6500/config/code_metier/libHwCtrl/Bitstream -LIST="application.out production.bin ts12_fp_pano.bin ts22_fp_pano.bin firmware.out" -HOST= -TRC6500_SCRIPT_DIR=$(dirname $0) - -# help function - -function usage () { - echo "usage: $PROGNAME [-d] [-f dir] [-h] [-i host] [-l list]" - echo " -d: dry mode" - echo " -f: firmware directory ($FIRMWARE)" - echo " -h: help message" - echo " -i: board hostname (or ip)" - echo " -l: list of firmware ($LIST)" - exit $@ - } - -# formating functions - -function title () { echo -e "\033[0;1m$*\033[0;0m"; } -function pass () { echo -e "\033[1;32m$*\033[0;0m"; } -function warn () { echo -e "\033[1;33m$*\033[0;0m"; } -function fail () { echo -e "\033[1;31m$*\033[0;0m"; } - -# argument processing - -while [ $# -gt 0 ]; do - case "$1" in - -d) DRY=yes;; - -f) shift; FIRMWARE=$1;; - -h) usage 0;; - -i) shift; HOST=$1;; - -l) shift; LIST=$1;; - *) usage 1;; - esac - shift -done - -# check host - -[ "$HOST" ] || ping -c 1 $HOST >&/dev/null || \ - { fail "Can't connect '$HOST'"; exit 1; } - -# check firmware - -for f in $LIST; do - [ -f $FIRMWARE/$f ] || { fail "Can't find '$FIRMWARE/$f'"; exit 1; } -done - -# check mode - -protect="" -[ "$DRY" = yes ] && protect="!echo" - -# flash firmware - -title "flash fe306 '$HOST'" - -ftp -n <