#!/bin/bash echo $PATH clear export BUILD_ENV=linux export PROJECT_NAME=at_command export BOARD_NAME=ec7xx_0h00 export CHIP_NAME=ec7xx export CHIP_TYPE=ec718p export CORE_NAME=ap export EUTRAN_MODE=cat_mode export BUILD_OPTION=merge export UNILOG=false export TOOLCHAIN_NAME=GCC export CUST=common export SDKREL=false export OPENCPU=false export RAM_ENABLE=false export ROM_ENABLE=false export LESS_LOG=false export LTO_ENABLE=false export PWR_TEST=false export BUILD_HEADBIN=false export GCCLIB_PATH="$HOME/gcc" export COMDBLIB_PATH="./prebuild/PLAT/lib/gcc/$CHIP_TYPE/full" export CPBIN_SUBPATH=oc export PKG_MAPDEF=pkg_718p_mapdef export PKG_PRODUCT="EC718P_PRD" export PKG_PRODUCT_SEC="PEC718P_PRD_SEC" export OUTPUT_NAME=$BOARD_NAME"_"$CHIP_TYPE export JOBNUMBER=j8 export CUR_PATH=$('pwd') echo $0 version $(date "+%Y%m%d") echo GCCLIB_PATH: $GCCLIB_PATH echo Chip Type: $CHIP_TYPE if [ ! -e $GCCLIB_PATH ] then echo ERROR:Please check GCCLIB_PATH setting,exit!!! exit 1 fi if [ ! -e "gccout" ]; then mkdir gccout fi echo CUR_PATH:$CUR_PATH #touch -d $(date "+%Y%m%d%H%M%S") ./fibocom/fibo-framework/module/ffw_verno/verno.c PARAMETERS=$1 OLD_IFS="$IFS" IFS="-" PARAMARRY=($*) IFS="$OLD_IFS" check_param(){ for param in ${PARAMARRY[@]} do if [ -n "$(echo $param|grep -w 'qcom')" ] then export CUST=qcom fi if [ -n "$(echo $param|grep -w 'ec718_0h00')" ] then export BOARD_NAME=ec718_0h00 export CHIP_NAME=ec7xx export OUTPUT_NAME=ec718_0h00_$CHIP_TYPE fi if [ -n "$(echo $param|grep -w 'bootloader')" ] then export PROJECT_NAME=bootloader export BUILD_OPTION=no_merge fi if [ -n "$(echo $param|grep -w 'ap')" ] then export CORE_NAME=ap export BUILD_OPTION=no_merge fi if [ -n "$(echo $param|grep -w 'cp')" ] then export CORE_NAME=cp export PROJECT_NAME=cp_project export BUILD_OPTION=no_merge fi if [ -n "$(echo $param|grep -w 'pwrTest')" ] then export PWR_TEST=true fi if [ -n "$(echo $param|grep -w 'nb_mode')" ] then export EUTRAN_MODE=nb_mode fi if [ -n "$(echo $param|grep -w 'at_command')" ] then export PROJECT_NAME=at_command fi if [ -n "$(echo $param|grep -w 'socket_command')" ] then export PROJECT_NAME=socket_command fi if [ -n "$(echo $param|grep -w 'mqtt_example')" ] then export PROJECT_NAME=mqtt_example fi if [ -n "$(echo $param|grep -w 'https_example')" ] then export PROJECT_NAME=https_example fi if [ -n "$(echo $param|grep -w 'ssl_example')" ] then export PROJECT_NAME=ssl_example fi if [ -n "$(echo $param|grep -w 'libapi_example')" ] then export PROJECT_NAME=libapi_example fi if [ -n "$(echo $param|grep -w 'pos_example')" ] then export PROJECT_NAME=pos_example fi if [ -n "$(echo $param|grep -w 'tts_example')" ] then export PROJECT_NAME=tts_example fi if [ -n "$(echo $param|grep -w 'audio_example')" ] then export PROJECT_NAME=audio_example fi if [ -n "$(echo $param|grep -w 'lpuart_test')" ] then export PROJECT_NAME=lpuart_test fi if [ -n "$(echo $param|grep -w 'driver_example')" ] then export PROJECT_NAME=driver_example export BUILD_OPTION=no_merge fi if [ -n "$(echo $param|grep -w 'dhrystone')" ] then export PROJECT_NAME=dhrystone fi if [ -n "$(echo $param|grep -w 'coremark')" ] then export PROJECT_NAME=coremark fi if [ -n "$(echo $param|grep -w 'slpman_example')" ] then export PROJECT_NAME=slpman_example fi if [ -n "$(echo $param|grep -w 'sleep_example')" ] then export PROJECT_NAME=sleep_example fi if [ -n "$(echo $param|grep -w 'slpPressure_test')" ] then export PROJECT_NAME=slpPressure_test export BUILD_OPTION=no_merge export LTO_ENABLE=false fi if [ -n "$(echo $param|grep -w 'ChipIpTest')" ] then export PROJECT_NAME=ChipIpTest export BUILD_OPTION=no_merge export LTO_ENABLE=false fi if [ -n "$(echo $param|grep -w 'ModemSlpPressure')" ] then export CORE_NAME=cp export PROJECT_NAME=ModemSlpPressure export BUILD_OPTION=no_merge export LTO_ENABLE=false fi if [ -n "$(echo $param|grep -w 'mcu_example')" ] then export PROJECT_NAME=mcu_example fi if [ -n "$(echo $param|grep -w 'soc_simple')" ] then export PROJECT_NAME=soc_simple fi if [ -n "$(echo $param|grep -w 'soc_bist')" ] then export PROJECT_NAME=soc_bist fi if [ -n "$(echo $param|grep -w 'simo_test')" ] then export PROJECT_NAME=simo_test fi if [ -n "$(echo $param|grep -w 'clk_verify')" ] then export PROJECT_NAME=clk_verify fi if [ -n "$(echo $param|grep -w 'qspi_test')" ] then export PROJECT_NAME=qspi_test fi if [ -n "$(echo $param|grep -w 'fpga_sct_utfw')" ] then export PROJECT_NAME=fpga_sct_utfw fi if [ -n "$(echo $param|grep -w 'spi_2boards')" ] then export PROJECT_NAME=spi_2boards fi if [ -n "$(echo $param|grep -w 'merge')" ] then export BUILD_OPTION=merge fi if [ -n "$(echo $param|grep -w 'sdkrel')" ] then export SDKREL=true fi if [ -n "$(echo $param|grep -w 'lto')" ] then export LTO_ENABLE=true fi if [ -n "$(echo $param|grep -w 'open_cpu')" ] then export OPENCPU=true export COMDBLIB_PATH="./prebuild/PLAT/lib/gcc/$CHIP_TYPE/oc" fi if [ -n "$(echo $param|grep -w 'audio')" ] then export AUDIO_ENABLE=true export OPENCPU=true export CPBIN_SUBPATH=audio fi if [ -n "$(echo $param|grep -w 'ims')" ] then export IMS_ENABLE=true export AUDIO_ENABLE=true export OPENCPU=true export COMDBLIB_PATH="./prebuild/PLAT/lib/gcc/$CHIP_TYPE/ims" export CPBIN_SUBPATH=audio fi if [ -n "$(echo $param|grep -w 'imsfix')" ] then export IMS_ENABLE=true export AUDIO_ENABLE=true export OPENCPU=true export COMDBLIB_PATH="./prebuild/PLAT/lib/gcc/$CHIP_TYPE/ims" export CPBIN_SUBPATH=audio export AUDIO_FIX_ENABLE=true fi if [ -n "$(echo $param|grep -w 'isms')" ] then export IMS_SMSONLY_ENABLE=true export OPENCPU=true export COMDBLIB_PATH="./prebuild/PLAT/lib/gcc/$CHIP_TYPE/isms" fi if [ -n "$(echo $param|grep -w 'verbose')" ] then export VERBOSE=1 else export VERBOSE=0 fi if [ -n "$(echo $param|grep -w 'secboot')" ] then export BUILD_HEADBIN=true makefile_path="./project/$BOARD_NAME/ap/apps/bootloader/GCC/Makefile" temp_file="temp.txt" awk ' { if ($0 == "CONFIG_PROJ_APP_SECURITY_BOOT = n") { print "CONFIG_PROJ_APP_SECURITY_BOOT=y" } else { print $0 } } ' "$makefile_path" > "$temp_file" mv "$temp_file" "$makefile_path" fi done } if [ $# -eq 0 ];then echo no input paramter, use default build setting echo default Board is: $BOARD_NAME echo default Chip is: $CHIP_NAME echo default ChipType is: $CHIP_TYPE echo default Project is: $PROJECT_NAME echo default core is: $CORE_NAME echo default option is: $BUILD_OPTION else check_param fi if [ -n "$(echo $LITE|grep 'true')" ] then export COMDBLIB_PATH="./prebuild/PLAT/lib/gcc/lite" fi if [ -f '$COMDBLIB_PATH/comdblib.txt' ] then echo cp '$COMDBLIB_PATH/comdblib.txt' './tools/' cp '$COMDBLIB_PATH/comdblib.txt' './tools/' fi echo curr Board is: $BOARD_NAME echo curr Chip is: $CHIP_NAME echo curr Type is: $CHIP_TYPE echo curr Project is: $PROJECT_NAME echo curr core is: $CORE_NAME echo curr option is: $BUILD_OPTION echo cp bin subpath: $CPBIN_SUBPATH if [ -f "$COMDBLIB_PATH/comdblib.txt" ] then cp -f $COMDBLIB_PATH/comdblib.txt ./tools/ fi if [ -n "$(echo $PARAMETERS|grep 'help')" ] then echo "==============================================================================================" echo " " echo " >> HOW TO BUILD A PROJECT << " echo " " echo "==============================================================================================" echo " " echo " @FORMAT : Gccbuild.sh [[-[-[-