summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-04-20 13:36:56 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-04-20 13:36:56 +0000
commit0a1d4820e6e0db31994e60a4fd7513ed28173cc2 (patch)
tree3a90914081657faffe67db0d3fbbcff65f013549 /tools
parentf080ff0b0ee94fa062c4ab0dd11ecc14bc122107 (diff)
downloadrockbox-0a1d4820e6e0db31994e60a4fd7513ed28173cc2.tar.gz
rockbox-0a1d4820e6e0db31994e60a4fd7513ed28173cc2.zip
more info added to the output file, some comments added to the code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13218 a1c6a512-1295-4272-9138-f99709370657
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 {
return $size;
}
+sub cmd1line {
+ my ($c)=@_;
+ my @out=`$c 2>/dev/null`;
+ chomp $out[0];
+ return $out[0];
+}
+
if(!$output) {
print "Usage: mkinfo.pl <filename>\n";
exit;
}
open(O, ">$output") || die "couldn't open $output for writing";
+# Variables identifying the target, that should remain the same as long
+# as the hardware is unmodified
printf O ("Target: %s\n", $ENV{'ARCHOS'});
printf O ("Target id: %d\n", $ENV{'TARGET_ID'});
printf O ("Target define: %s\n", $ENV{'TARGET'});
+printf O ("Memory: %d\n", $ENV{'MEMORYSIZE'});
+
+# Variables identifying Rockbox and bootloader properties. Possibly changing
+# every software upgrade.
printf O ("Version: %s\n", $ENV{'VERSION'});
printf O ("Binary: %s\n", $ENV{'BINARY'});
printf O ("Binary size: %s\n", filesize($ENV{'BINARY'}));
printf O ("Actual size: %s\n", filesize("apps/rockbox.bin"));
-my @out=`$ENV{'CC'} --version`;
-chomp $out[0];
-printf O ("gcc: %s\n", $out[0]);
+# Variables identifying tool and build environment details
+printf O ("gcc: %s\n", cmd1line("$ENV{'CC'} --version"));
+printf O ("ld: %s\n", cmd1line("$ENV{'LD'} --version"));
+printf O ("Host gcc: %s\n", cmd1line("$ENV{'HOSTCC'} --version"));
+printf O ("Host system: %s\n", $ENV{'UNAME'});
close(O);
+