[armel] Include size of appended DTBs in image size check
svn path=/dists/trunk/linux/; revision=22184
This commit is contained in:
parent
af6c30e62e
commit
c853385790
|
@ -4,6 +4,7 @@ import sys
|
|||
sys.path.append('debian/lib/python')
|
||||
|
||||
import fnmatch
|
||||
import glob
|
||||
import stat
|
||||
|
||||
from debian_linux.abi import Symbols
|
||||
|
@ -174,6 +175,7 @@ class CheckImage(object):
|
|||
self.dir = dir
|
||||
self.arch, self.featureset, self.flavour = arch, featureset, flavour
|
||||
|
||||
self.config_entry_base = config.merge('base', arch, featureset, flavour)
|
||||
self.config_entry_build = config.merge('build', arch, featureset, flavour)
|
||||
self.config_entry_image = config.merge('image', arch, featureset, flavour)
|
||||
|
||||
|
@ -198,7 +200,15 @@ class CheckImage(object):
|
|||
if not value:
|
||||
return 0
|
||||
|
||||
size = os.stat(image)[stat.ST_SIZE]
|
||||
dtb_size = 0
|
||||
if self.config_entry_image.get('check-size-with-dtb'):
|
||||
for dtb in glob.glob(
|
||||
os.path.join(self.dir, 'arch',
|
||||
self.config_entry_base['kernel-arch'],
|
||||
'boot/dts/*.dtb')):
|
||||
dtb_size = max(dtb_size, os.stat(dtb).st_size)
|
||||
|
||||
size = os.stat(image).st_size + dtb_size
|
||||
|
||||
if size > value:
|
||||
out.write('Image too large (%d > %d)! Refusing to continue.\n' % (size, value))
|
||||
|
|
|
@ -34,6 +34,7 @@ class Gencontrol(Base):
|
|||
'configs': config.SchemaItemList(),
|
||||
'initramfs-generators': config.SchemaItemList(),
|
||||
'check-size': config.SchemaItemInteger(),
|
||||
'check-size-with-dtb': config.SchemaItemBoolean(),
|
||||
},
|
||||
'relations': {
|
||||
},
|
||||
|
|
|
@ -52,6 +52,7 @@ linux (3.18-1~exp1) UNRELEASED; urgency=medium
|
|||
- [/orion5x] SCSI: Disable SCSI_UFSHCD
|
||||
- [/orion5x] target: Disable TCM_IBLOCK
|
||||
- [/orion5x] Disable AUDIT, DEBUG_BUGVERBOSE, PROFILING, OPROFILE
|
||||
* [armel] Include size of appended DTBs in image size check
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Tue, 09 Dec 2014 02:08:47 +0000
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ recommends: uboot-mkimage
|
|||
# SheevaPlug: 4194304 - 8 - 64 = 4194232
|
||||
# QNAP TS-119/TS-219: 2097152 - 8 - 64 = 2097080
|
||||
check-size: 2097080
|
||||
check-size-with-dtb: true
|
||||
|
||||
[orion5x_description]
|
||||
hardware: Marvell Orion
|
||||
|
@ -38,6 +39,7 @@ recommends: uboot-mkimage
|
|||
# HP Media Vault mv2120: ca 2 MB
|
||||
# QNAP TS-109/TS-209 & TS-409: 2097152 - 8 - 64 = 2097080
|
||||
check-size: 1572792
|
||||
check-size-with-dtb: true
|
||||
configs:
|
||||
armel/config-reduced
|
||||
armel/config.orion5x
|
||||
|
|
Loading…
Reference in New Issue