mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Reilly <marc@cpdesign.com.au>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 14/16] ARM: compile in image size and magic into barebox image
Date: Mon, 11 Apr 2011 18:42:12 +1000	[thread overview]
Message-ID: <201104111842.13036.marc@cpdesign.com.au> (raw)
In-Reply-To: <20110411074109.GE7285@pengutronix.de>

Hi,

> > > @@ -38,6 +38,12 @@ void __naked __section(.text_entry)
> > > exception_vectors(void) "ldr pc, =not_used\n"			/* (reserved) */
> > > 
> > >  		"ldr pc, =irq\n"			/* irq (interrupt) */
> > >  		"ldr pc, =fiq\n"			/* fiq (fast interrupt) */
> > > 
> > > +		".word 0x65726162\n"			/* 'BARE' */
> > > +		".word 0x00786f62\n"			/* 'BOX' */
> 
> I just see that the comment is wrong. It's actually in lower case
> letters.
> 

True.
(This is why I'm always reluctant to ack patches - I'm not very thorough :)

> > > +		".word _text\n"				/* text base. If copied there,
> > > +							 * barebox can skip relocation
> > > +							 */
> > > +		".word _barebox_image_size\n"		/* image size to copy */
> > > 
> > >  	);
> > >  
> > >  }
> > 
> > I like this, is there a way to include a version string/info also?
> > 
> > (The aim is to be able to derive the barebox version of an image from
> > just reading the file).
> 
> Should be possible. One problem might be that the length of the version
> string is variable, so if we put it here, it must be the piece of
> information here.

"it must be the _last_ piece of information here"?
 
Could also dedicate a fixed maximum size, although that's the kind of thing 
that becomes a pain later. 

> 
> > > +extern void *_barebox_image_size;
> > > +
> > > +#define barebox_image_size	(unsigned int)&_barebox_image_size
> > 
> > I don't understand this line. Did you mean something like:
> > 
> > #define barebox_image_size *((unsigned int *)_barebox_image_size)
> > 
> > Or am I missing something?
> 
> _barebox_image_size is filled in by the linker. It can be seen as a
> pointer which address corresponds to the image size. I know this looks
> strange and I don't really like this. 


Ah, _now_ I get it. It looks strange but makes sense with your explanation 
above, and I reckon that's OK. 

> Maybe it can be done better?

Roberts suggestion to give it a comment is probably the best and simplest. The 
alternate way I come up with isn't any better.

Cheers
Marc



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

  parent reply	other threads:[~2011-04-11  8:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 14:36 various cleanup patches Sascha Hauer
2011-04-08 14:36 ` [PATCH 01/16] fs: remove unused field 'type' from struct fs_driver_d Sascha Hauer
2011-04-08 14:36 ` [PATCH 02/16] mci: make it compile without info support Sascha Hauer
2011-04-08 14:36 ` [PATCH 03/16] ubi: do not use filep Sascha Hauer
2011-04-08 14:36 ` [PATCH 04/16] devfs: remove unused struct filep* argument from open/close Sascha Hauer
2011-04-08 14:36 ` [PATCH 05/16] fs: implement flush function Sascha Hauer
2011-04-08 14:36 ` [PATCH 06/16] devfs: factor out core devfs functionality Sascha Hauer
2011-04-08 14:36 ` [PATCH 07/16] nand: remove unused header file Sascha Hauer
2011-04-08 14:36 ` [PATCH 08/16] startup: we can only mount root and devfs when compiled in Sascha Hauer
2011-04-08 14:36 ` [PATCH 09/16] nand: remove unused nand_util file Sascha Hauer
2011-04-08 14:36 ` [PATCH 10/16] move version_string to seperate file Sascha Hauer
2011-04-08 14:36 ` [PATCH 11/16] fs: use safe_strncpy instead of sprintf Sascha Hauer
2011-04-08 14:36 ` [PATCH 12/16] script: update git ignore file Sascha Hauer
2011-04-08 14:36 ` [PATCH 13/16] serial 16550: use xzalloc Sascha Hauer
2011-04-08 14:37 ` [PATCH 14/16] ARM: compile in image size and magic into barebox image Sascha Hauer
2011-04-10  4:33   ` Marc Reilly
2011-04-11  7:41     ` Sascha Hauer
2011-04-11  7:46       ` Robert Schwebel
2011-04-11  8:42       ` Marc Reilly [this message]
2011-04-08 14:37 ` [PATCH 15/16] commands: seperate usb command from usb core Sascha Hauer
2011-04-08 14:37 ` [PATCH 16/16] fs mount: fix error handling Sascha Hauer

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=201104111842.13036.marc@cpdesign.com.au \
    --to=marc@cpdesign.com.au \
    --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