1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/BBA1.5_platform/build/mk.sh
2024-07-22 01:58:46 -03:00

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