#!/bin/sh # paths PWD=`pwd` export ECOS_REPOSITORY=${PWD}/ecos_20050912/packages ECOS_TOOLCHAIN=`dirname ${PWD}`/gnutools/arm-elf/bin ECOS_TOOLS=`dirname ${PWD}`/bin # checks if [ ! -d ${ECOS_REPOSITORY} ]; then echo "no redboot source?" exit -1 fi if [ ! -d ${ECOS_TOOLCHAIN} ]; then echo "no ecos compiler?" exit -1 fi if [ ! -d ${ECOS_TOOLS} ]; then echo "no ecos tools?" exit -1 fi export PATH=${ECOS_TOOLCHAIN}:${ECOS_TOOLS}:$PATH # make build directory if [ ! -d ecos-build ]; then mkdir ecos-build if [ $? -ne 0 ]; then echo "mkdir failed" exit -1 fi cd ecos-build ecosconfig new mx35_fab4 redboot if [ $? -ne 0 ]; then echo "ecosconfig new failed" exit -1 fi ecosconfig import $ECOS_REPOSITORY/hal/arm/mx35/fab4/current/misc/redboot_ROMRAM.ecm if [ $? -ne 0 ]; then echo "ecosconfig import failed" exit -1 fi ecosconfig import $ECOS_REPOSITORY/hal/arm/mx35/fab4/current/misc/redboot_fab4.ecm if [ $? -ne 0 ]; then echo "ecosconfig import failed" exit -1 fi ecosconfig add UBI if [ $? -ne 0 ]; then echo "ecosconfig add failed" exit -1 fi ecosconfig tree if [ $? -ne 0 ]; then echo "ecosconfig tree failed" exit -1 fi else cd ecos-build fi make