From 93fcd569abc065c77f93a903cbaff6e551be437e Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 17 May 2020 09:31:45 -0400 Subject: mkinfo: Use correct binary file for "actual size" on hosted targets Change-Id: Ia22743f3cab18fb1285bcec6429bb198525f37f8 --- tools/mkinfo.pl | 12 ++++++++++-- 1 file 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")); } -- cgit v1.2.3