[armel] Warn if image size leaves less than 1% spare capacity in the flash.

This allows some slack for growth over the lifetime of a stable release.

svn path=/dists/sid/linux/; revision=22203
This commit is contained in:
Ian Campbell 2014-12-19 08:49:43 +00:00
parent 0e5e0ba34c
commit bbecbd8cc4
2 changed files with 19 additions and 1 deletions

View File

@ -172,6 +172,8 @@ class CheckImage(object):
self.dir = dir
self.arch, self.featureset, self.flavour = arch, featureset, flavour
self.changelog = Changelog(version=VersionLinux)[0]
self.config_entry_build = config.merge('build', arch, featureset, flavour)
self.config_entry_image = config.merge('image', arch, featureset, flavour)
@ -204,7 +206,20 @@ class CheckImage(object):
out.write('Image too large (%d > %d)! Refusing to continue.\n' % (size, value))
return 1
out.write('Image fits (%d <= %d). Continuing.\n' % (size, value))
# 1% overhead is desirable in order to cope with growth
# through the lifetime of a stable release. Warn if this is
# not the case.
usage = (float(size)/value) * 100.0
out.write('Image size %d/%d, using %.2f%%. ' % (size, value, usage))
if size > value:
sys.write('Too large. Refusing to continue.\n')
return 1
elif usage >= 99.0:
out.write('Under 1%% space in %s. ' % self.changelog.distribution)
else:
out.write('Image fits. ')
out.write('Continuing.\n')
return 0

3
debian/changelog vendored
View File

@ -14,6 +14,9 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium
OMAP5_DSS_HDMI, DISPLAY_ENCODER_TPD12S015, DISPLAY_CONNECTOR_HDMI,
USB_DWC3_OMAP, EXTCON_PALMAS, TI_EMIF and DDR.
Based on a patch from Chen Baozi (Closes: #772953)
* [armel] Change configuration to reduce kernel image size
- Warn if image size leaves less than 1% spare capacity in the flash. This
allows some slack for growth over the lifetime of a stable release.
-- Ben Hutchings <ben@decadent.org.uk> Sat, 13 Dec 2014 11:45:48 +0000