tools/packages_in_rom.pl
author markw <markw@symbian.org>
Wed, 20 Oct 2010 17:08:15 +0100
changeset 73 59f45c8582d3
parent 11 9fac6902f40b
permissions -rw-r--r--
Resolve ROM linking issues (via use of NOEXPORTLIBRARY in MMP files) and update rom content and static dependencies. Stemkit Syborg ROM now built with VFP OpenVG software reference by default.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
     1
# Copyright (c) 2010 Symbian Foundation Ltd.
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
     2
# All rights reserved.
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
     3
# This component and the accompanying materials are made available
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
     5
# which accompanies this distribution, and is available
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
     7
#
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
     8
# Initial Contributors:
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
     9
# Symbian Foundation - initial contribution.
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    10
#
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    11
# Contributors:
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    12
#
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    13
# Description: 
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    14
# This package is to identify the packages which contributed to a ROM image
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    15
# dir /s/b build_info\logs\releaseables\*.tsv | perl packages_in_rom.pl romfile.dir -
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    16
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    17
use strict;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    18
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    19
my %romfiles;
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    20
my %ibyfiles;
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    21
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    22
sub scan_rom_dir_file($)
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    23
	{
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    24
	my ($romdirfile) = @_;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    25
	
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    26
  my $line;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    27
  open FILE, "<$romdirfile" or print "Failed to read $romdirfile: $!\n" and return;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    28
  while ($line = <FILE>)
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    29
  	{
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    30
  	next if ($line !~ /\t/);
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    31
  	
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    32
  	chomp $line;
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    33
  	my ($romdest,$srcfile,$ibyfile) = split /\t/,$line;
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    34
  	$romdest =~ s/\s*$//;		# strip off trailing spaces
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    35
  	$romdest =~ s/\//\\/g; 	# convert to EPOC directory separators
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    36
  	
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    37
    $srcfile =~ s/\\/\//g;	# Unix directory separators please
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    38
    $srcfile =~ s/^"(.*)"$/$1/; 	# Remove quotes
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    39
    $srcfile =~ s/\/\//\//g; 	# Convert // to /
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    40
    $srcfile =~ s/^\[0x[0-9a-fA-F]+\]//;	# remove HVID, if present
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    41
    $srcfile =~ s/mbm_rom$/mbm/i; 	# use original name of derived file
11
9fac6902f40b Clean up the "z/system/../private" paths
William Roberts <williamr@symbian.org>
parents: 6
diff changeset
    42
    $srcfile =~ s/(z\/)system\/..\//$1/i; 	# z/system/../private
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    43
    $srcfile = lc $srcfile; 	# sigh...
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    44
    
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    45
    $ibyfile =~ s/\\/\//g;	# Unix directory separators please
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    46
    $ibyfile =~ s/^.*\/rom\/include\///; 	# normalise path to rom\include
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    47
    
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    48
  	$romfiles{$srcfile} = $romdest;
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    49
  	$ibyfiles{$romdest} = $ibyfile;
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    50
		}
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    51
	close FILE;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    52
	}
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    53
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    54
my %packages;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    55
my %packagenames;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    56
my %package_by_romfile;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    57
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    58
sub scan_tsv($)
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    59
  {
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    60
  my ($tsvfile) = @_;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    61
  return if ($tsvfile !~ /\/(([^\/]+)\/([^\/]+))\/info.tsv$/i);
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    62
  my $packagename = $1;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    63
  $packagename =~ s/\\/\//g;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    64
  $packagenames{$packagename} = 1;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    65
  
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    66
  my $line;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    67
  open FILE, "<$tsvfile" or print "Failed to read $tsvfile: $!\n" and return;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    68
  while ($line = <FILE>)
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    69
    {
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    70
    chomp $line;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    71
    my ($filename,$type,$config) = split /\t/,$line;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    72
    
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    73
    $filename = lc $filename;		# sigh...
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    74
    if (defined $romfiles{$filename})
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    75
    	{
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    76
    	$package_by_romfile{$filename} = $packagename;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    77
    	}
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    78
    }
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    79
  }
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    80
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    81
my $romlisting = shift @ARGV;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    82
scan_rom_dir_file($romlisting);
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    83
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    84
my $tsvfile;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    85
while ($tsvfile = <>)
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    86
  {
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    87
  chomp $tsvfile;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    88
  if ($tsvfile =~ /info.tsv$/)
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    89
    {
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    90
    $tsvfile =~ s/\\/\//g;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    91
    scan_tsv($tsvfile);
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    92
    }
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    93
  }
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    94
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    95
print "ROM file,Host file,Iby file,Package,In/Out,Who,Why\n";
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    96
my $unknowns = 0;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    97
foreach my $file (sort keys %romfiles)
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
    98
	{
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
    99
	my $romfile = $romfiles{$file};
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
   100
	my $ibyfile = $ibyfiles{$romfile};
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
   101
	my $package = $package_by_romfile{$file};
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
   102
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
   103
	if (!defined $package)
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
   104
		{
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
   105
		$package = "(unknown)";
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
   106
		$package_by_romfile{$file} = $package;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
   107
		$unknowns += 1;
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
   108
		}
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
   109
	print join(",", $romfile, $file, $ibyfile, $package, "","",""), "\n";
5
c42508d52961 Add perl script to identify the packages which provide files in a ROM, and generate original\syborg_content_by_package.txt
William Roberts <williamr@symbian.org>
parents:
diff changeset
   110
	}
6
d48e90a0206b Update packages_in_rom.pl to clean up the data and generate the rom_content.csv file, adding a "package" column
William Roberts <williamr@symbian.org>
parents: 5
diff changeset
   111
printf STDERR "\n%d files in %s, %d unknowns\n", scalar keys %romfiles, $romlisting, $unknowns;