blob: 9e3fb2da19253bd687c4d08926245887867d4631 [file] [log] [blame]
#!/bin/bash
check_param()
{
read name value <<< $(echo "$1" | awk -F"=" '{print $1" "$2}')
if [ "$name" = "$2" ] && [ "$value" = "$3" ]; then
return 0
else
if [ "$name" = "$2" ]; then
return 1
fi
fi
return 2
}
LYNQ_CPU_NUM="CORE_NUM = \"4\""
while [ $# -gt 0 ];do
check_param $1 "core" "2"
ret=$?
if [ $ret -lt 2 ]; then
echo $?
if [ $ret -eq 0 ]; then
LYNQ_CPU_NUM="CORE_NUM = \"2\""
fi
shift
continue
fi
ret=$?
check_param $1 "connman" "no"
if [ $ret -lt 2 ]; then
LYNQ_CONNMAN_SUPPORT="CONNMAN_SUPPORT = \"yes\""
if [ $ret -eq 0 ]; then
LYNQ_CONNMAN_SUPPORT="CONNMAN_SUPPORT = \"no\""
sed -i '/MOBILETEK_RIL_CFG/d' $(pwd)/meta/meta-mediatek-mt2735/conf/machine/auto2735evb-ivt-main.conf
echo 'MOBILETEK_RIL_CFG = "GSW"' >> $(pwd)/meta/meta-mediatek-mt2735/conf/machine/auto2735evb-ivt-main.conf
fi
eval sed -i 's/^.*CONNMAN_SUPPORT.*$/"${LYNQ_CONNMAN_SUPPORT}"/' $(pwd)/meta/meta-mediatek-mt2735/conf/machine/auto2735evb-ivt-main.conf
shift
continue
fi
shift
done
eval sed -i 's/^.*CORE_NUM.*$/"${LYNQ_CPU_NUM}"/' $(pwd)/meta/meta-mediatek-mt2735/conf/machine/auto2735evb-ivt-base.conf
eval sed -i 's/^.*CORE_NUM.*$/"${LYNQ_CPU_NUM}"/' $(pwd)/meta-sdk/meta/meta-lynqSDK-T800/conf/machine/auto2735evb-ivt-base.conf
source $(pwd)/update_version.sh rndis
export TEMPLATECONF=${PWD}/meta/meta-mediatek-mt2735/conf/base/auto2735evb-ivt-main
source meta/poky/oe-init-build-env