mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-06-06 02:40:18 +00:00
arm-autonomy/xen-devicetree: Allow hex or decimal Dom0 Size
Check whether XEN_DEVICETREE_DOM0_SIZE begins '0x' and cast from hex or decimal accordingly, rather than assuming hex. Issue-Id: SCM-2037 Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com> Change-Id: I3a1c7c7ae6711b3d645cdb66bcd9c2c27196b054 Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -88,7 +88,11 @@ python calc_xen_dtb_dom0_size() {
|
||||
bb.note('size in bytes: %d' % size)
|
||||
# Ceil to MiB
|
||||
size_required = ceil(size / (2 ** 20)) * (2 ** 20)
|
||||
size_defined = int(d.getVar('XEN_DEVICETREE_DOM0_SIZE'), 16)
|
||||
xen_devicetree_dom0_size = d.getVar('XEN_DEVICETREE_DOM0_SIZE')
|
||||
if xen_devicetree_dom0_size[:2] == "0x":
|
||||
size_defined = int(xen_devicetree_dom0_size, 16)
|
||||
else:
|
||||
size_defined = int(xen_devicetree_dom0_size)
|
||||
|
||||
if size_required > size_defined:
|
||||
bb.note ("Wrong kernel size setting inside xen dtb!\n"\
|
||||
|
||||
Reference in New Issue
Block a user