mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Jan Weitzel <J.Weitzel@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v3] xload: get barebox size from barebox_arm_head
Date: Tue, 4 Sep 2012 16:41:36 +0200	[thread overview]
Message-ID: <20120904143553.GA32603@game.jcrosoft.org> (raw)
In-Reply-To: <1346761644.6779.0.camel@lws-weitzel>

On 14:27 Tue 04 Sep     , Jan Weitzel wrote:
> Am Dienstag, den 04.09.2012, 11:28 +0200 schrieb Sascha Hauer:
> > On Tue, Sep 04, 2012 at 09:34:22AM +0200, Jan Weitzel wrote:
> > > Am Mittwoch, den 29.08.2012, 14:21 +0200 schrieb Jean-Christophe
> > > > > +unsigned int get_image_size(void *head)
> > > > > +{
> > > > > +	unsigned int ret = 0;
> > > > > +	unsigned int *psize = head + HEAD_SIZE_OFFSET;
> > > > > +	const char *pmagic = head + HEAD_MAGICWORD_OFFSET;
> > > > > +
> > > > > +	if (!strcmp(pmagic, "barebox"))
> > > > > +		ret = *psize;
> > > > > +	debug("Detected barebox image size %u\n", ret);
> > > > factorise the code with filetype
> > > What exactly do you mean? I could factorise it by boot source (mmc / nand) with complete omap_xload_boot_nand.
> > 
> > He means that you should use file_detect_type() To detect whether it's a
> > barebox image.
> > I'm unsure I share this opinion. After detecting that it's a barebox
> > file you have to look into the header anyway to get the actual size.
> I wasn't aware of this function. I would like to avoid adding
> CONFIG_FILETYPE to MLO config.

so factorize the detection of the barebox-arm in a header share by both

duplication of the code NACK

Best Regards,
J.

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

  reply	other threads:[~2012-09-04 14:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 10:56 [RFC] " Jan Weitzel
2012-08-28  6:54 ` Sascha Hauer
2012-08-28  8:41   ` Jan Weitzel
2012-08-28  9:08     ` Sascha Hauer
2012-08-28 12:36       ` [PATCH v2] " Jan Weitzel
2012-08-29  6:59         ` Sascha Hauer
2012-08-29  8:01           ` Jan Weitzel
2012-08-29  9:10             ` [PATCH v3] " Jan Weitzel
2012-08-29 12:21               ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-04  7:34                 ` Jan Weitzel
2012-09-04  9:28                   ` Sascha Hauer
2012-09-04 12:27                     ` Jan Weitzel
2012-09-04 14:41                       ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-09-05  8:22                         ` [PATCH v4] " Jan Weitzel
2012-09-05 10:34                           ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-05 11:37                             ` Suspected ##SPAM## -:Re: " Jan Weitzel
2012-09-05 12:02                               ` Jean-Christophe PLAGNIOL-VILLARD

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=20120904143553.GA32603@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=J.Weitzel@phytec.de \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox