diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/mkinfo.pl | 22 |
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 | ||
25 | sub cmd1line { | ||
26 | my ($c)=@_; | ||
27 | my @out=`$c 2>/dev/null`; | ||
28 | chomp $out[0]; | ||
29 | return $out[0]; | ||
30 | } | ||
31 | |||
25 | if(!$output) { | 32 | if(!$output) { |
26 | print "Usage: mkinfo.pl <filename>\n"; | 33 | print "Usage: mkinfo.pl <filename>\n"; |
27 | exit; | 34 | exit; |
28 | } | 35 | } |
29 | open(O, ">$output") || die "couldn't open $output for writing"; | 36 | open(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 | ||
31 | printf O ("Target: %s\n", $ENV{'ARCHOS'}); | 40 | printf O ("Target: %s\n", $ENV{'ARCHOS'}); |
32 | printf O ("Target id: %d\n", $ENV{'TARGET_ID'}); | 41 | printf O ("Target id: %d\n", $ENV{'TARGET_ID'}); |
33 | printf O ("Target define: %s\n", $ENV{'TARGET'}); | 42 | printf O ("Target define: %s\n", $ENV{'TARGET'}); |
43 | printf O ("Memory: %d\n", $ENV{'MEMORYSIZE'}); | ||
44 | |||
45 | # Variables identifying Rockbox and bootloader properties. Possibly changing | ||
46 | # every software upgrade. | ||
34 | printf O ("Version: %s\n", $ENV{'VERSION'}); | 47 | printf O ("Version: %s\n", $ENV{'VERSION'}); |
35 | printf O ("Binary: %s\n", $ENV{'BINARY'}); | 48 | printf O ("Binary: %s\n", $ENV{'BINARY'}); |
36 | printf O ("Binary size: %s\n", filesize($ENV{'BINARY'})); | 49 | printf O ("Binary size: %s\n", filesize($ENV{'BINARY'})); |
37 | printf O ("Actual size: %s\n", filesize("apps/rockbox.bin")); | 50 | printf O ("Actual size: %s\n", filesize("apps/rockbox.bin")); |
38 | 51 | ||
39 | my @out=`$ENV{'CC'} --version`; | 52 | # Variables identifying tool and build environment details |
40 | chomp $out[0]; | 53 | printf O ("gcc: %s\n", cmd1line("$ENV{'CC'} --version")); |
41 | printf O ("gcc: %s\n", $out[0]); | 54 | printf O ("ld: %s\n", cmd1line("$ENV{'LD'} --version")); |
55 | printf O ("Host gcc: %s\n", cmd1line("$ENV{'HOSTCC'} --version")); | ||
56 | printf O ("Host system: %s\n", $ENV{'UNAME'}); | ||
42 | 57 | ||
43 | close(O); | 58 | close(O); |
59 | |||