don't produce overly large images In the course of dealing with a problem in Xen's use of SeaBIOS when the resulting image exceeds 128k I found it desirable to not add unnecessarily much padding to the beginning of the image. Going in 64k steps should be sufficient; perhaps one could use even smaller ones, thus increasing the chances of there always being a window of available space at C0000h. Signed-off-by: Jan Beulich --- a/tools/checkrom.py +++ b/tools/checkrom.py @@ -32,11 +32,14 @@ def main(): rawdata = f.read() f.close() datasize = len(rawdata) - finalsize = 64*1024 - if datasize > 64*1024: + if datasize > 192*1024: + finalsize = 256*1024 + elif datasize > 128*1024: + finalsize = 192*1024 + elif datasize > 64*1024: finalsize = 128*1024 - if datasize > 128*1024: - finalsize = 256*1024 + else: + finalsize = 64*1024 # Sanity checks start = symbols['code32flat_start'].offset