aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-09-24 10:06:16 +0200
committerGerd Hoffmann <kraxel@redhat.com>2013-09-30 12:26:08 +0200
commit85f8fac87526341d775b02a0bfbc29d97f3ba22a (patch)
tree0a5b0ea8ae4ea419505f822b8f254bbbb738e0b6 /scripts
parentd3c971e35eedbccd07d9c095579b6132add30881 (diff)
downloadseabios-hppa-85f8fac87526341d775b02a0bfbc29d97f3ba22a.zip
seabios-hppa-85f8fac87526341d775b02a0bfbc29d97f3ba22a.tar.gz
seabios-hppa-85f8fac87526341d775b02a0bfbc29d97f3ba22a.tar.bz2
build: explicitly set ROM size
Add a config option to specify the rom size wanted. Default is zero, which will automatically figure the needed size. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkrom.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/scripts/checkrom.py b/scripts/checkrom.py
index 6f07ac8..aa3dd0d 100755
--- a/scripts/checkrom.py
+++ b/scripts/checkrom.py
@@ -21,7 +21,7 @@ def checksum(data, start, size, csum):
def main():
# Get args
- objinfo, rawfile, outfile = sys.argv[1:]
+ objinfo, finalsize, rawfile, outfile = sys.argv[1:]
# Read in symbols
objinfofile = open(objinfo, 'rb')
@@ -32,11 +32,20 @@ def main():
rawdata = f.read()
f.close()
datasize = len(rawdata)
- finalsize = 64*1024
- if datasize > 64*1024:
- finalsize = 128*1024
- if datasize > 128*1024:
- finalsize = 256*1024
+ finalsize = int(finalsize) * 1024
+ if finalsize == 0:
+ finalsize = 64*1024
+ if datasize > 64*1024:
+ finalsize = 128*1024
+ 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."
+ sys.exit(1)
# Sanity checks
start = symbols['code32flat_start'].offset