imgtools/buildrom/tools/buildrom.pm
changeset 609 f76e0f94b7ab
parent 607 378360dbbdba
child 626 ac03b93ca9c4
equal deleted inserted replaced
608:690cd13b97a9 609:f76e0f94b7ab
   150    -I<directory>                    -- Use <directory> for the referenced IBY/OBY files
   150    -I<directory>                    -- Use <directory> for the referenced IBY/OBY files
   151    -argfile=xxx                     -- specify argument-file name containing list of command-line arguments to buildrom   
   151    -argfile=xxx                     -- specify argument-file name containing list of command-line arguments to buildrom   
   152    -lowmem                          -- use memory-mapped file for image build to reduce physical memory consumption   
   152    -lowmem                          -- use memory-mapped file for image build to reduce physical memory consumption   
   153    -checkcase                       -- check character case of path/name in oby/iby files, 
   153    -checkcase                       -- check character case of path/name in oby/iby files, 
   154                                     the result will be checkcase.log, this option is only valid on windows.
   154                                     the result will be checkcase.log, this option is only valid on windows.
   155    -workdir=xxx                     -- specify a directory to contain generated files.   
   155    -workdir=xxx                     -- specify a directory to contain generated files. 
       
   156    -prependepocroot                 -- if there is no EPOCROOT## before /epoc32/, prepend EPOCROOT## to epoc32.
   156 
   157 
   157 Popular -D defines to use include
   158 Popular -D defines to use include
   158 
   159 
   159    -D_DEBUG         -- select debug versions of some files
   160    -D_DEBUG         -- select debug versions of some files
   160    -D_FULL_DEBUG    -- select debug versions of all files
   161    -D_FULL_DEBUG    -- select debug versions of all files
   340 my $onlysmrimage = 1;
   341 my $onlysmrimage = 1;
   341 my $checkcase = 0;
   342 my $checkcase = 0;
   342 my $checkcase_platform = "";
   343 my $checkcase_platform = "";
   343 my $checkcase_test = 0;
   344 my $checkcase_test = 0;
   344 my $opt_workdir = 0;
   345 my $opt_workdir = 0;
       
   346 my $prependepocroot = 0;
   345 
   347 
   346 sub match_obyfile
   348 sub match_obyfile
   347 {
   349 {
   348 	my ($obyfile) = @_;
   350 	my ($obyfile) = @_;
   349 	if (-f $obyfile)
   351 	if (-f $obyfile)
  1017 			}
  1019 			}
  1018 			$opt_workdir = 1;
  1020 			$opt_workdir = 1;
  1019 			chdir "$currentdir";
  1021 			chdir "$currentdir";
  1020 			next;	
  1022 			next;	
  1021 		}
  1023 		}
  1022         if($arg =~/^-c(.*)/)
  1024 		if ($arg =~ /^-prependepocroot$/)
       
  1025 		{
       
  1026 			$prependepocroot = 1;
       
  1027 			next;
       
  1028 		}
       
  1029 		    if($arg =~/^-c(.*)/)
  1023         {
  1030         {
  1024           if($1 eq 'none' )
  1031           if($1 eq 'none' )
  1025           {
  1032           {
  1026               $opt_compression = " -compressionmethod none";
  1033               $opt_compression = " -compressionmethod none";
  1027           }
  1034           }
  1436 	while ($line=<TMP1>)
  1443 	while ($line=<TMP1>)
  1437 	{
  1444 	{
  1438 		track_source($line);
  1445 		track_source($line);
  1439 		$line =~ s-\\-\/-g;
  1446 		$line =~ s-\\-\/-g;
  1440 
  1447 
  1441 		my $tempstring = $epocroot."epoc32";
  1448 		if ($prependepocroot)
  1442 		if(($line !~ /^\s*\#/) && ($line =~ /\/epoc32/i) 
  1449 		{
  1443 		 && ($line !~ /EPOCROOT##\/?epoc32/i) && ($line !~ /$tempstring/i))
  1450 			my $tempstring = $epocroot."epoc32\/";
  1444 		{
  1451 			if(($line !~ /^\s*\#/) && ($line =~ /\/epoc32\//i) 
  1445 			print "add EPOCROOT for line: $line\n" if ($opt_v);
  1452 			 && ($line !~ /EPOCROOT##\/?epoc32\//i) && ($line !~ /$tempstring/i))
  1446 	  	$line =~ s-\/epoc32-EPOCROOT##epoc32-ig;
  1453 			{
  1447 		}
  1454 				print "add EPOCROOT for line: $line\n" if ($opt_v);
  1448 
  1455 		  	$line =~ s-\/epoc32-EPOCROOT##epoc32-ig;
       
  1456 			}
       
  1457 		}
  1449 		#
  1458 		#
  1450 		# Recognise keywords in lines that we process before substitution
  1459 		# Recognise keywords in lines that we process before substitution
  1451 		#
  1460 		#
  1452 		# # lineno "file" flagno
  1461 		# # lineno "file" flagno
  1453 		# DEFINE name replacement-with-0-spaces
  1462 		# DEFINE name replacement-with-0-spaces