os/persistentdata/persistentstorage/centralrepository/test/multirofs/group/buildMultiRofs.pl
Update contrib.
1 # Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
8 # Initial Contributors:
9 # Nokia Corporation - initial contribution.
21 ## THIS SCRIPT NEEDS TO BE RUN FROM \epoc32\rom\tools ONLY
23 ## Perform cleanup first
27 ## Number of ROFS to build specify number max 7
28 my $no_rofs = $ARGV[0];
30 ## Udeb/Urel configuration 1 means udeb
33 ## Textshell/Techview configuration 1 means textshell
36 ## Last argument check whether txt or cre test mode
39 my $buildrom_com="-D_NAND2 h4hrp";
41 ## Append the full debug option
44 $buildrom_com.=" -D_FULL_DEBUG";
48 $buildrom_com.=" -DPDS_PERFTEST_TXT";
51 ## Append whether textshell or techview and also add the centrep patchable constant
54 $buildrom_com.=" syslibs_textshell.oby syslibs_utils centreptesthelper.iby";
55 my $patchconst=" t_centrepPatchConst".$no_rofs.".iby";
56 $buildrom_com.=$patchconst;
60 # $buildrom_com.=" techview centrepPatchConst.iby centreptesthelper.iby";
61 $buildrom_com.=" techview centreptesthelper.iby";
66 $buildrom_com.=" t_centrepPerfPatchConstTxt.iby";
70 $buildrom_com.=" t_centrepPerfPatchConstCre.iby";
73 ## Make a copy of the estart for backup
74 unlink("../h4hrp/unistore2/estartnandcomp.txt_bak");
75 copy("../h4hrp/unistore2/estartnandcomp.txt","../h4hrp/unistore2/estartnandcomp.txt_bak") or die("Cannot backup");
77 ## Need to copy the corresponding estart to the right location
78 my $estartfile_name="estartnandcomp".$no_rofs.".txt";
79 copy ($estartfile_name,"../h4hrp/unistore2/estartnandcomp.txt") or die("Cannot copy estart");
82 ## Now call the buildrom
83 my $command="buildrom.cmd ".$buildrom_com;
86 ## build the core and ROFS1.img
89 $command.=" PREQ2112_ROFS1.iby";
92 ## rename the image files
96 copy("h4hrp_001.textshell_rom.nand.IMG","./rom_images/core.img") or die("Cannot copy core.img");
97 copy("h4hrp_001.textshell_rom.nand.rofs.img","./rom_images/rofs1.img") or die("Cannot copy rofs1.img");
101 copy("h4hrp_001.techview.nand.IMG","./rom_images/core.img") or die("Cannot copy");
102 copy("h4hrp_001.techview.nand.rofs.img","./rom_images/rofs1.img") or die("Cannot copy");
105 ## Now build the rest ROFS images
106 for (my $i=2;$i<=$no_rofs;$i++)
108 my $rofs_comm="../../tools/rofsbuild.exe ../include/PREQ2112_ROFS".$i.".iby";
110 copy("rofs".$i.".img","rom_images/rofs".$i.".img") or die("Cannot copy rofs2 etc");
113 ## Restore the estart we have overriden
114 copy("../h4hrp/unistore2/estartnandcomp.txt_bak","../h4hrp/unistore2/estartnandcomp.txt");