summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2012-04-11 10:51:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-14 23:11:43 +0100
commitbb31c819be4f8f5d7d36b33664ca94e4cbf8ab5b (patch)
treea1b4ecb3c6c4c3eee6ac4646276c7276c70c3dcc /meta
parentd1c5de9ccb93ac30afcd98126fff4a74e243b6f9 (diff)
downloadpoky-bb31c819be4f8f5d7d36b33664ca94e4cbf8ab5b.tar.gz
bootimg: Fix a math thinko in the block count calculation
Fixes [YOCTO #1852] ... again. The conversion from sectors to blocks was multiplying by 2 instead of dividing by 2. Blocks are 1024 bytes, sectors are 512 bytes. The result was images being much larger than intended. Reported-by: Tom Zanussi <tom.zanussi@intel.com> (From OE-Core rev: b35384fa3ca96b31c63d764322215abced2066e4) Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported to edison by Darren Hart. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/bootimg.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index c2d43c86ee..489819b815 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -92,7 +92,8 @@ build_boot_bin() {
92 SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS)) 92 SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS))
93 93
94 # Determine the final size in blocks accounting for some padding 94 # Determine the final size in blocks accounting for some padding
95 BLOCKS=$(expr $(expr $SECTORS \* 2) + ${BOOTIMG_EXTRA_SPACE}) 95 BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE})
96
96 97
97 # Ensure total sectors is an integral number of sectors per 98 # Ensure total sectors is an integral number of sectors per
98 # track or mcopy will complain. Sectors are 512 bytes, and we 99 # track or mcopy will complain. Sectors are 512 bytes, and we