summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-05-17 09:31:45 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-05-17 15:46:47 +0200
commit93fcd569abc065c77f93a903cbaff6e551be437e (patch)
treedef31e76965298c784029dd5d13b4edda617ced5 /tools
parentc05cd163bc1f2843a10f8883d5583dd2cdf65962 (diff)
downloadrockbox-93fcd569abc065c77f93a903cbaff6e551be437e.tar.gz
rockbox-93fcd569abc065c77f93a903cbaff6e551be437e.tar.bz2
rockbox-93fcd569abc065c77f93a903cbaff6e551be437e.zip
mkinfo: Use correct binary file for "actual size" on hosted targets
Change-Id: Ia22743f3cab18fb1285bcec6429bb198525f37f8
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mkinfo.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/mkinfo.pl b/tools/mkinfo.pl
index 12d32bc7dc..6b12345305 100755
--- a/tools/mkinfo.pl
+++ b/tools/mkinfo.pl
@@ -100,11 +100,19 @@ printf O ("Binary size: %s\n", filesize($ENV{'BINARY'}));
printf O ("Voice format: %s\n", definescan("$ENV{APPSDIR}/talk.h", "VOICE_VERSION"));
if ($ENV{'APPSDIR'} =~ /\/apps$/) {
- printf O ("Actual size: %s\n", filesize("rockbox.bin"));
+ if (-f "rockbox.bin") {
+ printf O ("Actual size: %s\n", filesize("rockbox.bin"));
+ } else {
+ printf O ("Actual size: %s\n", filesize($ENV{'BINARY'}));
+ }
printf O ("RAM usage: %s\n", mapscan("rockbox.map"));
printf O ("Features: %s\n", features("apps/features"));
} elsif ($ENV{'APPSDIR'} =~ /\/bootloader$/) {
- printf O ("Actual size: %s\n", filesize("bootloader.bin"));
+ if (-f "bootloader.bin") {
+ printf O ("Actual size: %s\n", filesize("bootloader.bin"));
+ } else {
+ printf O ("Actual size: %s\n", filesize($ENV{'BINARY'}));
+ }
printf O ("RAM usage: %s\n", mapscan("bootloader.map"));
}