blob: 3ae71d48f0555ea48d21f94ba83ad45a40841c3b [file] [log] [blame]
#!/bin/bash
# OBM bash shell wrapper
# Input param 1 - Platform type
# Input param 2 - Cross compiler information
# Output - none
REL_DIR="./Bootloader_3.3.6_Linux"
if [ "$#" -lt 1 ]; then
echo "ERROR: Illegal number of input parameters (required at least 1)"
echo "Usage: $0 <platform> [<cross compiler>]"
echo "e.g.: $0 NZA3 arm-marvell-linux-gnueabi-"
exit 1;
fi
PLATFORM=$1
OUTPUT_DIR="/"$PLATFORM"_DKB"
echo "PROFILE= $4"
rm -f -R $REL_DIR
mkdir $REL_DIR
mkdir -p $REL_DIR$OUTPUT_DIR
if [ "${PLATFORM}" = "FALCON" -o "${PLATFORM}" = "KAGU" \
-o "${PLATFORM}" = "FACT" -o "${PLATFORM}" = "LAPW" ]; then
PLATFORM="NZAS"
fi
if [ "${PLATFORM}" = "KSTRZ" ]; then
PLATFORM="KSTR"
fi
if [ "$5" == "clean" ]; then
cd ./Loader/Build
make -f BootLoader_linux.mak PLATFORM=${PLATFORM} clean
exit 0;
fi
cd ./Loader/Platforms/$PLATFORM
rm -rf release
cd ./DKB
rm -f *.bin *.map
./make_loader_${PLATFORM}_LINUX.sh $2 $3 $4 $1 $5
cp *.bin ../../../../$REL_DIR$OUTPUT_DIR
cd ../../../../