summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-04-20 12:53:40 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-04-20 12:53:40 +0000
commit10d11fff7de06c4f35c578ab5d156bc9ef093f2e (patch)
tree23ef4f10846f4c4d9d1d71b6d65715618848b5d0
parentf6209cc95961ad7ecc3be0dd95616fe86197a8f7 (diff)
introducing rockbox-info.txt
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13216 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xtools/buildzip.pl3
-rwxr-xr-xtools/configure1
-rwxr-xr-xtools/mkinfo.pl43
3 files changed, 47 insertions, 0 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index 06523c3ae3..4beade7739 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -358,6 +358,9 @@ STOP
print STDERR "No wps module present, can't do the WPS magic!\n";
}
+ # and the info file
+ system("cp rockbox-info.txt .rockbox/");
+
# now copy the file made for reading on the unit:
#if($notplayer) {
# `cp $webroot/docs/Help-JBR.txt .rockbox/docs/`;
diff --git a/tools/configure b/tools/configure
index 759fedc7e9..135095f2e3 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1645,6 +1645,7 @@ all: tools
@SIMUL2@
\$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
\$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
+ \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
bin: tools
@SIMUL1@
diff --git a/tools/mkinfo.pl b/tools/mkinfo.pl
new file mode 100755
index 0000000000..ea9db3daa4
--- /dev/null
+++ b/tools/mkinfo.pl
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# $Id: configure 13215 2007-04-20 11:58:39Z bagder $
+#
+# Purpose: extract and gather info from a build and put that in a standard
+# way in the output file. Meant to be put in rockbox zip package to help and
+# aid machine installers and more.
+#
+
+my $output = $ARGV[0];
+
+sub filesize {
+ my ($f)=@_;
+ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
+ $atime,$mtime,$ctime,$blksize,$blocks)
+ = stat($f);
+ return $size;
+}
+
+if(!$output) {
+ print "Usage: mkinfo.pl <filename>\n";
+ exit;
+}
+open(O, ">$output") || die "couldn't open $output for writing";
+
+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 ("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]);
+
+close(O);