summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mkinfo.pl22
1 files changed, 19 insertions, 3 deletions
diff --git a/tools/mkinfo.pl b/tools/mkinfo.pl
index ea9db3daa4..dadb6b81d3 100755
--- a/tools/mkinfo.pl
+++ b/tools/mkinfo.pl
@@ -22,22 +22,38 @@ sub filesize {
22 return $size; 22 return $size;
23} 23}
24 24
25sub cmd1line {
26 my ($c)=@_;
27 my @out=`$c 2>/dev/null`;
28 chomp $out[0];
29 return $out[0];
30}
31
25if(!$output) { 32if(!$output) {
26 print "Usage: mkinfo.pl <filename>\n"; 33 print "Usage: mkinfo.pl <filename>\n";
27 exit; 34 exit;
28} 35}
29open(O, ">$output") || die "couldn't open $output for writing"; 36open(O, ">$output") || die "couldn't open $output for writing";
30 37
38# Variables identifying the target, that should remain the same as long
39# as the hardware is unmodified
31printf O ("Target: %s\n", $ENV{'ARCHOS'}); 40printf O ("Target: %s\n", $ENV{'ARCHOS'});
32printf O ("Target id: %d\n", $ENV{'TARGET_ID'}); 41printf O ("Target id: %d\n", $ENV{'TARGET_ID'});
33printf O ("Target define: %s\n", $ENV{'TARGET'}); 42printf O ("Target define: %s\n", $ENV{'TARGET'});
43printf O ("Memory: %d\n", $ENV{'MEMORYSIZE'});
44
45# Variables identifying Rockbox and bootloader properties. Possibly changing
46# every software upgrade.
34printf O ("Version: %s\n", $ENV{'VERSION'}); 47printf O ("Version: %s\n", $ENV{'VERSION'});
35printf O ("Binary: %s\n", $ENV{'BINARY'}); 48printf O ("Binary: %s\n", $ENV{'BINARY'});
36printf O ("Binary size: %s\n", filesize($ENV{'BINARY'})); 49printf O ("Binary size: %s\n", filesize($ENV{'BINARY'}));
37printf O ("Actual size: %s\n", filesize("apps/rockbox.bin")); 50printf O ("Actual size: %s\n", filesize("apps/rockbox.bin"));
38 51
39my @out=`$ENV{'CC'} --version`; 52# Variables identifying tool and build environment details
40chomp $out[0]; 53printf O ("gcc: %s\n", cmd1line("$ENV{'CC'} --version"));
41printf O ("gcc: %s\n", $out[0]); 54printf O ("ld: %s\n", cmd1line("$ENV{'LD'} --version"));
55printf O ("Host gcc: %s\n", cmd1line("$ENV{'HOSTCC'} --version"));
56printf O ("Host system: %s\n", $ENV{'UNAME'});
42 57
43close(O); 58close(O);
59