📄 gsm2.mak
字号:
# 4. MMI_VERSION != (PLUTO_MMI | NEPTUNE_MMI) ............................. MP is in our site => CUSTOMER_MMI
# 5. MMI_VERSION == (PLUTO_MMI | NEPTUNE_MMI) & EMPTY_RESOURCE == TRUE .... MP is NOT in our site => PLUTO_MMI or NEPTUNE_MMI
ifeq ($(strip $(CUSTOM_RELEASE)),FALSE)
NEED_COPY_MMIFEATURE = CUSTOMER_MMI
ifeq ($(strip $(MMI_VERSION)),PLUTO_MMI)
NEED_COPY_MMIFEATURE = PLUTO_MMI
ifdef EMPTY_RESOURCE
ifeq ($(strip $(EMPTY_RESOURCE)),TRUE)
NEED_COPY_MMIFEATURE = CUSTOMER_MMI
endif
endif
else
ifeq ($(strip $(MMI_VERSION)),NEPTUNE_MMI)
NEED_COPY_MMIFEATURE = NEPTUNE_MMI
ifdef EMPTY_RESOURCE
ifeq ($(strip $(EMPTY_RESOURCE)),TRUE)
NEED_COPY_MMIFEATURE = CUSTOMER_MMI
endif
endif
endif
endif
else
NEED_COPY_MMIFEATURE = CUSTOMER_MMI
ifeq ($(strip $(MMI_VERSION)),PLUTO_MMI)
NEED_COPY_MMIFEATURE = PLUTO_MMI
endif
ifeq ($(strip $(MMI_VERSION)),NEPTUNE_MMI)
NEED_COPY_MMIFEATURE = NEPTUNE_MMI
endif
endif
ifeq ($(call Upper,$(PROJECT)),BASIC)
NEED_COPY_MMIFEATURE = NONE
endif
ifeq ($(call Upper,$(PROJECT)),L1S)
NEED_COPY_MMIFEATURE = NONE
endif
# Determine if BOOTLOADER built required
SCATBL_PREFIX =
NEED_BUILD_BOOTLOADER = FALSE
ifeq ($(strip $(NAND_FLASH_BOOTING)),TRUE)
NEED_BUILD_BOOTLOADER = TRUE
SCATBL_PREFIX = BL
BOOTLOADER_CHE = ON
else
ifdef USB_DOWNLOAD
ifeq ($(strip $(USB_DOWNLOAD)),NORMAL)
NEED_BUILD_BOOTLOADER = TRUE
SCATBL_PREFIX = USB
BOOTLOADER_CHE = ON
endif
ifeq ($(strip $(USB_DOWNLOAD)),SECURE)
NEED_BUILD_BOOTLOADER = TRUE
SCATBL_PREFIX = USB
BOOTLOADER_CHE = ON
endif
endif
endif
# *************************************************************************
# Search Paths
# *************************************************************************
vpath
vpath %.h $(subst \,/,$(dir $(COMP_TRACE_DEFS)))
vpath %.ptr $(subst \,/,$(strip $(TST_DB))\pstrace_db)
vpath %.dep $(subst \,/,$(strip $(RULESDIR)))
vpath %.lib $(strip $(OBJSDIR))\lib
vpath %.bin $(strip $(TARGDIR))
# *************************************************************************
# Implicit Rules and Compiler Options
# *************************************************************************
BIN_FILE = $(strip $(NEWTARGNAME)).bin
LIS_FILE = $(strip $(TARGNAME)).lis
IMG_FILE = $(strip $(TARGNAME)).elf
CODE_GEN_LST = $(strip $(TST_DB))\codegen.lis
ROM_IMG_FILE = rompatch\$(strip $(PLATFORM))\$(strip $(CHIP_VER))\ROMSA_$(strip $(PLATFORM))_$(strip $(CHIP_VER)).sym
# *************************************************************************
# Settings for BOOTLOADER
# *************************************************************************
BTLDVERNODIR = $(strip $(FIXPATH))\BootLoader\src
BTLD_PREFIX = $(strip $(CUSTOMER))_BOOTLOADER_$(strip $(BTLD_VERNO))_$(strip $(PLATFORM))_$(strip $(PURE_VERNO))
BTLD_BIN_FILE = $(strip $(BTLD_PREFIX)).bin
BTLD_SCATTERFILE = .\bootloader\src\scatter\scat$(strip $(SCATBL_PREFIX))_$(strip $(PLATFORM)).txt
BTLDLNKOPT = $(strip $(LNKOPT)) $(strip $(BTLD_LNKOPT)) -scatter $(BTLD_SCATTERFILE) \
-output $(strip $(TARGDIR))\$(BTLD_PREFIX).elf \
-symdefs $(strip $(TARGDIR))\$(BTLD_PREFIX).sym \
-list $(strip $(TARGDIR))\$(BTLD_PREFIX).lis \
-libpath $(DIR_ARMLIB)
-include $(BTLDVERNODIR)\verno_bootloader.bld
# *************************************************************************
# Settings for FOTA
# *************************************************************************
# FOTA bin file name (cannot contain MAUI in FOTA bin file name)
FOTA_PREFIX = $(strip $(CUSTOMER))_FOTA_$(strip $(PLATFORM))_$(strip $(FOTA_PURE_VERNO))
FOTA_BIN_FILE = $(strip $(FOTA_PREFIX)).bin
CUSTOM_FOTA_H = $(strip $(FIXPATH))\custom\system\$(strip $(BOARD_VER))\custom_fota.h
FOTA_SCATTERFILE = .\fota\src\scatter\scatFOTA.txt
FOTALNKOPT = $(strip $(LNKOPT)) -scatter $(FOTA_SCATTERFILE) \
-output $(strip $(TARGDIR))\$(FOTA_PREFIX).elf \
-symdefs $(strip $(TARGDIR))\$(FOTA_PREFIX).sym \
-list $(strip $(TARGDIR))\$(FOTA_PREFIX).lis \
-libpath $(DIR_ARMLIB)
# *************************************************************************
# New Build
# *************************************************************************
ifeq ($(strip $(call Upper,$(LEVEL))),VENDOR)
new : cleanall cleanlog cleanbin resgen remake
else
ifeq ($(strip $(NEED_BUILD_BOOTLOADER)),TRUE)
ifeq ($(strip $(call Upper,$(L1_WCDMA))),TRUE)
new : cleanall cmmgen mmi_feature_check asngen umts_gen codegen asnregen operator_check_lite $(BTLD_BIN_FILE) update
else
new : cleanall cmmgen mmi_feature_check asngen codegen asnregen operator_check_lite $(BTLD_BIN_FILE) update
endif
else
ifeq ($(strip $(call Upper,$(PROJECT))),UMTS)
new : cleanall cmmgen mmi_feature_check asngen umts_gen codegen asnregen operator_check_lite update
else
new : cleanall cmmgen mmi_feature_check asngen codegen asnregen operator_check_lite update
endif
endif
endif
# *************************************************************************
# Update Build
# *************************************************************************
#update : cleanlog cleanbin mcddll_update codegen resgen cksysdrv remake
ifeq ($(strip $(CUSTOM_RELEASE)),TRUE)
ifeq ($(strip $(CUSTOM)),MONZA29)
update : cleanlog codegen remake
else
ifeq ($(strip $(call Upper,$(PROJECT))),UMTS)
update : cleanlog cleanbin umts_gen mcddll_update codegen cksysdrv resgen remake
else
update : cleanlog cleanbin mcddll_update codegen cksysdrv resgen remake
endif
endif
else
ifeq ($(strip $(call Upper,$(PROJECT))),UMTS)
update : cleanlog cleanbin umts_gen mcddll_update codegen resgen cksysdrv remake
else
update : cleanlog cleanbin mcddll_update codegen resgen cksysdrv remake
endif
endif
# *************************************************************************
# Remake Build
# *************************************************************************
ifeq ($(strip $(call Upper,$(REMAKE_MODS))),BOOTLOADER)
remake : $(BTLD_BIN_FILE) done
else
ifeq ($(strip $(call Upper,$(REMAKE_MODS))),FOTA)
remake : $(FOTA_BIN_FILE) done
else
ifdef FOTA_ENABLE
ifneq ($(strip $(FOTA_ENABLE)),NONE)
remake : mcp_check cleanlog cleanbin genverno libs $(BIN_FILE) $(FOTA_BIN_FILE) done
else
remake : mcp_check cleanlog cleanbin genverno libs $(BIN_FILE) done
endif
else
remake : mcp_check cleanlog cleanbin genverno libs $(BIN_FILE) done
endif
endif
endif
# *************************************************************************
# Tools code preprocess and generation
# *************************************************************************
ifeq ($(strip $(call Upper,$(PROJECT))),UMTS)
code_generate: cleancodegen asngen umts_gen codegen asnregen cleanbin mcddll_update done
else
code_generate: cleancodegen asngen codegen asnregen cleanbin mcddll_update done
endif
# ---------------------------------------
# 3G Codegen Gen Files: ASN and DBME
# ---------------------------------------
umts_gen:
(cd uas) & \
(uas_generate.bat) & \
(cd ..) & \
# ---------------------------------------
# MCDDLL update
# ---------------------------------------
mcddll_update: codegen
ifneq ($(strip $(CUSTOM_RELEASE)),TRUE)
ifneq ($(call Upper,$(strip $(PROJECT))),L1S)
ifneq ($(call Upper,$(strip $(PROJECT))),BASIC)
(cd ps) & \
(cd mcddll) & \
(perl updatemcddll_msvc.pl $(call Upper,$(strip $(PROJECT)))) & \
(cd ..) & \
(cd ..) & \
(copy /y ps\mcddll\mcddll.dll $(strip $(TST_DB))\mcddll.dll > nul)
endif
endif
endif
# -----------------------------
# Asn Gen Files
# -----------------------------
asngen:
# XXX!!!. Temporary solution for customer engagement
@if /I $(CUSTOMER) EQU PLUTO \
(@if /I $(CUSTOM_RELEASE) EQU FALSE \
(copy /z init\src\Pluto_idma.c init\src\idma.c) & \
(copy /z init\include\Pluto_idma_out.h init\include\idma_out.h) & \
(copy /z init\src\Pluto_bootarm.s init\src\bootarm.s) & \
(copy /z init\src\Pluto_init.c init\src\init.c) \
)
-@if /I $(PROJECT) NEQ L1S \
(@if /I $(PROJECT) NEQ BASIC \
(@if /I $(CUSTOM_RELEASE) EQU FALSE \
(@if /I $(MCD_SUPPORT) EQU TRUE \
(md ps\gen) & \
(@echo Generate ASN Gen Files 1st Phase ...) & \
(cd ps\tools) & \
(perl ./mcdparser.pl mcd.ini --only=$(PROJECT) --define="$(CUSTOM_OPTION)") & \
(cd ..\..) \
else \
(@echo Generate ASN Gen Files ...) & \
(cd ps) & \
(generate.bat) & \
(@echo Generate ASN Gen Files Done ...) \
) \
) \
)
asnregen:
-@if /I $(PROJECT) NEQ L1S \
(@if /I $(PROJECT) NEQ BASIC \
(@if /I $(CUSTOM_RELEASE) EQU FALSE \
(@if /I $(MCD_SUPPORT) EQU TRUE \
(@echo Generate ASN Gen Files 2nd Phase ...) & \
(cd ps\tools) & \
(perl ./mcdparser.pl mcd.ini --only=$(PROJECT) --only=for_catcher --define="$(CUSTOM_OPTION)") & \
(cd ..\..) \
) \
) \
)
codegen : gencustominfo operator_check gencustomlists nvram_auto_gen med_mem_check $(CODEGEN_RESULT)
-@if exist $(strip $(INFOMAKELOG)) \
echo COMP_TRACE_DEFS = $(call sort, $(foreach def,$(COMP_TRACE_DEFS),$(def))) >> $(INFOMAKELOG)
# -----------------------------
# Step 1: Preprocess
# -----------------------------
$(TST_GEN_DEP_OUTS) : $(TST_GEN_DEP_SRCS)
@echo Check Directories ...
-@if not exist $(strip $(TST_DB)) \
md $(TST_DB)
-@if not exist $(strip $(TST_DB))\msglog_db \
md $(strip $(TST_DB))\msglog_db
-@if /I $(PROJECT) NEQ BASIC \
(@if /I $(CUSTOM_RELEASE) EQU FALSE \
(@if not exist $(strip $(L1TRACE_DB_DIR)) \
(md $(strip $(L1TRACE_DB_DIR))) \
) & \
(@if not exist $(strip $(L1VAL_DB_DIR)) \
(md $(strip $(L1VAL_DB_DIR))) \
) \
)
-@if not exist $(strip $(PSTRACE_DB_DIR)) \
md $(strip $(PSTRACE_DB_DIR))
-@if not exist $(strip $(GV_DB_DIR)) \
md $(strip $(GV_DB_DIR))
-@if not exist $(strip $(GV_DB_PARSE_DIR)) \
md $(strip $(GV_DB_PARSE_DIR))
-@if exist $(strip $(PSTRACE_DB_DIR)) \
del /Q $(strip $(PSTRACE_DB_DIR))\*.*
@echo Preprocessing C source code ...
@tools\strcmpex.exe def def e make\~inc_def.tmp $(foreach def,$(COM_DEFS),-D$(def))
@echo -D__NULL_DEF__ >> make\~inc_def.tmp
@perl tools\echoLongString2.pl make\~inc_def.tmp -D $(COM_DEF_PATH)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -