make 实例 一 3463
#########################################################################
#
# Makefile used for building application.
#
# The default target (all) builds application in three formats :
# *.rec : Image in S-record format.
# *.bin : Image in binary format.
# *.elf : Image in ELF format.
# *.map : Linker generated map file.
# *.dis : Disassembly of image.
# *.sym : Symbols.
#
# Other targets are :
# clean : Deletes all files generated by makefile.
#
######################################################################### CONFIG_FILE ?= .config -include $(CONFIG_FILE) include config_by_chip.mk # **********************************************
# Build Options
# **********************************************
# Version: Debug or Retail
VERSION ?= Retail
R2_BACKTRACE ?= #==================================================================================================
# Image name
AP_NAME = AP
BL_NAME = BL
AP_COMPRESS_NAME = AP_C BL_UPGRADE_FILE:=$(shell ./GetUpFile.py)
ifeq ($(BL_UPGRADE_FILE),MSD3463GU_30.BIN)
MERGE_NAME = MSD3463GU_30
else ifeq ($(BL_UPGRADE_FILE),MSD3463GU_33.BIN)
MERGE_NAME = MSD3463GU_33
else ifeq ($(BL_UPGRADE_FILE),MSD3463GU_60.BIN)
MERGE_NAME = MSD3463GU_60
else
MERGE_NAME = MERGE
endif RES_NAME = RES ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
_BL_SIZE = $(firstword $(shell du -b $(BINPATH)_BLOADER/MERGE.bin))
BL_SIZE = $(shell _BL_SIZE1=$(_BL_SIZE); _BL_SIZE2=; printf '0x%X' $$((_BL_SIZE1-_BL_SIZE2)))
endif # Decide sboot binary file name
ifeq ($(PROJ),MIPS_EMERALD_ZUI_MM_128MB_DVBT_CI_PLUS_T2)
BD_SBOOT_FILE_NAME = sboot_T2.bin else ifeq ($(MEMORY_SIZE),MEMORY_32MB)
BD_SBOOT_FILE_NAME = sboot_32.bin else ifeq ($(MEMORY_SIZE),MEMORY_64MB)
BD_SBOOT_FILE_NAME = sboot_64.bin else # 128M or other memory size
ifeq ($(CHIP_FAMILY),MILAN)
ifeq ($(MEMORY_SIZE),MEMORY_128MB)
BD_SBOOT_FILE_NAME = sboot_128.bin
else
#BD_SBOOT_FILE_NAME = sboot_.bin
endif
else
BD_SBOOT_FILE_NAME = sboot.bin
endif
endif # **********************************************
# Tool Chain
# **********************************************
ifeq ($(OS_TYPE),nos_aeon)
AEON_TYPE = aeonR2
endif ifeq ($(PARA), )
CROSSCOMPILE =
CORSSCOMPILE_VER = -V 4.4.
AEON_FLAG =
else ifeq ($(OS_TYPE),nos_mips)
CROSSCOMPILE = mips-sde-elf-
CORSSCOMPILE_VER = -V 4.3.
AEON_FLAG =
else ifeq ($(OS_TYPE),nos_aeon)
ifeq ($(USE_NEW_AEON_TOOLCHAIN),)
CROSSCOMPILE = r2-elf-
CORSSCOMPILE_VER =
else
CROSSCOMPILE = aeon-
CORSSCOMPILE_VER =
endif
AEON_FLAG = -march=$(AEON_TYPE) -mhard-div -mhard-mul -EL -mredzone-size=
endif # AEON_FLAG = -march=aeon1 -mhard-div -mhard-mul -fno-delayed-branch -minsert-nop-before-branch ifeq ($(PARA), )
CC = cpptestscan --cpptestscanProjectName=UTProject $(CROSSCOMPILE)gcc $(CROSSCOMPILE_VER)
CPP = cpptestscan --cpptestscanProjectName=UTProject $(CROSSCOMPILE)cpp
LD = cpptestscan --cpptestscanProjectName=UTProject $(CROSSCOMPILE)ld
else
CC = $(CROSSCOMPILE)gcc $(CROSSCOMPILE_VER)
CPP = $(CROSSCOMPILE)cpp
LD = $(CROSSCOMPILE)ld
endif
OBJCOPY = $(CROSSCOMPILE)objcopy
OBJDUMP = $(CROSSCOMPILE)objdump
SIZE = $(CROSSCOMPILE)size
AR = $(CROSSCOMPILE)ar
NM = $(CROSSCOMPILE)nm
READELF = $(CROSSCOMPILE)readelf AWK = /bin/gawk #-------------------------------------------------------------------------------------------------
ifeq ($(shell uname -s), Linux)
FLINT = scripts/flint
REALPATH= echo
else
FLINT = scripts/LINT-NT.EXE
REALPATH:= cygpath -w
endif # **********************************************
# Directories
# **********************************************
PREFIXDIR?=
ROOT = .
BINDIR = ./$(PREFIXDIR)/Bin_$(PROJ)
BINPATH = $(BINDIR)
OBJDIR = ./$(PREFIXDIR)/Obj_$(PROJ)
OBJPATH = $(OBJDIR)
LZSSDIR = ./scripts/lzss
MSCOMPDIR = ./scripts/util BOOTDIR = ./boot
COREDIR ?= ./core
MIDDLEWARE_DIR = ./core/middleware
PROJECT_DIR = ./core/project
CHECK_BIN_DIR = ./scripts/check_bin
#------------------------------------------------------------------------------------- ###==================================================================================
## Option for gcc
#
CC_TVOPTS += -DMS_BOARD_TYPE_SEL=$(BOARD_TYPE_SEL) # Link option: ENABLE_DVBS <--> ENABLE_S2
ifeq ($(CHIP_FAMILY),MILAN)
ifneq ($(ENABLE_DVBS),)
CC_TVOPTS += -DENABLE_S2=$(ENABLE_DVBS)
else
CC_TVOPTS += -DENABLE_S2=DISABLE
endif
endif #-------------------------------------------------------------
# Link option: MEMORY_SIZE <--> MEMORY_MAP
ifeq ($(MEMORY_SIZE),MEMORY_32MB)
CC_TVOPTS += -DMEMORY_MAP=MMAP_32MB else ifeq ($(MEMORY_SIZE),MEMORY_64MB)
CC_TVOPTS += -DMEMORY_MAP=MMAP_64MB else ifeq ($(MEMORY_SIZE),MEMORY_128MB)
CC_TVOPTS += -DMEMORY_MAP=MMAP_128MB else ifeq ($(MEMORY_SIZE),MEMORY_128_128MB)
CC_TVOPTS += -DMEMORY_MAP=MMAP_128_128MB else ifeq ($(MEMORY_SIZE),MEMORY_256_256MB)
CC_TVOPTS += -DMEMORY_MAP=MMAP_256_256MB endif
#-------------------------------------------------------------
ifeq ($(AUTOBOOT),)
CC_TVOPTS += -DAUTOBOOT= -DAUTOBOOTCL=$(CL)
endif ifeq ($(BUILD_TARGET),ORGINAL_ALL_SYSTEM)
CC_TVOPTS += -DORGINAL_ALL_MERGE=
CC_TVOPTS += -DBLOADER=
else
CC_TVOPTS += -DORGINAL_ALL_MERGE=
ifeq ($(BUILD_TARGET),BLOADER_SYSTEM)
CC_TVOPTS += -DBLOADER=
else
CC_TVOPTS += -DBLOADER=
endif
endif ifeq ($(SECURE_BOOT),)
CC_TVOPTS += -DSECURE_BOOT=
else
CC_TVOPTS += -DSECURE_BOOT=
endif CC_TVOPTS += -DUSE_SW_I2C= -DCOMB_3D -DBOOTLOADER_BANK_NUM ifeq ($(R2_BACKTRACE),)
CC_TVOPTS += -DENABLE_R2_BACKTRACE=
endif
#===========================================================================================
# Driver BSP header file ifeq ($(OS_TYPE),nos_mips)
DRV_BSP_INC = $(COREDIR)/drv_bsp/$(chip_name)_nos_mips/include
else
DRV_BSP_INC = $(COREDIR)/drv_bsp/$(chip_name)_nos_r2m/include
endif # Add "Header (include) file" directories here ...
INC_DIR = \
-I$(ROOT)/include \
-I$(BOOTDIR) \
-I$(COREDIR)/api/Arabic_Parser/Include \
-I$(COREDIR)/api/include \
-I$(COREDIR)/api/Thai_Parser/Include \
-I$(COREDIR)/api/utl \
-I$(COREDIR)/driver/sys/include \
-I$(MIDDLEWARE_DIR)/closedcaption/include \
-I$(DRV_BSP_INC) \
-I$(DRV_LEGACY_INC) \
-I$(PROJECT_DIR)/image/dvbt ifeq ($(OS_TYPE),nos_aeon)
INC_DIR += -I$(ROOT)/include/std
endif #----------------------------------------------------------------------------------------------- WARN_FLAGS = -Wall -Wextra -Wcast-align -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Wno-format -Wshadow YOGA_GLOBAL_CFLAGS = -pipe -fno-exceptions -ffunction-sections $(WARN_FLAGS) #===========================================================================================
# Source files ... SRC_FILE = $(COREDIR)/api/utl/NoOS.c ifneq ($(BUILD_FILE),)
include $(BUILD_FILE)
else
include project/build/FILES_$(PROJ).mk
endif #============================================================================================
ifeq ($(CHIP_FAMILY),EULER)
IMGINFO_OFFSET =
BOOTLOADER ?= project/loader/bootloader_EULER_R2.ld else ifeq ($(CHIP_FAMILY),EDEN)
IMGINFO_OFFSET =
BOOTLOADER ?= project/loader/bootloader_EDEN_R2.ld else ifeq ($(CHIP_FAMILY),NASA)
IMGINFO_OFFSET =
BOOTLOADER ?= project/loader/bootloader_NASA_R2.ld else ifeq ($(CHIP_FAMILY),EMERALD)
BOOTLOADER = project/loader/bootloader_emerald.ld
IMGINFO_OFFSET = else ifeq ($(CHIP_FAMILY),NUGGET)
BOOTLOADER = project/loader/bootloader_nugget.ld
IMGINFO_OFFSET = else ifeq ($(CHIP_FAMILY),NIKON)
BOOTLOADER = project/loader/bootloader_nikon.ld
IMGINFO_OFFSET = else ifeq ($(CHIP_FAMILY),MILAN)
BOOTLOADER = project/loader/bootloader_milan.ld
IMGINFO_OFFSET = endif # **********************************************
# Image file names
# **********************************************
AP_BIN = $(BINPATH)/$(AP_NAME).bin
###AP_BIN2= $(BINPATH)/$(AP_NAME)_2.bin
APC_BIN = $(BINPATH)/$(AP_COMPRESS_NAME).bin
AP_ELF = $(BINPATH)/$(AP_NAME).elf
AP_MAP = $(BINPATH)/$(AP_NAME).map
AP_DIS = $(BINPATH)/$(AP_NAME).dis
AP_SYM = $(BINPATH)/$(AP_NAME).sym
AP_OBJ = $(OBJPATH)/$(AP_NAME).o ifeq ($(R2_BACKTRACE),)
AP_BT_SYM = $(BINPATH)/bt_symbol.S
AP_BT_OBJ = $(BINPATH)/bt_symbol.o
BT_TOOL_TEXT_SYNS = ./scripts/util/text_syms
#TOOL_CHAIN = $(shell ($(CC) -v &> gcc_version.txt | grep "gcc version" gcc_version.txt | cut -d" " -f3 |cat ))
TOOL_CHAIN = 4.1.
endif ifeq ($(OS_TYPE),nos_mips)
BT_TOOL_TEXT_SYNS = ./scripts/util/text_syms
AP_BT_SYM = $(BINPATH)/bt_symbol.S
AP_ELF_NM_1 = $(BINPATH)/ap.nm.txt
endif MERGE_BIN = $(BINPATH)/$(MERGE_NAME).bin
#MERGE_ELF = $(BINPATH)/$(MERGE_NAME).elf
MERGE_DIS = $(BINPATH)/$(MERGE_NAME).dis
MERGE_MAP = $(BINPATH)/$(MERGE_NAME).map
MERGE_BIN_2 = $(BINPATH)/$(MERGE_NAME)_2.bin
###HK51_BOOT = $(BINPATH)/$(MERGE_NAME).bin RES_BIN = $(BINPATH)/$(RES_NAME).bin ifeq ($(LOADER),)
ifeq ($(OS_TYPE),nos_mips)
#LOADER ?= project/loader/loader_nos_mips_$(chip_name).ld
LOADER ?= $(BINPATH)/loader_nos_mips_$(PROJ).ld else ifeq ($(OS_TYPE),nos_aeon)
#LOADER ?= project/loader/loader_nos_aeon_$(chip_name).ld
LOADER ?= $(BINPATH)/loader_nos_aeon_$(PROJ).ld
endif
endif # **********************************************
# Tools
# **********************************************
#SWAP = perl $(TOOLS)/byteswap.pl ifeq ($(BUILD_TARGET),BLOADER_SYSTEM)
ifeq ($(BIN_FORMAT),COMPRESS)
BinIDPackFiles = python scripts/PadLoaderCrc_OAD.py
else
ifeq ($(BIN_FORMAT),COMPRESS7)
BinIDPackFiles = python scripts/PadLoaderCrc_OAD.py
else
BinIDPackFiles = python scripts/PadLoaderCrc.py
endif
endif
else
ifeq ($(BUILD_TARGET),ORGINAL_ALL_SYSTEM)
ifeq ($(BIN_FORMAT),COMPRESS)
BinIDPackFiles = python scripts/BinIDPackFiles_Compress.py
else
ifeq ($(BIN_FORMAT),COMPRESS7)
BinIDPackFiles = python scripts/BinIDPackFiles_Compress.py
else
BinIDPackFiles = python scripts/BinIDPackFiles.py
endif
endif
else
ifeq ($(BIN_FORMAT),COMPRESS)
ifeq ($(SECURE_BOOT),)
BinIDPackFiles = python scripts/BinIDPackFilesForNewMerge_Compress_Secure.py
else
BinIDPackFiles = python scripts/BinIDPackFilesForNewMerge_Compress.py
endif
else
ifeq ($(BIN_FORMAT),COMPRESS7)
BinIDPackFiles = python scripts/BinIDPackFilesForNewMerge_Compress.py
else
BinIDPackFiles = python scripts/BinIDPackFilesForNewMerge.py
endif
endif
endif
endif
BinIDPackResources = python scripts/BinIDPackResources.py
AddBin = python scripts/Addbin.py # Pack bin files parameter...
BLOADER_PACK__BIN_ALIGN =
BLOADER_PACK__FILE_ALIGN = AP_PACK__BIN_ALIGN =
AP_PACK__FILE_ALIGN = ifeq ($(CHIP_FAMILY),MILAN)
AP_PACK__FILE_ALIGN =
endif # **********************************************
# Files to be compiled
# **********************************************
SRC_S = $(filter %.S, $(SRC_FILE))
SRC_C = $(filter %.c, $(SRC_FILE))
SRC_O = $(filter %.o, $(SRC_FILE))
SRC_B = $(filter %.bin, $(SRC_FILE)) OBJ_S = ${SRC_S:%.S=$(OBJPATH)/%.o}
OBJ_C = ${SRC_C:%.c=$(OBJPATH)/%.o}
OBJ_B = ${SRC_B:%.bin=$(OBJPATH)/%.o} OBJ = $(OBJ_C) $(OBJ_B) $(OBJ_S) BL_SRC_S = $(filter %.S, $(BL_SRC_FILE))
BL_SRC_C = $(filter %.c, $(BL_SRC_FILE))
BL_SRC_O = $(filter %.o, $(BL_SRC_FILE))
BL_SRC_B = $(filter %.bin, $(BL_SRC_FILE)) BL_OBJ_S = ${BL_SRC_S:%.S=$(OBJPATH)/%.o}
BL_OBJ_C = ${BL_SRC_C:%.c=$(OBJPATH)/%.o}
BL_OBJ_B = ${BL_SRC_B:%.bin=$(OBJPATH)/%.o} BL_OBJ = $(BL_OBJ_C) $(BL_OBJ_B) $(BL_OBJ_S) SRC = $(SRC_C) $(BL_SRC_C) # ***********************************************************************
# Libraries
# *********************************************************************** # Standard Libraries Path
ifeq ($(OS_TYPE),nos_mips)
OS_LIB_DIR = $(ROOT)/core/lib/$(chip_name)
endif # **********************************************
# Compiler and linker options
# ********************************************** #===============================================================================================================
# Option of compiler
#-------------------------------------------- INCLUDE = $(INC_DIR) YOGA_GLOBAL_LDFLAGS = -msoft-float -g -nostdlib -Wl,--gc-sections -Wl,-static ifeq ($(PARA), )
CC_OPTS0 +=
CC_OPTS0 += -c $(INCLUDE) $(AEON_FLAG) $(CC_TVOPTS) $(YOGA_GLOBAL_CFLAGS) $(MALLOC_CFLAGS)
else ifeq ($(OS_TYPE),nos_mips)
CC_OPTS0 += -EL
CC_OPTS0 += -fno-optimize-sibling-calls -mips32r2 -msoft-float -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -ffunction-sections -fdata-sections -fno-exceptions -G0
CC_OPTS0 += -DMSOS_TYPE_NOS
endif CC_OPTS0 += -c $(INCLUDE) $(AEON_FLAG) $(CC_TVOPTS) $(YOGA_GLOBAL_CFLAGS) $(MALLOC_CFLAGS) ifeq ($(OS_TYPE),nos_aeon)
CC_OPTS0 += -Wno-strict-aliasing
endif
endif # config for debug info and optimize
ifeq ($(OS_TYPE),nos_mips)
#CC_OPTS = $(CC_OPTS0) -O2 -gdwarf-
#CC_OPTS = $(CC_OPTS0) -g -O2
CC_OPTIMIZE = -O2
ifeq ($(CHIP_FAMILY),MILAN)
#ifeq ($(MEMORY_SIZE),MEMORY_64MB)
ifeq ($(BUILD_TARGET),BLOADER_SYSTEM)
CC_OPTIMIZE = -Os
endif
endif
CC_OPTS = $(CC_OPTS0) -g $(CC_OPTIMIZE)
else
ifeq ($(VERSION),Debug)
CC_OPTS = $(CC_OPTS0) -g -O2 -gdwarf-
else
CC_OPTS = $(CC_OPTS0) -O2 -gdwarf-
endif
endif #ifeq ($(VERSION),Debug)
# ifeq ($(OS_TYPE),nos_mips)
# #CC_OPTS = $(CC_OPTS0) -g -O0 -gdwarf-
# else
# CC_OPTS = $(CC_OPTS0) -O0 -ggdb
# endif
#else
# #ifeq ($(R2_BACKTRACE),)
# # CC_OPTS = $(CC_OPTS0) -O2 -gdwarf-
# #else
# CC_OPTS = $(CC_OPTS0) -O2 -gdwarf-
# #CC_OPTS = $(CC_OPTS0) -O2 -g
# #CC_OPTS = $(CC_OPTS0) -Os
# #endif
#endif #------------------------------------------------------------------------------------------------------- ifeq ($(PARA), )
LD_OPTS +=
else
#ifneq ($(CROSSCOMPILE),aeon-)
#LD_OPTS += -EL
#endif ifeq ($(OS_TYPE),nos_mips)
# When ld is used for linking (must specify standard library search path or set SEARCH_DIR in linker script)
LD_OPTS += -g -nostdlib -EL -msoft-float -Wl,--gc-sections -Wl,-static -Wl,-Map,$(AP_MAP)
LD_LIB += -lm -lc -L$(OS_LIB_DIR) -T$(LOADER)
else
LD_OPTS += -EL -nostartfiles $(YOGA_GLOBAL_LDFLAGS) $(AEON_FLAG) -LLIB -W1,--gc-sections
LDLIB += -lc -lgcc -lm
endif
endif # **********************************************
# Rules
# **********************************************
.PHONY : all clean pmsleep lint
.SUFFIXES: .bin .elf .dis .sym .siz # Project Build all : $(PROJ) #--------------------------------------------------------------------------------- $(PROJ): loader setup sboot ap checkbinsize merge debug_info lint
@echo "[Rule - PROJ_$(PROJ)]"
@date #--------------------------------------------------------------------------------- #Note: It's slow to produce .dis file w/o -gdwarf-2 set or original OS source code ap: $(AP_ELF) $(AP_BIN) $(AP_SYM)
@echo "[Rule - ap]"
@echo "[AP_END]" #--------------------------------------------------------------------------------- ifeq ($(OS_TYPE),nos_mips)
merge: $(MERGE_BIN) SECURE
@echo "[Rule - merge]"
@echo "[MERGE]"
else
@echo "[MERGE BIN]"
ifneq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
merge: $(MERGE_ELF) $(MERGE_BIN)
@echo "[Rule - merge]"
else
@echo "[MERGE BIN]"
merge: $(MERGE_BIN)
@echo "[Rule - merge]"
endif
endif #----------------------------------------------------------------------------- ifeq ($(OS_TYPE),nos_mips)
dis: $(AP_DIS)
else
dis: $(AP_DIS) #$(MERGE_DIS)
endif #==================================================================================== HEAP_START=$$(cat HEAP_START.txt)
HEAP_END=$$(cat HEAP_END.txt)
HEAP_SIZE=$$((($(HEAP_END)-$(HEAP_START))/)) ifeq ($(OS_TYPE),nos_aeon)
HEAP_START_SYMBOL=___heap
HEAP_END_SYMBOL=___heap_end
HEAP_START_STRING= ___heap = .
HEAP_END_STRING= ___heap_end = (RAM_START + RAM_SIZE)
else
HEAP_START_SYMBOL=__heap
HEAP_END_SYMBOL=__heap_end
HEAP_START_STRING= __heap = .
HEAP_END_STRING= __heap_end = (RAM_START + RAM_SIZE)
endif #------------------------------------------------------------------------------------ sboot: $(AP_BIN)
@echo "[SBOOT START]"
# @grep '__heap =' $(BINPATH)/AP.map | sed 's\$(HEAP_START_STRING)\\g' | sed 's/^.*0x/0x/g'>HEAP_START.txt;
# @grep '__heap_end =' $(BINPATH)/AP.map | sed 's\$(HEAP_END_STRING)\\g' | sed 's/^.*0x/0x/g'>HEAP_END.txt;
@grep '$(HEAP_START_SYMBOL) =' $(BINPATH)/AP.map | sed 's\$(HEAP_START_STRING)\\g' | sed 's/^.*0x/0x/g'>HEAP_START.txt;
@grep '$(HEAP_END_SYMBOL) =' $(BINPATH)/AP.map | sed 's\$(HEAP_END_STRING)\\g' | sed 's/^.*0x/0x/g'>HEAP_END.txt;
@echo "HEAP_START= $(HEAP_START)"
@echo "HEAP_END = $(HEAP_END)"
@echo "$(HEAP_SIZE)">HEAP_SIZE.txt
# @rm HEAP_START.txt
# @rm HEAP_END.txt
# @echo "HEAP_SIZE = $(HEAP_SIZE)KB"
@awk '{if($$1>=100) {print "HEAP_SIZE = "$$1" KB";rm "HEAP_SIZE.txt";}else {print "Error:HEAP_SIZE("$$1"KB) is less than 100 KB";exit 1}}' HEAP_SIZE.txt
@echo "[SBOOT] $@"
ifeq ($(BIN_FORMAT),COMPRESS)
# @$(shell $(LZSSDIR)/lzss.out C $(BINPATH)/$(AP_NAME).bin $(BINPATH)/$(AP_COMPRESS_NAME).bin;)
@$(shell $(MSCOMPDIR)/mscompress -c -u - $(BINPATH)/$(AP_NAME).bin > $(BINPATH)/$(AP_COMPRESS_NAME).bin;)
@$(shell cp $(BINPATH)/$(AP_COMPRESS_NAME).bin $(ROOT)/boot/sboot/bin/$(AP_NAME).bin; cp $(BINPATH)/$(AP_NAME).map $(ROOT)/boot/sboot/bin;)
else
ifeq ($(BIN_FORMAT),COMPRESS7)
@$(shell $(MSCOMPDIR)/mscompress7 e $(BINPATH)/$(AP_NAME).bin $(BINPATH)/$(AP_COMPRESS_NAME).bin;)
@$(shell cp $(BINPATH)/$(AP_COMPRESS_NAME).bin $(ROOT)/boot/sboot/bin/$(AP_NAME).bin; cp $(BINPATH)/$(AP_NAME).map $(ROOT)/boot/sboot/bin;)
else
@$(shell cp $(BINPATH)/$(AP_NAME).bin $(ROOT)/boot/sboot/bin; cp $(BINPATH)/$(AP_NAME).map $(ROOT)/boot/sboot/bin;)
endif
endif
@(cd $(ROOT)/boot/sboot; $(MAKE) clean;)
@( mkdir -p $(ROOT)/boot/sboot/out;) cp $(ROOT)/boot/sboot/bin/$(BOARD_TYPE_SEL)/$(BD_SBOOT_FILE_NAME) $(ROOT)/boot/sboot/out/sboot.bin; ifeq ($(SECURE_BOOT),)
@(cp $(ROOT)/boot/sboot/bin/$(BOARD_TYPE_SEL)/sboot_secure.bin $(ROOT)/boot/sboot/out/sboot.bin;)
endif # Copy PM.bin to sboot/out
ifeq ($(OS_TYPE),nos_aeon)
@(/bin/cp -f $(ROOT)/boot/sboot/bin/$(BOARD_TYPE_SEL)/PM.bin $(ROOT)/boot/sboot/out;)
else ifeq ($(CHIP_FAMILY),MILAN)
@(/bin/cp -f $(ROOT)/boot/sboot/bin/$(BOARD_TYPE_SEL)/PM.bin $(ROOT)/boot/sboot/out;)
else
@(/bin/cp -f $(ROOT)/boot/sboot/bin/PM/$(CHIP_FAMILY)/PM.bin $(ROOT)/boot/sboot/out;)
endif #ifeq ($(CHIP_FAMILY),EULER)
# @(/bin/cp -f $(ROOT)/boot/sboot/bin/$(BOARD_TYPE_SEL)/PM.bin $(ROOT)/boot/sboot/out;)
#else ifeq ($(CHIP_FAMILY),EDEN)
# @(/bin/cp -f $(ROOT)/boot/sboot/bin/$(BOARD_TYPE_SEL)/PM.bin $(ROOT)/boot/sboot/out;)
#else ifeq ($(CHIP_FAMILY),NASA)
# @(/bin/cp -f $(ROOT)/boot/sboot/bin/$(BOARD_TYPE_SEL)/PM.bin $(ROOT)/boot/sboot/out;)
#else
# @(/bin/cp -f $(ROOT)/boot/sboot/bin/PM/$(CHIP_FAMILY)/PM.bin $(ROOT)/boot/sboot/out;)
#endif
########################################################################################
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
$(MAKE) -C $(ROOT)/boot/sboot _FLASH_CHUNK_BASE_ADDRESS=$(BL_SIZE)
else
$(MAKE) -C $(ROOT)/boot/sboot
endif
@echo "[SBOOT - End]" #=================================================================================================== ifeq ($(OS_TYPE),nos_mips)
$(AP_ELF) : $(OBJ_S) $(OBJ_C) $(OBJ_B) $(PRANA_LIB) $(DTV_LIB)
@echo "[Rule - AP_ELF]"
@echo "[LD] $@"
@echo "[LD] $(LD_LIB)"
@$(CC) $(LD_OPTS) -o $(AP_ELF) $(OBJ_C) -Wl,--start-group $(BSP_LIB) $(DTV_LIB) $(PRANA_LIB) -Wl,--end-group $(LD_LIB)
#@$(AR) -r $(ROOT)/core/api/msAPI_Flash.a $(OBJPATH)/core/api/msAPI_Flash.o else ifeq ($(R2_BACKTRACE),)
$(AP_ELF).tmp : $(OBJ_S) $(OBJ_C) $(OBJ_B) $(DTV_LIB)
@echo "[Rule - AP_ELF.tmp]"
@$(CC) $(LD_OPTS) -Wl,--start-group $^ -Wl,--end-group -T$(LOADER) -o $@ $(LDLIB) $(AP_BT_SYM): $(AP_ELF).tmp
@echo "[Rule - AP_BT_SYM]"
#$(CC) -v &> gcc_version.txt
$(NM) -n $< | $(BT_TOOL_TEXT_SYNS) $(TOOL_CHAIN) SYM_OFF > $@
#echo "rm $<"
#@rm $<
#@rm gcc_version.txt $(AP_BT_OBJ): $(AP_BT_SYM)
@echo "[Rule - AP_BT_OBJ]"
@$(CC) $(CC_OPTS0) -nostdlib -o $@ $< -T$(LOADER) else $(AP_BT_OBJ): endif $(AP_ELF) : $(OBJ_S) $(OBJ_C) $(OBJ_B) $(DTV_LIB) $(AP_BT_OBJ)
@echo "[Rule - AP_ELF]"
@echo "[LD] $@"
@$(CC) $(LD_OPTS) -Wl,-Map,$(AP_MAP) -Wl,--start-group $^ -Wl,--end-group -T$(LOADER) -o $@ $(LDLIB)
#$(NM) -a -S --size-sort $@ > $(BINPATH)/ap_sym__sort_by_size.txt
#sort $(BINPATH)/ap_sym__sort_by_size.txt > $(BINPATH)/ap_sym__sort_by_addr.txt
#@$(AR) -r $(ROOT)/core/api/msAPI_Flash.a $(OBJPATH)/core/api/msAPI_Flash.o
endif
@$(SIZE) $@ #===================================================================================================== debug_info:
@echo "[Rule - debug_info]"
$(NM) -a -S --size-sort $(AP_ELF) > $(BINPATH)/ap_sym__sort_by_size.txt
sort $(BINPATH)/ap_sym__sort_by_size.txt > $(BINPATH)/ap_sym__sort_by_addr.txt
$(READELF) -a $(AP_ELF) > $(BINPATH)/AP_elf.txt #===================================================================================================== $(AP_BIN) : $(AP_ELF)
@echo "[BIN] $@"
@$(OBJCOPY) -O binary -S -g -x -X -R .sbss -R .bss -R .reginfo $< $@ #================================================================================================= ifeq ($(AEON_TYPE),aeonR2)
$(AP_OBJ): $(AP_BIN)
ifeq ($(BIN_FORMAT),COMPRESS)
# $(shell $(LZSSDIR)/lzss.out C $(BINPATH)/AP.bin $(BINPATH)/AP_C.bin; cd $(BINPATH); $(OBJCOPY) -I binary -O elf32-littleaeon -B aeon:aeonR2 --prefix-sections=bin AP_C.bin ../$(OBJPATH)/AP.o)
$(shell $(MSCOMPDIR)/mscompress -c -u - $(BINPATH)/$(AP_NAME).bin > $(BINPATH)/$(AP_COMPRESS_NAME).bin; cd $(BINPATH); $(OBJCOPY) -I binary -O elf32-littleaeon -B aeon:aeonR2 --prefix-sections=bin AP_C.bin ../$(OBJPATH)/AP.o)
else
$(shell cd $(BINPATH); $(OBJCOPY) -I binary -O elf32-littleaeon -B aeon:aeonR2 --prefix-sections=bin AP.bin ../$(OBJPATH)/AP.o)
endif
else
$(AP_OBJ): $(AP_BIN)
ifeq ($(BIN_FORMAT),COMPRESS)
$(shell $(LZSSDIR)/lzss.out C $(BINPATH)/AP.bin $(BINPATH)/AP_C.bin; cd $(BINPATH); $(OBJCOPY) -I binary -O elf32-littleaeon -B aeon --prefix-sections=bin AP_C.bin ../$(OBJPATH)/AP.o)
else
$(shell cd $(BINPATH); $(OBJCOPY) -I binary -O elf32-littleaeon -B aeon --prefix-sections=bin AP.bin ../$(OBJPATH)/AP.o)
endif
endif #================================================================================================= ifneq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
$(MERGE_ELF): $(BL_OBJ_S) $(BL_OBJ_C) $(BL_OBJ_B) $(AP_OBJ)
@echo "[LD] $@"
@$(CC) $(LD_OPTS) -Wl,-Map,$(MERGE_MAP) $^ -T$(BOOTLOADER) -o $@ $(LDLIB)
@$(SIZE) $@
endif #================================================================================================= BinIDPackCRC = python scripts/AddCRC32.py SECURE :
ifeq ($(SECURE_BOOT),)
ifneq ($(BUILD_TARGET),BLOADER_SYSTEM)
@echo "[SECURE]"
@$(shell test/cutter $(BINDIR)/MERGE.bin $(BINDIR)/AP_C.bin secure/tmp_chunk > /dev/null;)
@$(BinIDPackCRC) $(BINDIR)/MERGE.bin
endif
endif #================================================================================================= ifeq ($(OS_TYPE),nos_mips)
$(MERGE_BIN) : $(AP_BIN)
@echo "[Rule - MERGE_BIN] => $@"
@echo "[BIN] $@"
@echo "AP_PACK__FILE_ALIGN=$(AP_PACK__FILE_ALIGN)"
@echo "BLOADER_PACK__FILE_ALIGN=$(BLOADER_PACK__FILE_ALIGN)"
$(shell cp $(ROOT)/boot/sboot/out/all.bin $(MERGE_BIN);)
ifeq ($(BIN_FORMAT),COMPRESS)
ifeq ($(BUILD_TARGET),BLOADER_SYSTEM)
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(BLOADER_PACK__BIN_ALIGN) $(BLOADER_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(APC_BIN) $(OS_TYPE)
else
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
@cat $(BINPATH)_BLOADER/MERGE.bin $(ROOT)/boot/sboot/out/chunk_header.bin $(APC_BIN) > $@
@ls -lh $(BINPATH)_BLOADER/MERGE.bin $(BINPATH)/$(AP_COMPRESS_NAME).bin $(MERGE_BIN)
endif
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(AP_PACK__BIN_ALIGN) $(AP_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(APC_BIN) $(OS_TYPE)
endif
else
ifeq ($(BIN_FORMAT),COMPRESS7)
ifeq ($(BUILD_TARGET),BLOADER_SYSTEM)
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(BLOADER_PACK__BIN_ALIGN) $(BLOADER_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(APC_BIN) $(OS_TYPE)
else
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
@cat $(BINPATH)_BLOADER/MERGE.bin $(ROOT)/boot/sboot/out/chunk_header.bin $(APC_BIN) > $@
@ls -lh $(BINPATH)_BLOADER/MERGE.bin $(BINPATH)/$(AP_COMPRESS_NAME).bin $(MERGE_BIN)
endif
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(AP_PACK__BIN_ALIGN) $(AP_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(APC_BIN) $(OS_TYPE)
endif
else
ifeq ($(BUILD_TARGET),BLOADER_SYSTEM)
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(BLOADER_PACK__BIN_ALIGN) $(BLOADER_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(AP_BIN)
else
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
@cat $(BINPATH)_BLOADER/MERGE.bin $(ROOT)/boot/sboot/out/chunk_header.bin $(AP_BIN) > $@
@ls -lh $(BINPATH)_BLOADER/MERGE.bin $(AP_BIN) $(MERGE_BIN)
endif
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(AP_PACK__BIN_ALIGN) $(AP_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(AP_BIN)
endif
endif
endif
# @scripts/cmac/cmac.exe $(MERGE_BIN) endif ifeq ($(OS_TYPE),nos_aeon)
$(MERGE_BIN) : $(AP_BIN)
@echo "[Rule - MERGE_BIN] => $@"
@echo "[BIN] $@"
$(shell cp $(ROOT)/boot/sboot/out/all.bin $(MERGE_BIN);)
ifeq ($(BIN_FORMAT),COMPRESS)
ifeq ($(BUILD_TARGET),BLOADER_SYSTEM)
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(BLOADER_PACK__BIN_ALIGN) $(BLOADER_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(APC_BIN) $(OS_TYPE)
else
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
@cat $(BINPATH)_BLOADER/MERGE.bin $(ROOT)/boot/sboot/out/chunk_header.bin $(APC_BIN) > $@
@ls -lh $(BINPATH)_BLOADER/MERGE.bin $(BINPATH)/$(AP_COMPRESS_NAME).bin $(MERGE_BIN)
endif
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(AP_PACK__BIN_ALIGN) $(AP_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(APC_BIN) $(OS_TYPE)
endif
else
ifeq ($(BIN_FORMAT),COMPRESS7)
ifeq ($(BUILD_TARGET),BLOADER_SYSTEM)
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(BLOADER_PACK__BIN_ALIGN) $(BLOADER_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(APC_BIN) $(OS_TYPE)
else
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
@cat $(BINPATH)_BLOADER/MERGE.bin $(ROOT)/boot/sboot/out/chunk_header.bin $(APC_BIN) > $@
@ls -lh $(BINPATH)_BLOADER/MERGE.bin $(BINPATH)/$(AP_COMPRESS_NAME).bin $(MERGE_BIN)
endif
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(AP_PACK__BIN_ALIGN) $(AP_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(APC_BIN) $(OS_TYPE)
endif
else
ifeq ($(BUILD_TARGET),BLOADER_SYSTEM)
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(BLOADER_PACK__BIN_ALIGN) $(BLOADER_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(AP_BIN)
else
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
@cat $(BINPATH)_BLOADER/MERGE.bin $(ROOT)/boot/sboot/out/chunk_header.bin $(AP_BIN) > $@
@ls -lh $(BINPATH)_BLOADER/MERGE.bin $(AP_BIN) $(MERGE_BIN)
endif
$(BinIDPackFiles) -BIGENDIAN -CRC16ENABLE -multiflash $(AP_PACK__BIN_ALIGN) $(AP_PACK__FILE_ALIGN) $@ $(BIN_INFO) $(IMGINFO_OFFSET) $(AP_BIN) $(OS_TYPE)
endif
endif
endif
endif #================================================================================================= $(RES_BIN) : $(AP_ELF)
@echo "[BIN] $@"
$(BinIDPackResources) -BIGENDIAN -CRC16ENABLE $< $@ $(BIN_INFO)
@cp core/bin/s7/audio/out_dvb_t3_d.bin $(BINPATH)/au_d.bin
@cp core/bin/s7/audio/out_dvb_t3_s.bin $(BINPATH)/au_s.bin
cp tv-ap/dvb/ui2/logo/Mstar_OSD_Logo_683x384.jpg $(BINPATH)/boot0.jpg
cp tv-ap/dvb/ui2/logo/mp3.mp3 $(BINPATH)/boot0.mp3
@./generate_pnl_bin.sh $(BINPATH)/AP.elf $(BINPATH) #================================================================================================= $(OBJ_B) $(BL_OBJ_B): $(OBJPATH)/%.o : %.bin
@echo "[BIN] $@"
@$(shell cd $(dir $<); $(OBJCOPY) -I binary -O elf32-littleaeon -B aeon --prefix-sections=bin $(notdir $<) $(abspath $@)) #================================================================================================= $(OBJPATH)/%.o: %.S
$(call make-depend-compile,$<,$@,$(subst .o,.d,$@)) #================================================================================================= $(OBJPATH)/%.o: %.c
$(call make-depend-compile,$<,$@,$(subst .o,.d,$@)) #================================================================================================= $(OBJPATH)/%.o: %.bin
@echo "[BIN] $@"
@$(shell cd $(dir $<); $(OBJCOPY) -I binary -O elf32-littleaeon -B aeon --prefix-sections=bin $(notdir $<) $(abspath $@)) #=================================================================================================
.c.ln: ; @echo "[lint]" ; lint -abhi $*.c
.elf.dis: ; @echo "[Rule - .elf.dis] $@" ; $(OBJDUMP) -d -h -S $< > $@
.elf.sym: ; @echo "[SYM] $@" ; $(NM) -a -S --size-sort $< > $@
.elf.siz: ; @echo "[SIZ] $@" ; $(SIZE) $< > $ #================================================================================================= ap_dis:
@echo "[Rule - ap_dis] $(AP_DIS)"
rm -rf $(AP_DIS)
$(OBJDUMP) -d -h -s $(AP_ELF) > $(BINPATH)/ap_dis-dhs.txt #================================================================================================= LINT_INC=$(subst -I,,$(INC_DIR))
LINT_SRC_C=$(SRC_C)
LINT_DEF=$(subst -D,-d,$(filter -D%,$(CC_OPTS))) lint:
ifneq ($(DISABLE_LINT),)
@(\
echo "scripts/co-gnu3.lnt"; \
echo $(LINT_OPT1); \
echo | $(CPP) -dM | \
sed -e '/LONG_LONG/d' | \
sed -e 's/#define \([^ ]*\) "\(..*\)"/-d"\1=(\2)"/' | \
sed -e 's/#define \([^ ]*\) \(..*\)/-d"\1=\2"/' | \
sed -e 's/#define /-d/'; \
for i in $(LINT_DEF); do \
echo $$i; \
done; \
for i in $(LINT_INC); do \
echo -i\"$$i\"; \
done; \
for i in `$(REALPATH) \`echo | $(CPP) -x c -Wp,-v >& | grep '^ '\``; do \
echo -i\"$$i\"; \
done; \
for i in $(LINT_SRC_C); do \
echo $$i; \
done; \
) > $(BINPATH)/$(PROJ).lnt
@$(FLINT) -fff $(BINPATH)/$(PROJ).lnt > $(BINPATH)/LINT.txt; \
grep -v 'Module:' $(BINPATH)/LINT.txt | grep -v '^$$' ; true
@echo
@echo `grep 'Error' $(BINPATH)/LINT.txt | wc -l` LINT Errors
endif #=================================================================================================
.PHONY: $(OBJPATH)/tv-ap/dvb/ui/MApp_ZUI_ACTmenufunc.o ifeq ($(OS_TYPE),nos_aeon)
loader:
@echo "[LOADER]"
#@$(AR) -r $(ROOT)/core/api/msAPI_Flash.a $(OBJPATH)/core/api/msAPI_Flash.o
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
@$(MAKE) PROJ=$(PROJ)_BLOADER
endif
endif
ifeq ($(OS_TYPE),nos_mips)
loader:
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
@echo "=================== [Rule - LOADER] =================="
$(MAKE) PROJ=$(PROJ)_BLOADER
@echo "=================== [Rule - LOADER] End =================="
endif
endif #=================================================================================================
# Project Setup
ifeq ($(OS_TYPE),nos_mips)
setup:
@echo "[Rule - setup] PROJ_$(PROJ)"
@mkdir -p $(OBJDIR) $(BINDIR);
@rm -f $(call src-to-obj,$(REBUILD_FILES))
@cp -f $(ROOT)/project/loader/nos_mips.ld $(LOADER); chmod $(LOADER)
@$(AWK) '{if ($$2=="BEON_MEM_ADR") print $$3;}' $(MMAP) > $(ROOT)/project/mmap/mips_mem_adr
@$(AWK) 'BEGIN { \
getline < "$(ROOT)/project/mmap/mips_mem_adr"; \
ADR = $$ \
} \
{ \
if ($$=="RAM_START") gsub($$, "("ADR"+0x80000000);", $$); \
if ($$=="ORIGIN") gsub($$, "("ADR"+0x80000000+0x180)", $$); \
if ($$==".prog_img_info") gsub($$, "("ADR"+0x80000000+0x1100)", $$); \
if ($$==".img_info") gsub($$, "("ADR"+0x80000000+0x2000)", $$); \
if ($$==".isp_info") gsub($$, "("ADR"+0x80000000+0x3000)", $$); \
print > FILENAME ".tmp"; \
}' $(LOADER)
@mv -f $(LOADER).tmp $(LOADER)
@$(AWK) '{if ($$2=="BEON_MEM_LEN") print $$3;}' $(MMAP) > $(ROOT)/project/mmap/mips_mem_len
@$(AWK) 'BEGIN { \
getline < "$(ROOT)/project/mmap/mips_mem_len"; \
LEN = $$ \
} \
{ \
if ($$=="RAM_SIZE") gsub($$, "("LEN");", $$); \
if ($$=="LENGTH") gsub($$, ""LEN"", $$); \
print > FILENAME ".tmp"; \
}' $(LOADER)
@mv -f $(LOADER).tmp $(LOADER)
else
ifeq ($(OS_TYPE),nos_aeon)
setup:
@echo "[SETUP START] - PROJ_$(PROJ)"
@mkdir -p $(OBJDIR) $(BINDIR);
@rm -f $(call src-to-obj,$(REBUILD_FILES))
rm -f $(AP_ELF).tmp
rm -f $(AP_BT_SYM)
rm -f $(AP_BT_OBJ)
cp -f $(ROOT)/project/loader/target.ld $(LOADER); chmod $(LOADER)
@$(AWK) '{if ($$2=="BEON_MEM_ADR") print $$3;}' $(MMAP) > $(ROOT)/project/mmap/aeon_mem_adr
@$(AWK) 'BEGIN { \
getline < "$(ROOT)/project/mmap/aeon_mem_adr"; \
ADR = $$ \
} \
{ \
if ($$=="RAM_START") gsub($$, ""ADR";", $$); \
if ($$=="ram" && $$=="ORIGIN") gsub($$, ""ADR",", $$); \
if ($$==".prog_img_info") gsub($$, "("ADR"+0x1100)", $$); \
if ($$==".img_info") gsub($$, "("ADR"+0x2000)", $$); \
if ($$==".isp_info") gsub($$, "("ADR"+0x3000)", $$); \
if ($$==".vectors") gsub($$, "("ADR")", $$); \
print > FILENAME ".tmp"; \
}' $(LOADER)
@mv -f $(LOADER).tmp $(LOADER)
@$(AWK) '{if ($$2=="BEON_MEM_LEN") print $$3;}' $(MMAP) > $(ROOT)/project/mmap/aeon_mem_len
@$(AWK) 'BEGIN { \
getline < "$(ROOT)/project/mmap/aeon_mem_len"; \
LEN = $$\
} \
{ \
if ($$=="RAM_SIZE") gsub($$, ""LEN";", $$); \
if ($$=="ram" && $$=="LENGTH") gsub($$, ""LEN"", $$); \
print > FILENAME ".tmp"; \
}' $(LOADER)
@mv -f $(LOADER).tmp $(LOADER)
@echo "[SETUP END]"
else
setup:
@mkdir -p $(OBJDIR) $(BINDIR);
@rm -f $(call src-to-obj,$(REBUILD_FILES))
@$(AWK) '{if ($$1==".prog_img_info") print "#define IMG_INFO_OFFSET " $$2"+0x10000"}' \
$(ROOT)/project/loader/target.ld > $(ROOT)/core/middleware/usbupgrade/include/mw_imginfo.h
endif
endif #================================================================================================= env:
@echo CC_OPTS = $(CC_OPTS)
@echo LD_OPTS = $(LD_OPTS)
@echo SRC = $(SRC) #================================================================================================= # Project API
DOCGEN :
# doxygen.exe $(ROOT)/project/Doxygen/Venus_3RD_PARTY_DDI_API.doxygen #=================================================================================================
# Project Clean
clean :
find $(OBJPATH) -name '*.o' -exec rm -f {} \;
rm -f $(BINPATH)/$(AP_NAME).* $(BINPATH)/$(MERGE_NAME).* ###$(BINPATH)/$(AP_NAME)_2.* $(BINPATH)/$(MERGE_NAME)_2.*
ifeq ($(BUILD_TARGET),MAIN_AP_SYSTEM)
@$(MAKE) PROJ=$(PROJ)_BLOADER clean
endif realclean:
rm -rf Bin_* Obj_* clean_obj:
rm -rf Obj_* #=================================================================================================
checkstack: $(AP_ELF)
ifeq ($(CROSSCOMPILE), aeon-)
$(OBJDUMP) -d $(AP_ELF) | scripts/checkstack.pl aeon
else
$(OBJDUMP) -d $(AP_ELF) | scripts/checkstack.pl mips
endif #================================================================================================= checkbinsize:
ifeq ($(CHECKBINSIZE),yes)
@echo "[Rule - checkbinsize]"
$(CHECK_BIN_DIR)/CheckBinSize_v05.sh $(CHECK_BIN_DIR)/$(CHECKBINSIZE_PARA)
else
@echo "[Rule - checkbinsize - skip]"
endif #=================================================================================================
# Project Dependence # $(call make-depend-compile,source-file,object-file,depend-file)
define make-depend-compile
@echo "[CC] $1"
@mkdir -p $(dir $)
@$(CC) -MM -MF $ -MP -MT $ $(CC_OPTS) $
@$(CC) $(CC_OPTS) -o $ -c $
endef src-to-obj = $(patsubst %.bin,$(OBJPATH)%.o,\
$(patsubst %.S,$(OBJPATH)/%.o,\
$(patsubst %.c,$(OBJPATH)/%.o,$))) -include $(OBJ_S:.o=.d) $(OBJ_C:.o=.d)
make 实例 一 3463的更多相关文章
- 最近学习工作流 推荐一个activiti 的教程文档
全文地址:http://www.mossle.com/docs/activiti/ Activiti 5.15 用户手册 Table of Contents 1. 简介 协议 下载 源码 必要的软件 ...
- 云计算管理平台之OpenStack启动虚拟机实例
在前边的博客中,我们主要聊了下openstack的基础环境.核心服务(认证服务keystone/镜像服务glance/计算服务nova/网络服务neutron)的安装配置:回顾请查看前边的博客:今天我 ...
- js-静态、原型、实例属性
本篇来说一下js中的属性: 1.静态属性 2.原型属性 3.实例属性 静态属性: function klass(){} var obj=new klass(); klass.count=0; klas ...
- ZIP压缩算法详细分析及解压实例解释
最近自己实现了一个ZIP压缩数据的解压程序,觉得有必要把ZIP压缩格式进行一下详细总结,数据压缩是一门通信原理和计算机科学都会涉及到的学科,在通信原理中,一般称为信源编码,在计算机科学里,一般称为数据 ...
- EntityFramework Core 1.1是如何创建DbContext实例的呢?
前言 上一篇我们简单讲述了在EF Core1.1中如何进行迁移,本文我们来讲讲EF Core1.1中那些不为人知的事,细抠细节,从我做起. 显式创建DbContext实例 通过带OnConfiguri ...
- redis集成到Springmvc中及使用实例
redis是现在主流的缓存工具了,因为使用简单.高效且对服务器要求较小,用于大数据量下的缓存 spring也提供了对redis的支持: org.springframework.data.redis.c ...
- 流程开发Activiti 与SpringMVC整合实例
流程(Activiti) 流程是完成一系列有序动作的概述.每一个节点动作的结果将对后面的具体操作步骤产生影响.信息化系统中流程的功能完全等同于纸上办公的层级审批,尤其在oa系统中各类电子流提现较为明显 ...
- UWP开发之Template10实践:本地文件与照相机文件操作的MVVM实例(图文付原代码)
前面[UWP开发之Mvvmlight实践五:SuspensionManager中断挂起以及复原处理]章节已经提到过Template10,为了认识MvvmLight的区别特做了此实例. 原代码地址:ht ...
- echarts+php+mysql 绘图实例
最近在学习php+mysql,因为之前画图表都是直接在echart的实例demo中修改数据,便想着两相结合练习一下,通过ajax调用后台数据画图表. 我使用的是echart3,相比较第二版,echar ...
随机推荐
- Spring Boot 笔记 (2) - 使用 log4j2 记日志
日志框架的选用 Spring 使用的默认日志框架是 logback, 默认情况下会采取默认的 autoconfiguration; 即便想对日志的一些配置进行修改也比较方便, 详细可以参考: Spri ...
- 【CMDB】高级配置
思路: 一份默认配置,一份用户自定义配置,将两者结合,自定义优先级大于默认配置 目录结构 ''' 用户自定义的配置文件,settings.py ''' USER = 'xiaoming' PASSWO ...
- 【转】高性能网络编程3----TCP消息的接收
这篇文章将试图说明应用程序如何接收网络上发送过来的TCP消息流,由于篇幅所限,暂时忽略ACK报文的回复和接收窗口的滑动. 为了快速掌握本文所要表达的思想,我们可以带着以下问题阅读: 1.应用程序调用r ...
- HTML&CSS基础-常用选择器
HTML&CSS基础-常用选择器 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.html源代码 <!DOCTYPE html> <html> & ...
- java操作redis(jedis)常用方法示例
说明:redis命令和jedis方法名基本是一一对应的 Redis常用命令1 连接操作命令 ● quit:关闭连接(connection) ● auth:简单密码认证 ● help cmd: 查看cm ...
- PAT-2019年冬季考试-乙级(题解)
很荣幸这次能够参加乙级考试,和大佬们同台竞技了一次,这篇博客,进行介绍这次2019冬季的乙级考试题解. 7-1 2019数列 (15分) 把 2019 各个数位上的数字 2.0.1.9 作为一个数列的 ...
- Java精通并发-同步方法访问标志与synchronized关键字之间的关系
继续基于上一次https://www.cnblogs.com/webor2006/p/11428811.html来研究synchronized关键字在字节码中的表现,在上一次文末提出了一个这样的问题: ...
- STM32移植USB驱动总结
https://blog.csdn.net/stm32_newlearner/article/details/88095944 stm32 移植usb驱动开发 单片机 STM32单片机和51单片机 ...
- HiveQL 数据装在与导出
一.向管理表中装载数据 1.向表中装载数据load 1)load语法 2)LOCAL 指的是操作系统的文件路径,否则默认为HDFS的文件路径 3)overwrite关键字 如果用户指定了overwr ...
- Error Codes Messages查找工具介绍
当我们通过各种手段获取到一个Windows错误码后,如何获取对应的错误消息呢?有两种方法:一是用编程的手段(FormatMessage):其二是用现成的工具.第一种方法一般在我们编码的时候有用,而更多 ...