diff options
author | Darren Hart <dvhart@linux.intel.com> | 2012-01-24 21:20:54 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-25 14:29:45 +0000 |
commit | b35384fa3ca96b31c63d764322215abced2066e4 (patch) | |
tree | bf99ac4ce20ea37c3df56fd1f24c275029bd0006 /meta/classes | |
parent | 07e34778fc74126af1380bf249fd34a5e3df12c2 (diff) | |
download | openembedded-core-b35384fa3ca96b31c63d764322215abced2066e4.tar.gz openembedded-core-b35384fa3ca96b31c63d764322215abced2066e4.tar.bz2 openembedded-core-b35384fa3ca96b31c63d764322215abced2066e4.zip |
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>
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>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/bootimg.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass index df3ee7315a..e65bef7cca 100644 --- a/meta/classes/bootimg.bbclass +++ b/meta/classes/bootimg.bbclass @@ -133,7 +133,7 @@ build_hddimg() { SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS)) # Determine the final size in blocks accounting for some padding - BLOCKS=$(expr $(expr $SECTORS \* 2) + ${BOOTIMG_EXTRA_SPACE}) + BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE}) # Ensure total sectors is an integral number of sectors per # track or mcopy will complain. Sectors are 512 bytes, and we |