|
1 # Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 # All rights reserved. |
|
3 # This component and the accompanying materials are made available |
|
4 # under the terms of "Eclipse Public License v1.0" |
|
5 # which accompanies this distribution, and is available |
|
6 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 # |
|
8 # Initial Contributors: |
|
9 # Nokia Corporation - initial contribution. |
|
10 # |
|
11 # Contributors: |
|
12 # |
|
13 # Description: |
|
14 # mmrombuild.pl |
|
15 # |
|
16 # |
|
17 |
|
18 use strict; |
|
19 use warnings; |
|
20 use Env qw(EPOCROOT); |
|
21 use File::Copy; |
|
22 |
|
23 # literals |
|
24 my $auto_param = "-a"; |
|
25 my $dp_param = "-d"; |
|
26 my $wdp_param = "-w"; |
|
27 my $all_param = "-f"; |
|
28 my $help_param = "-h"; |
|
29 my $icl_param = "-i"; |
|
30 my $plus_icl_param = "+i"; |
|
31 my $keep_param = "-k"; |
|
32 my $mmf_param = "-m"; |
|
33 my $nand_param = "-n"; |
|
34 my $addnl_param = "-p"; |
|
35 my $test_param = "-t"; |
|
36 my $extra_param = "-x"; |
|
37 my $gce_param = "-g"; |
|
38 my $eabi_param = "-eabi"; |
|
39 my $h2_param = "-h2"; |
|
40 my $h4_param = "-h4"; |
|
41 my $h6_param = "-h6"; |
|
42 my $lab_param = "-lab"; |
|
43 my $lbk_param = "-lbk"; |
|
44 my $x86_param = "-x86pc"; |
|
45 my $ne_param = "-ne"; |
|
46 my $smp_param = "-smp"; |
|
47 my $uni_param = "-uni"; |
|
48 |
|
49 my $KRomDir = "epoc32\\rom"; |
|
50 my $KLubbockImg = "la_001.techview.IMG"; |
|
51 my $KH2Img = "om_001.techview.IMG"; |
|
52 my $KH4Img = "h4hrp_001.techview.IMG"; |
|
53 my $KH4RofsImg = "h4hrp_001.techview.rofs.IMG"; |
|
54 my $KH6Img = "34xx_sdp_001.techview.IMG"; |
|
55 my $KH6NandImg = "34xx_sdp_001.techview.nand.IMG"; |
|
56 my $KH6NandRofsImg = "34xx_sdp_001.techview.nand.rofs.IMG"; |
|
57 my $KLabImg = "lab_001.techview.IMG"; |
|
58 my $KLabNandImg = "lab_001.techview.nand.IMG"; |
|
59 my $KLabNandRofsImg = "lab_001.techview.nand.rofs.IMG"; |
|
60 my $KH4NandImg = "h4hrp_001.techview.nand.img"; |
|
61 my $KH4NandRofsImg = "h4hrp_001.techview.nand.rofs.img"; |
|
62 my $KH6NandBootLoader = "h6.nandloader.reltest.img"; |
|
63 my $KLabNandBootLoader = "lab_001.nandloader.reltest.img"; |
|
64 my $KH4NandBootLoader = "h4.nandloader.reltest.img"; |
|
65 my $KMmcBootLoader = "h4.mmcloader.reltest.img"; |
|
66 my $CoreImg = "core.img"; |
|
67 my $Rofs1Img = "rofs1.img"; |
|
68 my $KBinName = 'sys$rom.bin'; # be careful about '$' |
|
69 my $KZipName = 'sys$rom.zip'; # be careful about '$' |
|
70 my $KX86Img = "x86pc_001.techview.IMG"; |
|
71 my $KNEImg = "NE1_TB_001.techview.IMG"; |
|
72 |
|
73 my $extras = ""; |
|
74 my $gce = ""; |
|
75 my $test = ""; |
|
76 my $component = ""; |
|
77 my $keep = ""; |
|
78 my $auto = ""; |
|
79 my $eabi = ""; |
|
80 my $addnl_ibys = ""; |
|
81 my $dp = ""; |
|
82 my $wdp = ""; |
|
83 my $nand = ""; |
|
84 my $img = ""; |
|
85 my $target = ""; # default target is h6 but start as blank so we can distinguish multiple target requests |
|
86 my $default_target = "h6"; |
|
87 my $arm = ""; |
|
88 my $smp = ""; |
|
89 my $uni = ""; |
|
90 my $wrong_ne_param = 0; |
|
91 my $include_icl_tests = ""; |
|
92 |
|
93 my $eka2IdentifyFile = "$ENV{EPOCROOT}epoc32\\release\\winscw\\udeb\\winsgui.dll"; # if file present, is EKA2 build |
|
94 my $PlatSecIdentifyFile = "$ENV{EPOCROOT}epoc32\\release\\armv5\\udeb\\mmfdevsoundproxy.dll"; # if file present, is a build with platsec |
|
95 my $StreamingCafIdentifyFile = "$ENV{EPOCROOT}epoc32\\release\\armv5\\udeb\\sraserver.exe"; |
|
96 |
|
97 my $OptionalFile = ""; |
|
98 # if any of these .iby files are present, then we'll add them to the ROM. |
|
99 my @OptionalFiles = ("$ENV{EPOCROOT}epoc32\\rom\\include\\XviDPU.iby", |
|
100 "$ENV{EPOCROOT}epoc32\\rom\\include\\XviDhw.iby", |
|
101 "$ENV{EPOCROOT}epoc32\\rom\\include\\oggvorbiscodec.iby", |
|
102 "$ENV{EPOCROOT}epoc32\\rom\\include\\omxoggvorbiscodec.iby", |
|
103 "$ENV{EPOCROOT}epoc32\\rom\\include\\pvopt.iby", |
|
104 "$ENV{EPOCROOT}epoc32\\rom\\include\\pvtestsopt.iby", |
|
105 "$ENV{EPOCROOT}epoc32\\rom\\include\\RtaUtils.iby", |
|
106 "$ENV{EPOCROOT}epoc32\\rom\\include\\TestExecute.iby", |
|
107 "$ENV{EPOCROOT}epoc32\\rom\\include\\streamingcaf.iby"); |
|
108 |
|
109 my $OggVorbisCodecPresent = 0; |
|
110 |
|
111 my $targetToolsDir = "..\\..\\..\\..\\..\\TargetTools\\Build"; |
|
112 my $targetToolsExists = 0; |
|
113 if (-d $targetToolsDir) |
|
114 { |
|
115 $targetToolsExists = 1; |
|
116 print "TargetTools directory exists: $targetToolsDir\n" |
|
117 } |
|
118 |
|
119 # main: |
|
120 { |
|
121 # Process command-line |
|
122 |
|
123 &ReadArgs(); |
|
124 |
|
125 &ProcessArgs(); |
|
126 |
|
127 &BuildRom(); |
|
128 } |
|
129 |
|
130 # |
|
131 # Subroutines |
|
132 # |
|
133 |
|
134 sub ReadArgs() |
|
135 { |
|
136 while (@ARGV) |
|
137 { |
|
138 my $param = $ARGV[0]; shift @ARGV; # grab first param and shift along |
|
139 |
|
140 if ($param eq "") # ignore blank parameters |
|
141 { |
|
142 next; |
|
143 } |
|
144 |
|
145 if ($param eq $icl_param || |
|
146 $param eq $mmf_param || $param eq $all_param) |
|
147 { |
|
148 $component = $param; |
|
149 } |
|
150 elsif ($param eq $plus_icl_param) |
|
151 { |
|
152 $include_icl_tests = $param; |
|
153 } |
|
154 elsif ($param eq $test_param) |
|
155 { |
|
156 $test = $param; |
|
157 } |
|
158 elsif ($param eq $extra_param) |
|
159 { |
|
160 $extras = $param; |
|
161 } |
|
162 elsif ($param eq $gce_param) |
|
163 { |
|
164 $gce = $param; |
|
165 } |
|
166 elsif ($param eq $auto_param) |
|
167 { |
|
168 $auto = $param; |
|
169 } |
|
170 elsif ($param eq $eabi_param) |
|
171 { |
|
172 $eabi = $param; |
|
173 } |
|
174 elsif ($param eq $dp_param) |
|
175 { |
|
176 $dp = $param; |
|
177 $nand = $param; # demand paging implies nand |
|
178 } |
|
179 elsif ($param eq $wdp_param) |
|
180 { |
|
181 $wdp = $param; |
|
182 $dp = $param; # writable data paging implies standard demand paging |
|
183 } |
|
184 elsif ($param eq $nand_param) |
|
185 { |
|
186 $nand = $param; |
|
187 } |
|
188 elsif ($param eq $addnl_param) |
|
189 { |
|
190 $addnl_ibys .= " " . $ARGV[0]; shift @ARGV; # grab next param and shift along |
|
191 } |
|
192 elsif ($param eq $h2_param) |
|
193 { |
|
194 &Usage() if ($target ne ""); |
|
195 $target = "h2"; |
|
196 $eabi = $eabi_param; # H2 always EABI |
|
197 } |
|
198 elsif ($param eq $h4_param) |
|
199 { |
|
200 &Usage() if ($target ne ""); |
|
201 $target = "h4"; |
|
202 $eabi = $eabi_param; # H4 always EABI |
|
203 } |
|
204 elsif ($param eq $h6_param) |
|
205 { |
|
206 &Usage() if ($target ne ""); |
|
207 $target = "h6"; |
|
208 $eabi = $eabi_param; # H6 always EABI |
|
209 } |
|
210 elsif ($param eq $lab_param) |
|
211 { |
|
212 &Usage() if ($target ne ""); |
|
213 $target = "lab"; |
|
214 $eabi = $eabi_param; # Lab always EABI |
|
215 } |
|
216 elsif ($param eq $lbk_param) |
|
217 { |
|
218 &Usage() if ($target ne ""); |
|
219 $target = "lbk"; |
|
220 } |
|
221 elsif ($param eq $x86_param) |
|
222 { |
|
223 &Usage() if ($target ne ""); |
|
224 &Usage() if (($eabi ne "") || ($nand ne "")); |
|
225 $target = "x86"; |
|
226 } |
|
227 elsif ($param eq $ne_param) |
|
228 { |
|
229 &Usage() if ($target ne ""); |
|
230 &Usage() if ($nand ne ""); |
|
231 $target = "naviengine"; |
|
232 $eabi = $eabi_param; # NaviEngine always EABI |
|
233 } |
|
234 elsif ($param eq $smp_param) |
|
235 { |
|
236 # Only NaviEngine can be configured to build SMP enabled image |
|
237 &Usage() if ($target ne "naviengine"); |
|
238 $smp = "smp"; |
|
239 } |
|
240 elsif ($param eq $uni_param) |
|
241 { |
|
242 # '-uni'-flag valid only for NaviEngine |
|
243 &Usage() if ($target ne "naviengine"); |
|
244 $uni = "uni"; |
|
245 } |
|
246 elsif ($param eq $help_param) |
|
247 { |
|
248 &Usage(); |
|
249 } |
|
250 else |
|
251 { |
|
252 # unknown setting |
|
253 &Usage(); |
|
254 } |
|
255 } |
|
256 &CheckArgs(); |
|
257 } |
|
258 |
|
259 sub CheckArgs() |
|
260 { |
|
261 # check that the arguments make sense |
|
262 |
|
263 $target = $default_target if ($target eq ""); |
|
264 |
|
265 } |
|
266 |
|
267 sub ProcessArgs() |
|
268 { |
|
269 if ($target eq "h2") |
|
270 { |
|
271 $img = $KH2Img; |
|
272 } |
|
273 elsif ($target eq "lkb") |
|
274 { |
|
275 $img = $KLubbockImg; |
|
276 } |
|
277 elsif ($target eq "h4") |
|
278 { |
|
279 $img = $KH4Img if ($nand eq ""); |
|
280 $img = $KH4NandImg if ($nand ne ""); |
|
281 } |
|
282 elsif ($target eq "h6") |
|
283 { |
|
284 $img = $KH6Img; |
|
285 } |
|
286 elsif ($target eq "lab") |
|
287 { |
|
288 $img = $KLabImg; |
|
289 } |
|
290 elsif ($target eq "x86") |
|
291 { |
|
292 $img = $KX86Img; |
|
293 } |
|
294 elsif ($target eq "naviengine") |
|
295 { |
|
296 $img = $KNEImg; |
|
297 } |
|
298 else |
|
299 { |
|
300 die "Internal error: unknown image type"; |
|
301 } |
|
302 if($target eq "naviengine" && $smp eq "" && $uni eq "" ) |
|
303 { |
|
304 $wrong_ne_param = 1; |
|
305 &Usage(); |
|
306 } |
|
307 if($target eq "h2" || $target eq "lkb" || $target eq "h4" || $target eq "naviengine" || $target eq "h6" || $target eq "lab") |
|
308 { |
|
309 # procedure to build arm target different so identify a ARM based target |
|
310 $arm ="arm"; |
|
311 } |
|
312 } |
|
313 |
|
314 sub BuildRom() |
|
315 { |
|
316 my $command; |
|
317 # note from build 4713 -D_STARTUPMODE5 is replaced with -D_SSMSTARTUPMODE=5. Don't mix |
|
318 if($target ne "naviengine") |
|
319 { |
|
320 $command = "tools\\buildrom -D__NOWATCHER__ -D_DEBUG -D_SSMSTARTUPMODE=5"; |
|
321 } |
|
322 else |
|
323 { |
|
324 #Currently startupmode flag is not used for NaviEngine. |
|
325 $command = "tools\\buildrom -D_DEBUG"; |
|
326 $command .= " -DSYMBIAN_MDASOUNDADAPTER_FORCE_STEREO"; |
|
327 } |
|
328 if($target ne "x86" && $target ne "naviengine") |
|
329 { |
|
330 $command .= " -D_SERIAL_DOWNLOAD"; |
|
331 } |
|
332 if($smp ne "") |
|
333 { |
|
334 $command .= " -DSMP"; |
|
335 } |
|
336 if($uni ne "") |
|
337 { |
|
338 #Use Flexible Memory Model for UniCore |
|
339 $command .= " -DWITH_FLEXIBLE_MM"; |
|
340 } |
|
341 |
|
342 $command .= " -D_NAND2" if ($nand ne "" && $arm ne ""); |
|
343 $command .= " -DUSE_24BPP_DISPLAY_VARIANT" if ($target eq "h6" || "lab"); |
|
344 if($wdp ne "") |
|
345 { |
|
346 $command .= " -DWITH_FLEXIBLE_MM -DUSE_SDIO_SD_MMC -D_INTERNAL_MMC -DUSE_DATA_PAGING" |
|
347 } |
|
348 $command .= " -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE" if ($gce ne ""); |
|
349 |
|
350 # Needed to prevent Xml.iby errors if these flags are added to techview.oby for example, then remove them here |
|
351 $command .= " -DSYMBIAN_EXCLUDE_LIBXML2 -DSYMBIAN_EXCLUDE_LIBXML2_SAX_CPARSER_PLUGIN -DSYMBIAN_EXCLUDE_LIBXML2_DOM_XPATH_API"; |
|
352 |
|
353 # select instruction set type, only applicable for ARM based platforms |
|
354 #The below flags are currently not used for NaviEngine |
|
355 if($arm ne "" && $target ne "naviengine") |
|
356 { |
|
357 if ($eabi ne "" || -f $eka2IdentifyFile) |
|
358 { |
|
359 $command .= " -DRVCT -D_EABI=ARMV5"; |
|
360 } |
|
361 else |
|
362 { |
|
363 $command .= " -D_THUMB"; |
|
364 } |
|
365 } |
|
366 |
|
367 # Use the default FeatureManager database, not yet supported for x86 |
|
368 if($arm ne "") |
|
369 { |
|
370 $command .= " -fm=$ENV{EPOCROOT}epoc32\\rom\\include\\featuredatabase.xml"; |
|
371 } |
|
372 else |
|
373 { |
|
374 $command .= ' -nofm'; #-fm option not supported as of 0708. |
|
375 } |
|
376 |
|
377 # select development board (now we build h4 by default) |
|
378 if ($target eq "lbk") |
|
379 { |
|
380 $command .= " lubbock"; |
|
381 } |
|
382 elsif ($target eq "h2") |
|
383 { |
|
384 $command .= " h2"; |
|
385 } |
|
386 elsif ($target eq "x86") |
|
387 { |
|
388 $command .= " x86pc"; |
|
389 } |
|
390 elsif ($target eq "naviengine") |
|
391 { |
|
392 $command .= " naviengine"; |
|
393 } |
|
394 elsif ($target eq "h6") |
|
395 { |
|
396 $command .= " pagedrom" if ($dp ne ""); |
|
397 $command .= " 34xx_sdp"; |
|
398 } |
|
399 elsif ($target eq "lab") |
|
400 { |
|
401 $command .= " pagedrom" if ($dp ne ""); |
|
402 $command .= " lab"; |
|
403 } |
|
404 elsif ($target eq "h4") |
|
405 { |
|
406 $command .= " pagedrom" if ($dp ne ""); |
|
407 $command .= " h4hrp"; |
|
408 } |
|
409 else |
|
410 { |
|
411 die "target does not exist!!" |
|
412 } |
|
413 |
|
414 # devkit.oby not included for NaviEngine currently |
|
415 if($target ne "naviengine") |
|
416 { |
|
417 $command .= " devkit"; |
|
418 } |
|
419 $command .= " techview"; |
|
420 |
|
421 $command .= " misc.iby"; |
|
422 |
|
423 # use platform security, if appropriate |
|
424 if (-f $PlatSecIdentifyFile) |
|
425 { |
|
426 $command .= " platsec"; |
|
427 } |
|
428 |
|
429 if ($extras ne "") |
|
430 { |
|
431 $command .= " mmfOpt.iby" ; # mmfOpt.iby should include optional stuff |
|
432 $command .= " iclOpt.iby" ; # iclOpt.iby should include optional stuff |
|
433 $command .= " miscOpt.iby" ; # miscOpt.iby should include optional stuff |
|
434 |
|
435 if ($test ne "") |
|
436 { |
|
437 $command .= " mmfOptTest.iby" ; # mmfOptTest.iby should include tests of optional stuff |
|
438 $command .= " iclOptTest.iby" if $include_icl_tests ne ""; # iclOptTest.iby should include tests of optional stuff |
|
439 $command .= " miscOptTests.iby"; # miscOptTests.iby should include tests of optional stuff |
|
440 } |
|
441 |
|
442 # Open source code delivered separately to Symbian OS |
|
443 foreach $OptionalFile (@OptionalFiles) |
|
444 { |
|
445 if (-f $OptionalFile) |
|
446 { |
|
447 $OptionalFile =~ s/^.*\\//; # get only the filename |
|
448 |
|
449 if ($OptionalFile eq "oggvorbiscodec.iby" |
|
450 || $OptionalFile eq "omxoggvorbiscodec.iby") |
|
451 { |
|
452 $OggVorbisCodecPresent = 1; |
|
453 } |
|
454 |
|
455 $command .= " "; |
|
456 $command .= $OptionalFile; |
|
457 } |
|
458 else |
|
459 { |
|
460 print "**** WARNING: $OptionalFile not added to ROM ****\n" |
|
461 } |
|
462 } |
|
463 |
|
464 # Add oggvorbis to ROM only if oggvorbiscodec and omxoggvorbiscodec exist to prevent ROM build errors |
|
465 if ($OggVorbisCodecPresent) |
|
466 { |
|
467 $command .= " oggvorbis.iby"; |
|
468 } |
|
469 } |
|
470 |
|
471 if ($gce ne "") |
|
472 { |
|
473 $command .= " videorenderer.iby"; |
|
474 |
|
475 if ($test ne "") |
|
476 { |
|
477 $command .= " tsu_mmf_videorenderer.iby"; |
|
478 } |
|
479 } |
|
480 |
|
481 if ($test ne "") |
|
482 { |
|
483 if ($component eq $icl_param) |
|
484 { |
|
485 $command .= " iclIntTests.iby"; |
|
486 $command .= " iclUnitTests.iby"; |
|
487 } |
|
488 elsif ($component eq $mmf_param) |
|
489 { |
|
490 $command .= " mmfUnitTests.iby"; |
|
491 if ($extras eq "") |
|
492 { |
|
493 $command .= " mmfNotOptTest.iby"; |
|
494 } |
|
495 } |
|
496 else |
|
497 { |
|
498 # -f or default |
|
499 $command .= " MiscUnitTests.iby"; |
|
500 $command .= " MiscIntTests.iby"; |
|
501 $command .= " MMFUnitTests.iby"; |
|
502 $command .= " MMFIntTests.iby"; |
|
503 $command .= " ICLUnitTests.iby" if $include_icl_tests ne ""; |
|
504 $command .= " ICLIntTests.iby" if $include_icl_tests ne ""; |
|
505 if ($targetToolsExists) |
|
506 { |
|
507 $command .= " ExtraMultimediaTests.iby ecam.iby"; |
|
508 $command .= " timageviewer.iby timagedisplay.iby tphotoeditor.iby timagetran.iby" if $include_icl_tests ne ""; |
|
509 } |
|
510 if ($extras eq "") |
|
511 { |
|
512 $command .= " mmfNotOptTest.iby"; |
|
513 } |
|
514 } |
|
515 } |
|
516 if ($targetToolsExists) |
|
517 { |
|
518 if ($auto ne "") |
|
519 { |
|
520 $command .= " MMAutoExec.iby"; |
|
521 } |
|
522 } |
|
523 |
|
524 #pvdecoderaac.iby is somehow not getting included into naviengine roms, the way it is in case of H4 and the rest. |
|
525 if($target eq "naviengine") |
|
526 { |
|
527 $command .= " pvdecoderaac.iby"; |
|
528 } |
|
529 |
|
530 $command .= $addnl_ibys; |
|
531 |
|
532 if ($gce eq "" and $dp eq "") |
|
533 { |
|
534 $command .= " surfacemanager_ref.iby" if ($target eq "h6" || "lab" || "naviengine"); |
|
535 } |
|
536 |
|
537 print $command, "\n"; |
|
538 |
|
539 die "EPOCROOT is not set" unless ($EPOCROOT ne ""); |
|
540 my $romDir = $EPOCROOT . $KRomDir; |
|
541 die "$romDir does not exist" unless -d $romDir; |
|
542 chdir ($romDir) or die "Could not cd to $romDir - $!"; |
|
543 |
|
544 # delete the expected image, so clear whether worked or not |
|
545 if (-f $img) |
|
546 { |
|
547 my $count = unlink $img; |
|
548 die "Could not delete $KH2Img" unless $count == 1; |
|
549 } |
|
550 |
|
551 # delete any existing zip, otherwise we could end up with multiple ROMs in our zip file |
|
552 if ($arm ne "" && -f $KZipName) |
|
553 { |
|
554 my $count = unlink $KZipName; |
|
555 die "Could not delete $KZipName" unless $count == 1; |
|
556 } |
|
557 |
|
558 my $result = system($command); |
|
559 if ($result != 0) |
|
560 { |
|
561 print "Command failed ($result)\n"; |
|
562 exit 1; |
|
563 } |
|
564 if($arm ne "") |
|
565 { |
|
566 if ($nand eq "" and $wdp eq "") # for nand etc you need to use the rofs loder, otherwise conver to sys$rom.zip |
|
567 { |
|
568 my $zipCommand = "zip " . $KZipName . " " . $img; |
|
569 |
|
570 print $zipCommand, "\n"; |
|
571 $result = system($zipCommand); |
|
572 if ($result != 0) |
|
573 { |
|
574 print "Command failed ($result)\n"; |
|
575 exit 1; |
|
576 } |
|
577 } |
|
578 elsif ($nand ne "" or $wdp ne "") |
|
579 { |
|
580 if ($target eq "h6") |
|
581 { |
|
582 if ($nand ne "") |
|
583 { |
|
584 copy($KH6NandBootLoader,$KBinName) or die "Copy failed: $!"; |
|
585 copy($KH6NandImg,$CoreImg) or die "Copy failed: $!"; |
|
586 copy($KH6NandRofsImg,$Rofs1Img) or die "Copy failed: $!"; |
|
587 } |
|
588 else # if ($wdp ne "") - not supported yet but ready for future releases |
|
589 { |
|
590 print "\nWDP is not supported yet on H6\n"; |
|
591 exit 1; |
|
592 # copy($KMmcBootLoader,$KBinName) or die "Copy failed: $!"; |
|
593 # copy($KH6Img,$CoreImg) or die "Copy failed: $!"; |
|
594 # copy($KH6RofsImg,$Rofs1Img) or die "Copy failed: $!"; |
|
595 } |
|
596 } |
|
597 elsif ($target eq "lab") |
|
598 { |
|
599 if ($nand ne "") |
|
600 { |
|
601 copy($KLabNandImg,$CoreImg) or die "Copy failed: $!"; |
|
602 copy($KLabNandRofsImg,$Rofs1Img) or die "Copy failed: $!"; |
|
603 # copy($KLabNandBootLoader,$KBinName) or die "Copy failed: $!"; Lab Nandloader is still not part of the CBR release hence commenting this command for time being |
|
604 } |
|
605 else # if ($wdp ne "") - not supported yet but ready for future releases |
|
606 { |
|
607 print "\nWDP is not supported yet on Labrador\n"; |
|
608 exit 1; |
|
609 # copy($KMmcBootLoader,$KBinName) or die "Copy failed: $!"; |
|
610 # copy($KLabImg,$CoreImg) or die "Copy failed: $!"; |
|
611 # copy($KLabRofsImg,$Rofs1Img) or die "Copy failed: $!"; |
|
612 } |
|
613 } |
|
614 else |
|
615 { |
|
616 if ($nand ne "") |
|
617 { |
|
618 copy($KH4NandBootLoader,$KBinName) or die "Copy failed: $!"; |
|
619 copy($KH4NandImg,$CoreImg) or die "Copy failed: $!"; |
|
620 copy($KH4NandRofsImg,$Rofs1Img) or die "Copy failed: $!"; |
|
621 } |
|
622 else # if ($wdp ne "") |
|
623 { |
|
624 copy($KMmcBootLoader,$KBinName) or die "Copy failed: $!"; |
|
625 copy($KH4Img,$CoreImg) or die "Copy failed: $!"; |
|
626 copy($KH4RofsImg,$Rofs1Img) or die "Copy failed: $!"; |
|
627 } |
|
628 } |
|
629 print "Generated " . $CoreImg . ", " . $Rofs1Img . " and " . $KBinName . "\n"; |
|
630 $command = "dir " . $CoreImg . " " . $Rofs1Img . " " . $KBinName; |
|
631 system($command); |
|
632 } |
|
633 } |
|
634 } |
|
635 |
|
636 sub Usage |
|
637 { |
|
638 # print usage statement and exit |
|
639 print <<ENDHERESTRING; |
|
640 usage: |
|
641 mmrombuild {-i|-m|-f} [+i] [-d] [-x] [-t] [-a] [-eabi] [-h2] [-h4] [-h6] [-lab] [-lbk] [-p <ibyfile>] [-ne <-uni/-smp>] |
|
642 |
|
643 mmbuildrom will build a lubbock / H2 / H4 / NaviEngine / Labrador ROM for multimedia testing |
|
644 |
|
645 It will always build a standard rom for the given platform, the various flags |
|
646 support what test and optional software is installed in addition. |
|
647 The parameters are as follows: |
|
648 |
|
649 -d) Build demand-paging NAND rom - instead of standard NOR build. Implies -n |
|
650 -w) Build writable data paging NAND rom - implies -d but not -n! |
|
651 -i) Build ICL test (unit and integration) software only, if -t is set |
|
652 -m) Build MMF unit test software only, if -t is set |
|
653 +i) ICL tests are now disabled unless this parameter is also given |
|
654 -n) Build NAND rom - otherwise builds NOR |
|
655 -f) Add all tests software, it -t is set (default) |
|
656 -t) Add test software |
|
657 -x) Add optional Multimedia modules |
|
658 -g) Add optional Graphics Composition Engine enabled components |
|
659 -eabi) Builds rom for armv5 |
|
660 -h2) Builds for H2 board |
|
661 -h4) Builds for H4 board |
|
662 -x86pc) Builds rom for X86 Platform |
|
663 -lab) Builds for labrador board |
|
664 -ne) Builds rom for NaviEngine board(NE (uni/smp) does not support demand paging yet) |
|
665 -smp) Builds an SMP-enabled Rom Image(Valid only if -ne flag is used) |
|
666 -uni) Builds UniCore Rom Image(Valid only if -ne flag is used) |
|
667 -lbk) Builds for lubbock board (default is h2) |
|
668 -p <ibyfile>) Append .iby file to list |
|
669 |
|
670 ENDHERESTRING |
|
671 if ($targetToolsExists) |
|
672 { |
|
673 print "-a) Add MMAutoExec iby file (internal Symbian use only)" |
|
674 } |
|
675 if($wrong_ne_param) |
|
676 { |
|
677 print "\n \n*Did you forget to specify whether you want a UniCore image or an SMP image?*\n\n"; |
|
678 } |
|
679 exit 1; |
|
680 } |
|
681 |