All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Zanussi <tom.zanussi@intel.com>
To: Darren Hart <dvhart@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] bootimg: Fix a math thinko in the block count calculation
Date: Tue, 24 Jan 2012 23:53:00 -0600	[thread overview]
Message-ID: <1327470780.21937.55.camel@elmorro> (raw)
In-Reply-To: <68ac20e3e44f7da9e9732c1dc38448c07708475e.1327468756.git.dvhart@linux.intel.com>

On Tue, 2012-01-24 at 21:20 -0800, Darren Hart wrote:
> 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.
> 

Much better, thanks for the quick fix.

Tested-by: Tom Zanussi <tom.zanussi@intel.com>

> Reported-by: Tom Zanussi <tom.zanussi@intel.com>
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> CC: Joshua Lock <josh@linux.intel.com>
> ---
>  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 df3ee73..e65bef7 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





  reply	other threads:[~2012-01-25  6:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-25  5:20 [PATCH 0/1] bootimg: Fix a math thinko in the block count calculation Darren Hart
2012-01-25  5:20 ` [PATCH 1/1] " Darren Hart
2012-01-25  5:53   ` Tom Zanussi [this message]
2012-01-25 15:21   ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1327470780.21937.55.camel@elmorro \
    --to=tom.zanussi@intel.com \
    --cc=dvhart@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.