imgtools/buildrom/tools/buildrom.pm
changeset 633 a4eca1f021ac
parent 626 ac03b93ca9c4
child 647 53d1ab72f5bc
equal deleted inserted replaced
631:9435b9008a58 633:a4eca1f021ac
    64 	$useinterpretsis = 0;
    64 	$useinterpretsis = 0;
    65 }
    65 }
    66 my $enforceFeatureManager = 0; # Flag to make Feature Manager mandatory if SYMBIAN_FEATURE_MANAGER macro is defined. 
    66 my $enforceFeatureManager = 0; # Flag to make Feature Manager mandatory if SYMBIAN_FEATURE_MANAGER macro is defined. 
    67 
    67 
    68 my $BuildromMajorVersion = 3 ;
    68 my $BuildromMajorVersion = 3 ;
    69 my $BuildromMinorVersion = 27;
    69 my $BuildromMinorVersion = 28;
    70 my $BuildromPatchVersion = 2;
    70 my $BuildromPatchVersion = 0;
    71 
    71 
    72 
    72 
    73 sub print_usage
    73 sub print_usage
    74 {
    74 {
    75 
    75 
   156                                     the result will be checkcase.log, this option is only valid on windows.
   156                                     the result will be checkcase.log, this option is only valid on windows.
   157    -workdir=xxx                     -- specify a directory to contain generated files. 
   157    -workdir=xxx                     -- specify a directory to contain generated files. 
   158    -prependepocroot                 -- if there is no EPOCROOT## before /epoc32/, prepend EPOCROOT## to epoc32.
   158    -prependepocroot                 -- if there is no EPOCROOT## before /epoc32/, prepend EPOCROOT## to epoc32.
   159    -stdcpp                          -- ignore symbian customized cpp and try to find another cpp in the PATH.(for Windows only)
   159    -stdcpp                          -- ignore symbian customized cpp and try to find another cpp in the PATH.(for Windows only)
   160    -cpp=xxx                         -- specify a CPP preprocessor used by Buildrom.
   160    -cpp=xxx                         -- specify a CPP preprocessor used by Buildrom.
       
   161    -xiponly                      -- just create the XIP ROM image without creating the ROFS image.
   161    
   162    
   162 Popular -D defines to use include
   163 Popular -D defines to use include
   163 
   164 
   164    -D_DEBUG         -- select debug versions of some files
   165    -D_DEBUG         -- select debug versions of some files
   165    -D_FULL_DEBUG    -- select debug versions of all files
   166    -D_FULL_DEBUG    -- select debug versions of all files
   350 my $prependepocroot = 0;
   351 my $prependepocroot = 0;
   351 my $stdcpp = 0;
   352 my $stdcpp = 0;
   352 my $obycharset;
   353 my $obycharset;
   353 my $cppoption = 0;
   354 my $cppoption = 0;
   354 my $preprocessor = "cpp";
   355 my $preprocessor = "cpp";
       
   356 my $opt_xiponly = 0;
   355 
   357 
   356 sub match_obyfile
   358 sub match_obyfile
   357 {
   359 {
   358 	my ($obyfile) = @_;
   360 	my ($obyfile) = @_;
   359 	if (-f $obyfile)
   361 	if (-f $obyfile)
  1230 		if ( $arg =~ /^-lowmem/i )
  1232 		if ( $arg =~ /^-lowmem/i )
  1231 		{
  1233 		{
  1232 			$lowMem = $arg;
  1234 			$lowMem = $arg;
  1233 			next;
  1235 			next;
  1234 		}
  1236 		}
       
  1237 		if( $arg =~ /^-xiponly$/i)
       
  1238 		{
       
  1239 			$opt_xiponly = 1;
       
  1240 			next;
       
  1241 		}
  1235 	    if ($arg =~ /^-/)
  1242 	    if ($arg =~ /^-/)
  1236 	    {
  1243 	    {
  1237 		print "Unknown arg: $arg\n";
  1244 		print "Unknown arg: $arg\n";
  1238 		$errors++;
  1245 		$errors++;
  1239 		next;
  1246 		next;
  3182 	my $varname = $featureVariant{'VALID'} ? $featureVariant{'NAME'} : "default";
  3189 	my $varname = $featureVariant{'VALID'} ? $featureVariant{'NAME'} : "default";
  3183 
  3190 
  3184 	foreach $line (@obydata)
  3191 	foreach $line (@obydata)
  3185 	{
  3192 	{
  3186 		track_source($line);
  3193 		track_source($line);
  3187 		if ($line =~ /^\s*REM/i || $line =~ /^\s*TIME\s*=\s*/i)
  3194 		if (($opt_xiponly == 1) && ($line =~ /^\s*REM\s*ROM_IMAGE\[\s*[^0]\s*\]/i))
       
  3195 		{
       
  3196 			print "Skip all the content for ROFS image\n" if($opt_v);
       
  3197 			last;
       
  3198 		}
       
  3199 		elsif ($line =~ /^\s*REM/i || $line =~ /^\s*TIME\s*=\s*/i)
  3188 		{
  3200 		{
  3189 			# ignore REM statements, to avoid processing "REM data=xxx yyy"
  3201 			# ignore REM statements, to avoid processing "REM data=xxx yyy"
  3190 		}
  3202 		}
  3191 		# 
  3203 		# 
  3192 		# thing=some\file 
  3204 		# thing=some\file 
  4400 			{
  4412 			{
  4401 				is_existinpath("rombuild", romutl::DIE_NOT_FOUND);
  4413 				is_existinpath("rombuild", romutl::DIE_NOT_FOUND);
  4402 				$rombuild .= " -symbols" unless($nosymbols) ;
  4414 				$rombuild .= " -symbols" unless($nosymbols) ;
  4403 				run_rombuilder($rombuild.$compress, $obeyfile, $thisdir."ROMBUILD.LOG");
  4415 				run_rombuilder($rombuild.$compress, $obeyfile, $thisdir."ROMBUILD.LOG");
  4404 			}
  4416 			}
  4405 			else
  4417 			elsif($opt_xiponly == 0)
  4406 			{
  4418 			{
  4407 				# efficient_rom_paging.pm can move everything to core rom.
  4419 				# efficient_rom_paging.pm can move everything to core rom.
  4408 				# If that is the case, don't run rofsbuild at all to avoid errors.
  4420 				# If that is the case, don't run rofsbuild at all to avoid errors.
  4409 			#	use constant TRUE => 1;
  4421 			#	use constant TRUE => 1;
  4410 			#	use constant FALSE => 0;
  4422 			#	use constant FALSE => 0;