15 # |
15 # |
16 |
16 |
17 |
17 |
18 |
18 |
19 USE_FEATVAR = $(call select,$(word 1,$(getsbvrominc)),invalid,0,1) |
19 USE_FEATVAR = $(call select,$(word 1,$(getsbvrominc)),invalid,0,1) |
20 USE_FOTA = 0 |
|
21 USE_IMGCHK = 0 |
20 USE_IMGCHK = 0 |
22 USE_IINTPRSIS = 0 |
21 USE_NOROMHDR = 0 |
23 USE_IREADIMG = 0 |
22 USE_QTLOCLZTN = 0 |
24 USE_IROMBLD = 0 |
|
25 USE_OVERRIDE = 1 |
|
26 USE_ROFS = 1,2,3 |
23 USE_ROFS = 1,2,3 |
27 USE_ROFSFILE = $(call iif,$(USE_PAGING),1,0) |
24 USE_ROFSFILE = $(call iif,$(USE_PAGING),1,0) |
28 USE_ROMFILE = 1 |
25 USE_ROMFILE = 1 |
|
26 USE_SMR = 0 |
29 USE_SYMGEN = 0 |
27 USE_SYMGEN = 0 |
30 USE_UDEB = 0 |
28 USE_UDEB = 0 |
31 USE_VERGEN = 0 |
29 |
32 |
30 # Temporary |
33 $(foreach rofs,1 2 3 4 5 6,\ |
31 USE_BLRWORKDIR = 0 |
34 $(eval USE_ROFS$(rofs) = $$(if $$(findstring $(rofs),$$(filter-out :%,$$(subst :, :,$$(subst $$(,), ,$$(USE_ROFS))))),1,0))) |
|
35 |
32 |
36 #============================================================================== |
33 #============================================================================== |
37 |
34 |
38 TYPE = rnd |
35 TYPE = rnd |
39 |
36 |
40 BUILD_INFOMK = image_conf_buildinfo.mk |
37 MAJOR_VERSION = 001 |
41 BUILD_NAMEMK = image_conf_naming.mk |
38 MINOR_VERSION = 000 |
|
39 SW_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION) |
|
40 SW_TYPEINFO = $(call select,$(TYPE),rnd,RD) |
|
41 |
|
42 BUILD_INFOMK = $(call findfile,image_conf_buildinfo.mk,,1) |
|
43 BUILD_NAMEMK = $(call findfile,image_conf_naming.mk,,1) |
42 BUILD_YEAR = $(YEAR) |
44 BUILD_YEAR = $(YEAR) |
|
45 BUILD_MONTH = $(MONTH) |
43 BUILD_WEEK = $(WEEK) |
46 BUILD_WEEK = $(WEEK) |
44 BUILD_NUMBER = xx |
47 BUILD_DAY = $(DAY) |
|
48 BUILD_ID = 001 |
|
49 BUILD_NUMBER = 001 |
45 |
50 |
46 COREPLAT_NAME = |
51 COREPLAT_NAME = |
47 COREPLAT_DIR = $(CONFIGROOT)/$(COREPLAT_NAME) |
52 COREPLAT_DIR = $(CONFIGROOT)/$(COREPLAT_NAME) |
48 COREPLAT_VERSION = |
53 COREPLAT_VERSION = |
49 PLATFORM_NAME = $(subst .,,$(COREPLAT_VERSION)$(S60_VERSION)) |
54 PLATFORM_NAME = $(subst .,,$(COREPLAT_VERSION)$(S60_VERSION)) |
50 PLATFORM_DIR = $(CONFIGROOT)/$(PLATFORM_NAME) |
55 PLATFORM_DIR = $(CONFIGROOT)/$(PLATFORM_NAME) |
51 PRODUCT_MSTNAME = |
56 PRODUCT_MSTNAME = |
|
57 PRODUCT_MSTDIR = $(if $(PRODUCT_MSTNAME),$(PLATFORM_DIR)/$(PRODUCT_MSTNAME)) |
52 PRODUCT_NAME = |
58 PRODUCT_NAME = |
53 PRODUCT_MANUFACT = Nokia |
59 PRODUCT_MANUFACT = Nokia |
54 PRODUCT_MODEL = N00 |
60 PRODUCT_MODEL = N00 |
55 PRODUCT_TYPE = |
61 PRODUCT_TYPE = |
56 PRODUCT_REVISION = 01 |
62 PRODUCT_REVISION = 01 |
57 PRODUCT_DIR = $(PLATFORM_DIR)/$(if $(PRODUCT_MSTNAME),$(PRODUCT_MSTNAME)/)$(PRODUCT_NAME) |
63 PRODUCT_DIR = $(if $(PRODUCT_NAME),$(PLATFORM_DIR)/$(if $(PRODUCT_MSTNAME),$(PRODUCT_MSTNAME)/)$(PRODUCT_NAME)) |
58 |
64 |
59 FEATURE_VARIANT = $(PRODUCT_NAME) |
65 FEATURE_VARIANT = $(PRODUCT_NAME) |
60 FEATVAR_IDIR = $(call getrominc) |
66 FEATVAR_IDIR = $(call getrominc) |
61 |
67 FEATVAR_HRH = $(call findfile,feature_settings.hrh) |
62 LABEL = |
68 |
63 NAME = $(PRODUCT_NAME)$(LABEL) |
69 LABEL = |
64 WORKDIR = $(if $(PRODUCT_NAME),$(E32ROMBLD)/$(PRODUCT_NAME),$(CURDIR)) |
70 NAME = $(or $(PRODUCT_NAME),imaker)$(LABEL) |
65 WORKPREFIX = $(WORKDIR)/$(NAME) |
71 WORKDIR = $(if $(PRODUCT_NAME),$(E32ROMBLD)/$(PRODUCT_NAME),$(CURDIR)) |
66 WORKNAME = $(WORKPREFIX) |
72 |
67 |
73 IMAGE_TYPE = |
68 IMAGE_HBY = <data_caging_paths_for_iby.hrh> <Variant\Header.iby> |
74 IMAGE_ID = $(or $(subst CORE,1,$(subst ROFS,,$(filter CORE ROFS%,$(IMAGE_TYPE)))),\ |
69 IMAGE_TYPE = |
75 $(call lcase,$(call substr,1,1,$(filter EMMC MCARD UDA,$(IMAGE_TYPE))))) |
|
76 IMAGE_PREFIX = $($(IMAGE_TYPE)_PREFIX)_$(call lcase,$(IMAGE_TYPE)) |
|
77 IMAGE_HBY = <data_caging_paths_for_iby.hrh> <variant/header.iby> |
|
78 IMAGE_VERSDIR = RESOURCE_FILES_DIR\versions |
|
79 |
|
80 IMAGE_ORIDEFILES = |
|
81 IMAGE_ORIDECONF = |
70 |
82 |
71 TRACE_IDIR = $(addsuffix /traces,$(FEATVAR_IDIR)) |
83 TRACE_IDIR = $(addsuffix /traces,$(FEATVAR_IDIR)) |
72 TRACE_PREFIX = |
84 TRACE_PREFIX = |
73 TRACE_SUFFIX = _trace.txt |
85 TRACE_SUFFIX = _trace.txt |
74 TRACE_UDEBFILE = $(E32ROMBLD)/mytraces.txt |
86 TRACE_UDEBFILE = $(E32ROMBLD)/mytraces.txt |
75 |
87 |
76 OVERRIDE_CONF = OVERRIDE_REPLACE/WARN #OVERRIDE_REPLACE/ADD, OVERRIDE_REPLACE/SKIP, OVERRIDE_SKIP/ADD |
88 OVERRIDE_CONF = OVERRIDE_REPLACE/WARN #OVERRIDE_REPLACE/ADD, OVERRIDE_REPLACE/SKIP, OVERRIDE_SKIP/ADD |
77 |
89 |
78 GENIBY_FILEPAT = *.dll *.exe *.agt *.csy *.fsy *.tsy *.drv *.nif *.pgn *.prt |
90 #GENIBY_FILEPAT = *.dll *.exe *.agt *.csy *.fsy *.tsy *.drv *.nif *.pgn *.prt |
79 |
91 |
80 ARM_VERSION = ARMV5 |
92 ARM_VERSION = ARMV5 |
81 SOS_VERSION = #9.3, 9.4, 9.5 |
93 SOS_VERSION = #9.5 |
82 S60_VERSION = #3.2, 5.0 |
94 S60_VERSION = |
83 |
95 |
84 ROFS_MAXSIZE = 0x10000000 |
96 CPPFILE_FILTER = FF_WDP_\S+|SYMBIAN_\S+ |
85 |
97 CPPFILE_LIST = $(if $(FEATURE_VARIANT),$(FEATVAR_HRH)) |
86 CPPFILE_LIST = |
98 |
87 MKFILE_LIST = $(call findfile,$(BUILD_INFOMK) $(BUILD_NAMEMK) $(LANGPACK_SYSLANGMK),$(FEATVAR_IDIR)) | $(VARIANT_MK) |
99 TARGET_PRODUCT = |
88 |
100 TARGET_DEFAULT = all |
89 |
|
90 ############################################################################### |
|
91 # |
|
92 |
|
93 SOS.IMAGE.STEPS =\ |
|
94 $(filter-out %POST,$(SOS.CORE.STEPS) $(SOS.VARIANT.STEPS))\ |
|
95 $(filter %POST,$(SOS.CORE.STEPS) $(SOS.VARIANT.STEPS)) |
|
96 |
|
97 ALL.IMAGE.STEPS = $(SOS.IMAGE.STEPS) |
|
98 |
|
99 CLEAN_WORKAREA = del | $(WORKDIR)/* | deldir | $(WORKDIR)/* |
|
100 ALL.CLEAN.STEPS = $(ALL.IMAGE.STEPS) WORKAREA |
|
101 |
101 |
102 |
102 |
103 ############################################################################### |
103 ############################################################################### |
104 # Internal macros and definitions |
104 # Internal macros and definitions |
105 |
105 |
106 getrominc = $(if $(call true,$(USE_FEATVAR)),$(getsbvrominc),$(CONFIGROOT) $(E32ROM)) |
106 getrominc =\ |
|
107 $(if $(call true,$(USE_FEATVAR)),$(getsbvrominc),$(if $(word 5,$(__i_getrominc)),$(call restwords,5,$(__i_getrominc))\ |
|
108 ,$(PRODUCT_DIR) $(PRODUCT_MSTDIR) $(CONFIGROOT)) $(E32ROM) $(E32ROMINC) $(E32INC)/oem $(E32INC)) |
|
109 |
|
110 # ,$(PRODUCT_DIR) $(PRODUCT_MSTDIR) $(CONFIGROOT)) $(E32INC)/config $(E32ROM) $(E32ROMINC) $(E32INC)/internal $(E32INC)) |
107 |
111 |
108 getsbvrominc =\ |
112 getsbvrominc =\ |
109 $(if $(call equal,$(__i_featvar),$(FEATURE_VARIANT)),,$(eval __i_featvar := $(FEATURE_VARIANT))\ |
113 $(if $(and $(FEATURE_VARIANT),$(call equal,$(__i_featvar),$(FEATURE_VARIANT))),,$(eval __i_featvar := $(FEATURE_VARIANT))\ |
110 $(eval __i_getrominc := $(shell $(PERL) -x $(IMAKER_TOOL) --incdir $(__i_featvar))))$(__i_getrominc) |
114 $(eval __i_getrominc := $(if $(__i_featvar),$(shell $(PERL) -x $(IMAKER_TOOL) --incdir $(__i_featvar)),invalid)))$(__i_getrominc) |
111 |
115 |
112 includeiby = $(call peval,\ |
116 includeiby = $(if $(strip $1),$(call peval,\ |
113 my @files = ();\ |
117 my @files = ();\ |
114 while ($(call pquote,$1) =~ /(?:([1-6]):)?(?:<(.+?)>|"+(.+?)"+|(\S+))/g) {\ |
118 while ($(call pquote,$1) =~ /(?:([1-6]):)?(?:<(.+?)>|"+(.+?)"+|(\S+))/g) {\ |
115 my $$rom = (defined($$1) ? $$1 : q());\ |
119 my $$rom = (defined($$1) ? $$1 : q());\ |
116 push(@files, ($$rom ? q(ROM_IMAGE[).$$rom.q(] {\\\n) : q()) . q(\#include ).\ |
120 push(@files, ($$rom ? q(ROM_IMAGE[).$$rom.q(] {\n) : q()) . q(\#include ).\ |
117 (defined($$2) ? qq(<$$2>) : q(").GetRelFname(defined($$3) ? $$3 : $$4, $(call pquote,$2)).q(")) . ($$rom ? q(\\\n}) : q()))\ |
121 (defined($$2) ? qq(<$$2>) : q(").GetAbsFname(defined($$3) ? $$3 : $$4).q(")) . ($$rom ? q(\n}) : q()))\ |
118 }\ |
122 }\ |
119 return(join(q(\\\n), @files))) |
123 return(join(q(), map(q(\n) . $$_, @files))))) |
120 |
124 |
121 define BLDROM_HDRINFO |
125 define BLDROM_HDRINFO |
122 // Generated master oby for $($(IMAGE_TYPE)_TITLE) image creation |
126 // Generated master oby for $($1_TITLE) image creation |
123 // |
127 // |
124 // Filename: $($(IMAGE_TYPE)_MSTOBY) |
128 // Filename: $($1_MSTOBY) |
125 // Work dir: $(call peval,GetAbsDirname(q(.))) |
129 // Command : $(call BLDROM_CMD,$1) |
126 // Command : $(BLDROM_CMD) |
|
127 endef |
130 endef |
128 |
131 |
129 define BLDROM_PLUGINFO |
132 define BLDROM_PLUGINFO |
130 // Buildrom plugins |
133 /* Buildrom plugins |
131 // |
134 */ |
132 $(call iif,$(USE_OVERRIDE), |
135 externaltool=override:-i$1;-l$($1_PLUGINLOG)$(if $(filter debug 127,$(VERBOSE)),;-ddebug) |
133 externaltool=override:$($(IMAGE_TYPE)_PLUGINLOG);$(if $(filter debug 127,$(VERBOSE)),debug,0) |
136 $(OVERRIDE_CONF) |
134 $(OVERRIDE_CONF)) |
137 externaltool=obyparse:-i$1;-l$($1_PLUGINLOG);-w$($1_DIR)$(if $(filter debug 127,$(VERBOSE)),;-ddebug);-f$(FEATURE_VARIANT) |
135 externaltool=obyparse:$($(IMAGE_TYPE)_PLUGINLOG);$(if $(filter debug 127,$(VERBOSE)),debug,0) |
138 externaltool=stubsischeck:-i$1;-l$($1_PLUGINLOG)$(if $(filter debug 127,$(VERBOSE)),;-ddebug) |
136 $(call iif,$(call select,$(IMAGE_TYPE),CORE,$(USE_ROFS1)), |
139 $(call iif,$(if $(filter CORE,$1),$(USE_ROFS1)), |
137 $(call iif,$(USE_ROMFILE), |
140 $(call iif,$(USE_ROMFILE), |
138 OBYPARSE_ROM $(CORE_ROMFILE)) |
141 OBYPARSE_ROM $(CORE_ROMFILE)) |
139 $(call iif,$(USE_ROFSFILE), |
142 $(call iif,$(USE_ROFSFILE), |
140 OBYPARSE_ROFS1 $(CORE_ROFSFILE)) |
143 OBYPARSE_ROFS1 $(CORE_ROFSFILE)) |
141 ) |
144 ) |
142 $(call iif,$(USE_UDEB), |
145 $(call iif,$(USE_UDEB), |
143 OBYPARSE_UDEB $(call select,$(USE_UDEB),full,*,$($(IMAGE_TYPE)_UDEBFILE))) |
146 OBYPARSE_UDEB $(call select,$(USE_UDEB),full,*,$($1_UDEBFILE))) |
144 endef |
147 endef |
145 |
148 |
146 getgenfiles = $(if $1,\ |
149 getgenfiles = $(if $1,\ |
147 $(eval __i_cmd := $(filter geniby% write%,$(call lcase,$(call getelem,1,$1))))\ |
150 $(eval __i_cmd := $(filter geniby% write%,$(call lcase,$(call getelem,1,$1))))\ |
148 $(if $(__i_cmd),"$(call getelem,2,$1)")\ |
151 $(if $(__i_cmd),"$(call getelem,2,$1)")\ |
149 $(call getgenfiles,$(call restelems,$(if $(filter geniby%,$(__i_cmd)),7,$(if $(filter write%,$(__i_cmd)),4,2)),$1))) |
152 $(call getgenfiles,$(call restelems,$(if $(filter geniby%,$(__i_cmd)),7,$(if $(filter write%,$(__i_cmd)),4,2)),$1))) |
150 |
153 |
151 # TEMPORARY |
|
152 _buildoby = $(if $1,\ |
|
153 $(eval __i_elem1 := $(call getelem,1,$1))\ |
|
154 $(if $(filter geniby%,$(call lcase,$(__i_elem1))),$1,\ |
|
155 geniby | $(__i_elem1) | $(call getelem,2,$1) | $(call getelem,3,$1) | \#include "%3" | end |\ |
|
156 $(call _buildoby,$(call restelems,4,$1)))) |
|
157 # TEMPORARY |
|
158 |
|
159 #============================================================================== |
154 #============================================================================== |
160 |
155 |
161 BLDROM_CMD = $(BLDROM_TOOL) $(filter-out --D% -U%,$(BLR.$(IMAGE_TYPE).OPT)) $(BLR.$(IMAGE_TYPE).IDIR) $($(IMAGE_TYPE)_MSTOBY) |
156 BLDROM_CMD = $(BLDROM_TOOL)\ |
|
157 $(filter-out --D% -U% $(filter-out $(BLDROM_CMDDOPT),$(filter -D%,$(BLR.$1.OPT))),$(BLR.$1.OPT))\ |
|
158 $(BLR.$1.IDIR) $(subst \,/,$($1_MSTOBY)) |
|
159 |
|
160 BLDROM_CMDDOPT = -DFEATUREVARIANT=% -D_FULL_DEBUG -D_PLAT=% |
162 |
161 |
163 CLEAN_BLDROM =\ |
162 CLEAN_BLDROM =\ |
164 del | "$($(IMAGE_TYPE)_PREFIX).*" "$($(IMAGE_TYPE)_DIR)/tmp?.oby" "$($(IMAGE_TYPE)_DIR)/ecom*.s??" "$($(IMAGE_TYPE)_PLUGINLOG)" |\ |
163 del | $(foreach file,dir *.img *.inc *.log *.oby *.symbol,"$($1_PREFIX).$(file)")\ |
165 $(BLR.$(IMAGE_TYPE).CLEAN) |
164 $(foreach file,ecom*.s?? features.dat loglinux.oby logwin.oby tmp?.oby,"$($1_DIR)/$(file)")\ |
|
165 "$($1_PLUGINLOG)" |\ |
|
166 $(BLR.$1.CLEAN) |
166 |
167 |
167 BUILD_BLDROM =\ |
168 BUILD_BLDROM =\ |
168 $(if $(BLR.$(IMAGE_TYPE).BUILD),$(BLR.$(IMAGE_TYPE).BUILD),\ |
169 $(or $(BLR.$1.BUILD),\ |
169 echo-q | Creating $($(IMAGE_TYPE)_TITLE) SOS image |\ |
170 echo-q | Creating $($1_TITLE) SOS $(if $(filter -noimage,$(BLR.$1.OPT)),oby,image) |\ |
170 cd | $($(IMAGE_TYPE)_DIR) |\ |
171 $(call iif,$(USE_BLRWORKDIR),,cd | "$($1_DIR)" |)\ |
171 cmd | $(strip $(BLDROM_CMD)) | $(BLDROM_PARSE) |\ |
172 cmd | $(strip $(call BLDROM_CMD,$1)) | $(BLDROM_PARSE) |\ |
172 copy | tmp1.oby | $($(IMAGE_TYPE)_PREFIX).tmp1.oby |\ |
173 move | "$($1_DIR)/tmp1.oby" | $($1_PREFIX).tmp1.oby |\ |
173 $(call iif,$(KEEPTEMP),,del | "tmp?.oby" "$($(IMAGE_TYPE)_PREFIX).dummy*" |)\ |
174 $(call iif,$(KEEPTEMP),,del | "$($1_DIR)/tmp?.oby" "$($1_PREFIX).dummy*" |)\ |
174 $(BLR.$(IMAGE_TYPE).POST)) |
175 $(BLR.$1.POST)) |
175 |
176 |
176 CLEAN_MAKSYMROFS = del | $($(IMAGE_TYPE)_SYM) |
177 |
177 BUILD_MAKSYMROFS =\ |
178 ############################################################################### |
178 echo-q | Creating $($(IMAGE_TYPE)_TITLE) symbol file |\ |
179 # Steps |
179 cmd | $(MAKSYMROFS_TOOL) $(call pathconv,$($(IMAGE_TYPE)_LOG) $($(IMAGE_TYPE)_SYM)) |
180 |
|
181 IMAGE_STEPS = core $(VARIANT_STEPS) |
|
182 |
|
183 VARIANT_STEPS = $(call iif,$(USE_ROFS2),langpack_$(or $(TARGETID),01))\ |
|
184 $(foreach rofs,3 4 5 6,$(call iif,$(USE_ROFS$(rofs)),rofs$(rofs))) |
180 |
185 |
181 |
186 |
182 ############################################################################### |
187 ############################################################################### |
183 # Targets |
188 # Targets |
184 |
189 |
185 .PHONY:\ |
190 .PHONY: default all flash image variant #i2file variant-i2file |
186 all flash flash-all image image-all\ |
191 |
187 i2file |
192 default default-%:\ |
188 |
193 ;@$(call IMAKER,$$(if $$(PRODUCT_NAME),,$$(TARGET_PRODUCT)) $$(TARGET_DEFAULT)) |
189 all flash-all image-all: USE_SYMGEN = 1 |
194 |
190 all flash flash-all : ;@$(call IMAKER,$$(ALL.IMAGE.STEPS)) |
195 all : ;@$(call IMAKER,flash-all) |
191 |
196 image: ;@$(call IMAKER,flash-image) |
192 image image-all: ;@$(call IMAKER,$$(SOS.IMAGE.STEPS)) |
197 |
193 |
198 flash flash-% image-%: ;@$(call IMAKER,$$(IMAGE_STEPS)) |
194 i2file: ;@$(call IMAKER,$(call ucase,$@)) |
199 |
|
200 variant variant_% variant-%: ;@$(call IMAKER,$$(VARIANT_STEPS)) |
|
201 |
|
202 #i2file : ;@$(call IMAKER,$(call ucase,$@)) |
|
203 #variant-i2file: ;@$(call IMAKER,VARIANTI2F) |
195 |
204 |
196 #============================================================================== |
205 #============================================================================== |
197 |
206 |
198 include $(addprefix $(IMAKER_DIR)/imaker_,$(addsuffix .mk,core odp rofs2 rofs3 rofs4 uda variant)) |
207 $(call includechk,$(addprefix $(IMAKER_DIR)/imaker_,fat.mk odp.mk rofs.mk smr.mk core.mk variant.mk)) |
199 |
208 |
200 |
209 |
201 # END OF IMAKER_IMAGE.MK |
210 # END OF IMAKER_IMAGE.MK |