From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] filetype: add arm u-boot support
Date: Fri, 20 Sep 2013 13:56:59 +0200 [thread overview]
Message-ID: <20130920115659.GG30088@pengutronix.de> (raw)
In-Reply-To: <20130920080257.GH1137@ns203013.ovh.net>
On Fri, Sep 20, 2013 at 10:02:57AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 08:29 Fri 20 Sep , Sascha Hauer wrote:
> > On Thu, Sep 19, 2013 at 01:56:38PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > On 09:00 Wed 18 Sep , Sascha Hauer wrote:
> > > > On Tue, Sep 17, 2013 at 09:52:18AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > > > ---
> > > > > common/filetype.c | 3 +++
> > > > > include/filetype.h | 1 +
> > > > > 2 files changed, 4 insertions(+)
> > > > >
> > > > > diff --git a/common/filetype.c b/common/filetype.c
> > > > > index 7507d85..59ea25a 100644
> > > > > --- a/common/filetype.c
> > > > > +++ b/common/filetype.c
> > > > > @@ -35,6 +35,7 @@ static const struct filetype_str filetype_str[] = {
> > > > > [filetype_lzo_compressed] = { "lzo compressed", "lzo" },
> > > > > [filetype_lz4_compressed] = { "lz4 compressed", "lz4" },
> > > > > [filetype_arm_barebox] = { "arm barebox image", "arm-barebox" },
> > > > > + [filetype_arm_uboot] = { "arm u-boot image", "arm-u-boot" },
> > > > > [filetype_uimage] = { "U-Boot uImage", "u-boot" },
> > > > > [filetype_ubi] = { "UBI image", "ubi" },
> > > > > [filetype_jffs2] = { "JFFS2 image", "jffs2" },
> > > > > @@ -226,6 +227,8 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
> > > > >
> > > > > if (is_barebox_arm_head(_buf))
> > > > > return filetype_arm_barebox;
> > > > > + if (buf[15] == 0xdeadbeef)
> > > > > + return filetype_arm_uboot;
> > > >
> > > > 0xdeadbeef is such a widely used placeholder that we should use it for
> > > > filetype detection. Also, I don't think that U-Boot ever specified
> > > > 0xdeadbeef at this offset as a fixed value. It could be changed without
> > > > notice.
> > >
> > > on ARM it's keeped for years > 7 IIRC
> >
> > Yes, and there's no indication that it will change. Anyway, this was
> > never meant as an API and everybody uses 0xdeadbeef as placeholder.
>
> so the question remain how to boot a u-boot that can be a second stage
'go'? You could also embed it in an uImage if you really want to use the
bootm command.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-09-20 11:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 7:52 Jean-Christophe PLAGNIOL-VILLARD
2013-09-17 7:52 ` [PATCH 2/2] bootm: add " Jean-Christophe PLAGNIOL-VILLARD
2013-09-18 7:03 ` Sascha Hauer
2013-09-19 11:50 ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-18 7:00 ` [PATCH 1/2] filetype: add arm " Sascha Hauer
2013-09-19 11:56 ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-20 6:29 ` Sascha Hauer
2013-09-20 8:02 ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-20 11:56 ` Sascha Hauer [this message]
2013-09-21 6:53 ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-21 8:10 ` 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=20130920115659.GG30088@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/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