mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2 v2] add config to check if the size of barebox exceed the target size
Date: Tue, 17 Jan 2012 15:48:05 +0100	[thread overview]
Message-ID: <20120117144805.GA25622@game.jcrosoft.org> (raw)
In-Reply-To: <20120117102137.GA26642@pengutronix.de>

On 11:21 Tue 17 Jan     , Sascha Hauer wrote:
> On Mon, Jan 16, 2012 at 05:19:52PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > CONFIG_BAREBOX_MAX_IMAGE_SIZE will allow to detected silent oversize result
> > 
> > if 0x0 the size will not been checked
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> > v2:
> > 
> > 	change to CONFIG_BAREBOX_MAX_IMAGE_SIZE
> > 	use default as 0xffffffff
> > 
> > Best Regards,
> > J.
> >  Makefile       |    7 +++++++
> >  common/Kconfig |    8 ++++++++
> >  2 files changed, 15 insertions(+), 0 deletions(-)
> > 
> > diff --git a/Makefile b/Makefile
> > index d8e685e..12fa192 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -659,6 +659,13 @@ OBJCOPYFLAGS_barebox.bin = -O binary
> >  
> >  barebox.bin: barebox FORCE
> >  	$(call if_changed,objcopy)
> > +	size=`stat -c%s $@`; \
> > +	max_size=`printf "%d" $(CONFIG_BAREBOX_MAX_IMAGE_SIZE)`; \
> > +	if [ $$size -gt $$max_size ] ; \
> > +	then \
> > +		echo "$@ size $$size > of the maximum size $$max_size"; \
> > +		exit 1 ; \
> > +	fi
> 
> added a '@' while applying to make this check quiet.
I prefer to use cmd and quiet_cmd style

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2012-01-17 14:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 16:19 Jean-Christophe PLAGNIOL-VILLARD
2012-01-16 16:19 ` [PATCH 2/2 v2] calao/boards: specify BAREBOX_MAX_IMAGE_SIZE to 256KiB Jean-Christophe PLAGNIOL-VILLARD
2012-01-17 10:21 ` [PATCH 1/2 v2] add config to check if the size of barebox exceed the target size Sascha Hauer
2012-01-17 14:48   ` Jean-Christophe PLAGNIOL-VILLARD [this message]

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=20120117144805.GA25622@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox