| ::------------------------------------------------------------------------------------------ | |
| :: makefile for project | |
| ::------------------------------------------------------------------------------------------ | |
| BOOTLOADER_PATH=.. | |
| BOOTLOADER_PRJ_PATH=../../prj | |
| ECHO=@ | |
| TIMER_START = $(shell date) | |
| SRCROOT = $(word $(words $(subst /, ,$(subst /common/scripts,,$(shell pwd)))),$(subst /, ,$(subst /common/scripts,,$(shell pwd)))) | |
| ifeq ($(CHIP_TYPE),ZX297520V3) | |
| chip=zx297520v3 | |
| endif | |
| ifeq ($(BOARD_TYPE),EVB) | |
| board=evb | |
| endif | |
| ifeq ($(BOARD_TYPE),MIFI) | |
| board=mifi | |
| endif | |
| ifeq ($(BOARD_TYPE),MIFI_MINI) | |
| board=mifi_mini | |
| endif | |
| ifeq ($(BOARD_TYPE),MIFI_MINI_XR819) | |
| board=mifi_mini_xr819 | |
| endif | |
| ifeq ($(BOARD_TYPE),MIFI_MINI_64) | |
| board=mifi_mini_64 | |
| endif | |
| ifeq ($(BOARD_TYPE),UFI_MINI) | |
| board=ufi_mini | |
| endif | |
| ifeq ($(BOARD_TYPE),CPE) | |
| board=cpe | |
| endif | |
| ifeq ($(BOARD_TYPE),CPE_SWITCH) | |
| board=cpe_switch | |
| endif | |
| ifeq ($(BOARD_TYPE),PHONE) | |
| board=phone | |
| endif | |
| ifeq ($(BOARD_TYPE),FWP) | |
| board=fwp | |
| endif | |
| ifeq ($(BOARD_TYPE),MDL) | |
| board=mdl | |
| endif | |
| ifeq ($(BOARD_TYPE),MDL_AB) | |
| board=mdl_ab | |
| endif | |
| ifeq ($(BOARD_TYPE),VEHICLE_DC) | |
| board=vehicle_dc | |
| endif | |
| ifeq ($(BOARD_TYPE),VEHICLE_DC_REF) | |
| board=vehicle_dc_ref | |
| endif | |
| ifeq ($(BOARD_TYPE),MDL_MINI) | |
| board=mdl_mini | |
| endif | |
| ifeq ($(BOARD_TYPE),MDL_MINI_64) | |
| board=mdl_mini_64 | |
| endif | |
| ifeq ($(BOARD_TYPE),WATCH) | |
| board=watch | |
| endif | |
| ifeq ($(BOARD_TYPE),WATCH_CAP) | |
| board=watch_cap | |
| endif | |
| ifeq ($(strip $(board)),$(filter $(board),)) | |
| ram_text=0x23EF0000 | |
| V3T_RAM_TEXT_64M_UBOOT=y | |
| else ifeq ($(strip $(board)),$(filter $(board),vehicle_dc)) | |
| ram_text=0x27EF0000 | |
| V3T_RAM_TEXT_128M_UBOOT=y | |
| else ifeq ($(strip $(board)),$(filter $(board),vehicle_dc_ref)) | |
| ram_text=0x27EF0000 | |
| V3T_RAM_TEXT_128M_UBOOT=y | |
| else | |
| ram_text=0x21EF0000 | |
| endif | |
| ifeq ($(strip $(board)),$(filter $(board),vehicle_dc)) | |
| key_path=key/RSA_2048/private.k | |
| else | |
| ifeq ($(strip $(board)),$(filter $(board),vehicle_dc_ref)) | |
| key_path=key/RSA_2048/private.k | |
| else | |
| key_path=key/RSA_1024/private.k -t md5 | |
| endif | |
| endif | |
| export chip board key_path ram_text V3T_RAM_TEXT_64M_UBOOT | |
| export chip board key_path ram_text V3T_RAM_TEXT_128M_UBOOT | |
| default: help | |
| help: | |
| @echo "================== Make help ===================" | |
| @echo "make [help] help" | |
| @echo "make all[clean] compile all && link" | |
| @echo "make zloader[clean] build zloader" | |
| @echo "make tloader[clean] build tloader" | |
| @echo "make uboot[clean] build uboot" | |
| tloader: | |
| chmod -R 777 ../../../$(SRCROOT) | |
| cd $(BOOTLOADER_PATH)/scripts/build && sh ./build_tloader.sh | |
| @cp $(BOOTLOADER_PATH)/src/loader/z-load $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/z-load | |
| @cp $(BOOTLOADER_PATH)/src/loader/z-load.map $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/z-load.map | |
| @echo "$(TIMER_START)" | |
| @date | |
| zloader: | |
| chmod -R 777 ../../../$(SRCROOT) | |
| cd $(BOOTLOADER_PATH)/scripts/build && sh ./build_zloader_dlon.sh | |
| @cp $(BOOTLOADER_PATH)/src/loader/z-load $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/dl_on/z-load | |
| @cp $(BOOTLOADER_PATH)/src/loader/z-load.map $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/dl_on/z-load.map | |
| cd $(BOOTLOADER_PATH)/scripts/build && sh ./build_zloader_dloff.sh | |
| @cp $(BOOTLOADER_PATH)/src/loader/z-load $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/dl_off/z-load | |
| @cp $(BOOTLOADER_PATH)/src/loader/z-load.map $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/dl_off/z-load.map | |
| @echo "$(TIMER_START)" | |
| @date | |
| ::------------------------------------------------------------------------------------------ | |
| :: º¯Êý¶¨Ò壬עÒ⺯Êý¶¨Òå»»ÐкóÊǿոñ£¬²»ÊÇtab | |
| ::------------------------------------------------------------------------------------------ | |
| make-uboot = \ | |
| chmod -R 777 ../../../$(SRCROOT); \ | |
| cp -rf $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/config/uboot/* $(BOOTLOADER_PATH)/src/uboot; \ | |
| cd $(BOOTLOADER_PATH)/scripts/build && sh ./$(1); \ | |
| echo "$(TIMER_START)"; \ | |
| date; | |
| uboot: | |
| $(call make-uboot,build_uboot.sh) | |
| ::------------------------------------------------------------------------------------------ | |
| :: clean | |
| ::------------------------------------------------------------------------------------------ | |
| zloaderclean: | |
| rm -fr $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/dl_off/*load* | |
| rm -fr $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/dl_on/*load* | |
| tloaderclean: | |
| rm -fr $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/*load* | |
| loadersrcclean: | |
| cd $(BOOTLOADER_PATH)/scripts/build && sh ./build_loader_clean.sh | |
| ubootclean: | |
| ifeq ($(strip $(board)),$(filter $(board),fwp phone)) | |
| rm -fr $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/$(lcd)/*boot* | |
| else | |
| rm -fr $(BOOTLOADER_PRJ_PATH)/$(chip)/$(board)/bin/*boot* | |
| endif | |
| ubootsrcclean: | |
| cd $(BOOTLOADER_PATH)/scripts/build && sh ./build_uboot_clean.sh | |
| ::------------------------------------------------------------------------------------------ | |
| :: all | |
| ::------------------------------------------------------------------------------------------ | |
| all: zloader tloader uboot | |
| allclean: zloaderclean tloaderclean ubootclean | |
| bootclean: loadersrcclean ubootsrcclean | |
| klocwork: | |
| bash $(KLOCWORK_SCRIPT_PATH)/0_flush.sh $(KLOCWORK_WEBUI_PRJ_NAME) allclean all | |
| covall: | |
| bash $(COVERITY_SCRIPT_PATH)/flush.sh allclean all | |
| make cov_upload | |
| coverity: | |
| bash $(COVERITY_SCRIPT_PATH)/flush.sh $(COV_TARGET) | |
| cov_upload: | |
| bash $(COVERITY_SCRIPT_PATH)/upload.sh $(COVERITY_PRJ_STREAM_NAME) | |
| cov_report: | |
| bash $(COVERITY_SCRIPT_PATH)/report2.sh |