|
1 # |
|
2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of the License "Symbian Foundation License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: iMaker User Data image configuration |
|
15 # |
|
16 |
|
17 |
|
18 |
|
19 ############################################################################### |
|
20 # _ _ ___ _ |
|
21 # | | | | \ /_\ |
|
22 # | |_| | |) / _ \ |
|
23 # \___/|___/_/ \_\ |
|
24 # |
|
25 |
|
26 USE_FILEDISK = 0 |
|
27 USE_SOSUDA = 0 |
|
28 USE_UDAFGEN = 0 |
|
29 |
|
30 UDA_TITLE = UDA |
|
31 UDA_DIR = $(WORKDIR)/uda |
|
32 UDA_NAME = $(NAME) |
|
33 UDA_PREFIX = $(UDA_DIR)/$(UDA_NAME) |
|
34 UDA_IDIR = |
|
35 UDA_HBY = |
|
36 UDA_OBY = |
|
37 UDA_OPT = $(BLDROM_OPT) -D_EABI=$(ARM_VERSION) |
|
38 UDA_MSTOBY = $(UDA_PREFIX)_uda_master.oby |
|
39 UDA_HEADER = |
|
40 UDA_INLINE = |
|
41 UDA_FOOTER = |
|
42 UDA_TIME = $(DAY)/$(MONTH)/$(YEAR) |
|
43 |
|
44 UDA_CPDIR = |
|
45 UDA_ZIP = |
|
46 UDA_DATADIR = $(UDA_DIR)/datadrive |
|
47 UDA_SISCONFFILE = $(UDA_PREFIX)_uda_sisconf.txt |
|
48 UDA_SISCONF =\ |
|
49 -d $(UDA_DRIVE): -c $(UDA_DATADIR) $(if $(SISINST_SISDIR),-s $(SISINST_SISDIR))\ |
|
50 -z $(SISINST_ZDIR) $(if $(SISINST_HALINI),-i $(SISINST_HALINI)) -w info |
|
51 |
|
52 UDA_VERSION = $(CORE_VERSION) |
|
53 UDA_SWVERFILE = "$(UDA_DATADIR)/Resource/Versions/User Content Package_UDA.txt" |
|
54 UDA_SWVERINFO = $(UDA_VERSION) |
|
55 UDA_EXCLFILE = $(UDA_DATADIR)/private/100059C9/excludelist.txt |
|
56 UDA_TOUCH = $(call iif,$(USE_SOSUDA),,$(YEAR)$(MONTH)$(DAY)000000) |
|
57 |
|
58 UDA_IMG = $(UDA_PREFIX).uda.img |
|
59 UDA_LOG = $(UDA_PREFIX).uda.log |
|
60 UDA_OUTOBY = $(UDA_PREFIX).uda.oby |
|
61 UDA_EMPTYIMG = $(UDA_PREFIX).udaempty.img |
|
62 |
|
63 UDA_PLUGINLOG = $(UDA_PREFIX)_uda_bldromplugin.log |
|
64 UDA_UDEBFILE = $(TRACE_UDEBFILE) |
|
65 |
|
66 UDA_DRIVE = C |
|
67 UDA_FATTYPE = fat16 |
|
68 UDA_FATSIZE = 20480 |
|
69 |
|
70 define UDA_EXCLADD |
|
71 * |
|
72 endef |
|
73 |
|
74 define UDA_EXCLRM |
|
75 endef |
|
76 |
|
77 #============================================================================== |
|
78 |
|
79 UDA_FDISKCONF = /mount 0 |
|
80 UDA_FDISKCMD =\ |
|
81 $(FILEDISK_TOOL) $(UDA_FDISKCONF) $(call peval,GetAbsFname($(call pquote,$(UDA_IMG)),1,1)) $(call peval,$$iVar[0] = GetFreeDrive()) |\ |
|
82 copy | $(UDA_DATADIR)/* | $(call peval,$$iVar[0])/ |\ |
|
83 cmd | $(FILEDISK_TOOL) /status $(call peval,$$iVar[0]) |\ |
|
84 sleep | 1 |\ |
|
85 cmd | $(FILEDISK_TOOL) /umount $(call peval,$$iVar[0]) |
|
86 |
|
87 UDA_WINIMGCMD = $(WINIMAGE_TOOL) $(call pathconv,$(UDA_IMG)) /i $(call pathconv,$(UDA_DATADIR)) /h /q |
|
88 |
|
89 UDA_CMD = $(call iif,$(USE_FILEDISK),$(UDA_FDISKCMD),$(UDA_WINIMGCMD)) |
|
90 UDA_EMPTYCMD = |
|
91 |
|
92 #============================================================================== |
|
93 |
|
94 define UDA_MSTOBYINFO |
|
95 $(BLDROM_HDRINFO) |
|
96 |
|
97 ROM_IMAGE 0 non-xip size=0x00000000 |
|
98 |
|
99 DATA_IMAGE 0 $(basename $(UDA_IMG)) size=$(call peval,$(UDA_FATSIZE) * 1024) $(UDA_FATTYPE) |
|
100 |
|
101 // UDA header |
|
102 // |
|
103 $(UDA_HDRINFO) |
|
104 |
|
105 DATA_IMAGE[0] { |
|
106 $(BLR.UDA.OBY) |
|
107 $(UDA_INLINE) |
|
108 $(UDA_FOOTERINFO) |
|
109 } |
|
110 endef |
|
111 |
|
112 define UDA_HDRINFO |
|
113 $(DEFINE) _IMAGE_WORKDIR $(UDA_DIR) |
|
114 $(call mac2cppdef,$(BLR.UDA.OPT)) |
|
115 $(BLR.UDA.HBY) |
|
116 $(UDA_HEADER) |
|
117 $(if $(filter u U,$(USE_VARIANTBLD)),$(VARIANT_HEADER)) |
|
118 endef |
|
119 |
|
120 define UDA_FOOTERINFO |
|
121 $(if $(UDA_TIME),time=$(UDA_TIME)) |
|
122 $(UDA_FOOTER) |
|
123 endef |
|
124 |
|
125 #============================================================================== |
|
126 |
|
127 CLEAN_UDAFILE =\ |
|
128 del | "$(UDA_MSTOBY)" "$(UDA_SISCONFFILE)" "$(UDA_SWVERFILE)" "$(UDA_EXCLFILE)" |
|
129 |
|
130 BUILD_UDAFILE =\ |
|
131 echo-q | Generating file(s) for UDA image creation |\ |
|
132 $(call iif,$(USE_SOSUDA),\ |
|
133 write | $(UDA_MSTOBY) | $(call def2str,$(UDA_MSTOBYINFO)) |\ |
|
134 write | $(UDA_SISCONFFILE) | $(call quote,$(UDA_SISCONF)) |)\ |
|
135 $(call iif,$(USE_UDAFGEN),\ |
|
136 $(if $(UDA_SWVERINFO),\ |
|
137 writeu | $(UDA_SWVERFILE) | $(UDA_SWVERINFO) |)\ |
|
138 $(if $(UDA_EXCLFILE),\ |
|
139 genexclst | $(UDA_EXCLFILE) | $(UDA_DATADIR) | $(UDA_DRIVE):/ |\ |
|
140 "$(subst $(\n)," ",$(UDA_EXCLADD))" | "$(subst $(\n)," ",$(UDA_EXCLRM))")\ |
|
141 ) |
|
142 |
|
143 |
|
144 ############################################################################### |
|
145 # UDA pre |
|
146 |
|
147 CLEAN_UDAPRE = $(if $(filter u U,$(USE_VARIANTBLD)),$(CLEAN_CUSTVARIANT),deldir | $(UDA_DATADIR)) | $(CLEAN_UDAFILE) |
|
148 |
|
149 BUILD_UDAPRE =\ |
|
150 echo-q | Preparing UDA image creation |\ |
|
151 $(if $(filter u U,$(USE_VARIANTBLD)),$(BUILD_CUSTVARIANT) |,\ |
|
152 mkdir | $(UDA_DATADIR) |\ |
|
153 $(if $(UDA_ZIP),\ |
|
154 $(eval __i_zip := $(foreach zip,$(UDA_ZIP),$(zip)$(if $(filter %.zip,$(call lcase,$(zip))),,/*.zip)))\ |
|
155 echo-q | Extracting `$(__i_zip)$' to `$(UDA_DATADIR)$' |\ |
|
156 unzip | $(__i_zip) | $(UDA_DATADIR) |)\ |
|
157 $(if $(UDA_CPDIR),\ |
|
158 copy | $(UDA_CPDIR)/* | $(UDA_DATADIR) |))\ |
|
159 mkcd | $(UDA_DIR) |\ |
|
160 $(BUILD_UDAFILE) |\ |
|
161 $(call iif,$(USE_FILEDISK),\ |
|
162 cmd | attrib -r -a -s -h $(call pathconv,$(UDA_DATADIR)) /s /d |)\ |
|
163 $(if $(UDA_TOUCH),\ |
|
164 finddir-r | $(UDA_DATADIR) | * | |\ |
|
165 find-ar | $(UDA_DATADIR) | * | |\ |
|
166 touch | __find__ | $(UDA_TOUCH)) |
|
167 |
|
168 #============================================================================== |
|
169 # UDA build |
|
170 |
|
171 BLR.UDA.IDIR = $(call dir2inc,$(UDA_IDIR) $(call iif,$(USE_FEATVAR),,$(FEATVAR_IDIR))) |
|
172 BLR.UDA.HBY = $(call includeiby,$(IMAGE_HBY) $(UDA_HBY)) |
|
173 BLR.UDA.OBY = $(call includeiby,$(UDA_OBY) $(if $(filter u U,$(USE_VARIANTBLD)),$(VARIANT_OBY))) |
|
174 BLR.UDA.OPT = $(UDA_OPT) -p -retainfolder -pfile=$(UDA_SISCONFFILE) -o$(UDA_NAME).dummy0.img $(BLDROPT) |
|
175 BLR.UDA.POST =\ |
|
176 move | $(UDA_OUTOBY).log | $(UDA_LOG) |
|
177 |
|
178 BLR.UDA.CLEAN = del | "$(UDA_EMPTYIMG)" "$(UDA_IMG)" |
|
179 BLR.UDA.BUILD =\ |
|
180 $(call iif,$(USE_SOSUDA),,\ |
|
181 echo-q | Creating $(UDA_TITLE) SOS image |\ |
|
182 $(if $(UDA_EMPTYCMD),\ |
|
183 cmd | $(UDA_EMPTYCMD) |\ |
|
184 move | $(UDA_EMPTYIMG) | $(UDA_IMG) |)\ |
|
185 cmd | $(UDA_CMD)) |
|
186 |
|
187 CLEAN_UDA = $(CLEAN_BLDROM) |
|
188 BUILD_UDA = $(BUILD_BLDROM) |
|
189 |
|
190 # UDA Empty |
|
191 # |
|
192 CLEAN_UDAEMPTY = del | $(UDA_EMPTYIMG) |
|
193 BUILD_UDAEMPTY =\ |
|
194 echo-q | Creating empty UDA FAT image |\ |
|
195 mkdir | $(UDA_DIR) |\ |
|
196 cmd | $(UDA_EMPTYCMD) |
|
197 |
|
198 #============================================================================== |
|
199 # UDA post |
|
200 |
|
201 #============================================================================== |
|
202 |
|
203 SOS.UDA.STEPS = $(call iif,$(SKIPPRE),,UDAPRE) UDA $(SOS.UDAEMPTY.STEPS) |
|
204 SOS.UDAEMPTY.STEPS = UDAEMPTY |
|
205 |
|
206 ALL.UDA.STEPS = $(SOS.UDA.STEPS) |
|
207 ALL.UDAEMPTY.STEPS = $(SOS.UDAEMPTY.STEPS) |
|
208 |
|
209 #============================================================================== |
|
210 |
|
211 .PHONY: uda uda-image uda-pre uda-empty uda-empty-image variantuda |
|
212 |
|
213 uda uda-%: IMAGE_TYPE = UDA |
|
214 |
|
215 uda : ;@$(call IMAKER,$$(ALL.UDA.STEPS)) |
|
216 uda-image: ;@$(call IMAKER,$$(SOS.UDA.STEPS)) |
|
217 uda-pre : ;@$(call IMAKER,UDAPRE) |
|
218 |
|
219 uda-empty: ;@$(call IMAKER,$$(ALL.UDAEMPTY.STEPS)) |
|
220 uda-empty-image: ;@$(call IMAKER,$$(SOS.UDAEMPTY.STEPS)) |
|
221 |
|
222 variantuda variantuda%: USE_CUSTVARIANTBLD = 1 |
|
223 variantuda variantuda%: USE_VARIANTBLD = u |
|
224 variantuda variantuda%: uda$(TARGETEXT) ; |
|
225 |
|
226 |
|
227 # END OF IMAKER_UDA.MK |