43 lines
917 B
Bash
Executable File
43 lines
917 B
Bash
Executable File
#****************************************************************************
|
|
#
|
|
# Copyright(c) Shenzhen TP-LINK Technologies Co.Ltd.
|
|
# All Rights Reserved
|
|
# YuanShang <YuanShang@tp-link.com.cn>
|
|
#
|
|
#***************************************************************************
|
|
#!/bin/sh
|
|
command=""
|
|
build_dir=$(pwd)
|
|
|
|
# 1.parse args
|
|
for arg in $@
|
|
do
|
|
case "$arg" in
|
|
MODEL=* ) m=${arg##*MODEL=};; #command=$command" "$arg;;
|
|
env_build) env="1";;
|
|
* ) command=$command" "$arg;;
|
|
esac
|
|
done
|
|
|
|
# 2.check MODEL
|
|
if [ "$m" = "" ]; then
|
|
echo "You have to define MODEL"
|
|
exit 1;
|
|
fi
|
|
|
|
# 3.env build
|
|
if [ "$env" = "1" ]; then
|
|
echo build env
|
|
if [ "$m" = W8980V1 ] || [ "$m" = W8970V1 ]; then
|
|
cd $build_dir/../lantiq && make tools/install V=99 && make toolchain/install V=99
|
|
fi
|
|
cd $build_dir && make MODEL=$m env_build
|
|
fi
|
|
|
|
# 4.main command
|
|
if [ "$command" != "" ]; then
|
|
cd $build_dir && make MODEL=$m $command
|
|
fi
|
|
|
|
exit 0
|