aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkrom.py
diff options
context:
space:
mode:
authorJohannes Krampf <johannes.krampf@googlemail.com>2014-01-12 11:14:54 -0500
committerKevin O'Connor <kevin@koconnor.net>2014-01-20 12:42:43 -0500
commit064fd069ef88aebe0fdf9850dc35bcffcb616763 (patch)
treefbe4c723b603af0811d18f5dd4b71151e3f92cca /scripts/checkrom.py
parent24ef4fd0d25d5133ced303eb225eceb08549081f (diff)
downloadseabios-064fd069ef88aebe0fdf9850dc35bcffcb616763.tar.gz
build: Make print statements in scripts python3 compatible.
Signed-off-by: Johannes Krampf <johannes.krampf@googlemail.com>
Diffstat (limited to 'scripts/checkrom.py')
-rwxr-xr-xscripts/checkrom.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/checkrom.py b/scripts/checkrom.py
index aa3dd0d1..e724844c 100755
--- a/scripts/checkrom.py
+++ b/scripts/checkrom.py
@@ -40,11 +40,11 @@ def main():
if datasize > 128*1024:
finalsize = 256*1024
if datasize > finalsize:
- print "Error! ROM doesn't fit (%d > %d)" % (datasize, finalsize)
- print " You have to either increate the size (CONFIG_ROM_SIZE)"
- print " or turn off some features (such as hardware support not"
- print " needed) to make it fit. Trying a more recent gcc version"
- print " might work too."
+ print("Error! ROM doesn't fit (%d > %d)" % (datasize, finalsize))
+ print(" You have to either increate the size (CONFIG_ROM_SIZE)")
+ print(" or turn off some features (such as hardware support not")
+ print(" needed) to make it fit. Trying a more recent gcc version")
+ print(" might work too.")
sys.exit(1)
# Sanity checks
@@ -52,17 +52,17 @@ def main():
end = symbols['code32flat_end'].offset
expend = layoutrom.BUILD_BIOS_ADDR + layoutrom.BUILD_BIOS_SIZE
if end != expend:
- print "Error! Code does not end at 0x%x (got 0x%x)" % (
- expend, end)
+ print("Error! Code does not end at 0x%x (got 0x%x)" % (
+ expend, end))
sys.exit(1)
if datasize > finalsize:
- print "Error! Code is too big (0x%x vs 0x%x)" % (
- datasize, finalsize)
+ print("Error! Code is too big (0x%x vs 0x%x)" % (
+ datasize, finalsize))
sys.exit(1)
expdatasize = end - start
if datasize != expdatasize:
- print "Error! Unknown extra data (0x%x vs 0x%x)" % (
- datasize, expdatasize)
+ print("Error! Unknown extra data (0x%x vs 0x%x)" % (
+ datasize, expdatasize))
sys.exit(1)
# Fix up CSM Compatibility16 table
@@ -83,10 +83,10 @@ def main():
# Print statistics
runtimesize = end - symbols['code32init_end'].offset
- print "Total size: %d Fixed: %d Free: %d (used %.1f%% of %dKiB rom)" % (
+ print("Total size: %d Fixed: %d Free: %d (used %.1f%% of %dKiB rom)" % (
datasize, runtimesize, finalsize - datasize
, (datasize / float(finalsize)) * 100.0
- , finalsize / 1024)
+ , finalsize / 1024))
# Write final file
f = open(outfile, 'wb')