From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Prevent a U-Boot crash on Wandboard
Date: Mon, 23 Sep 2013 15:45:54 -0400 [thread overview]
Message-ID: <20130923194554.GA5273@bill-the-cat> (raw)
In-Reply-To: <20130923191757.GZ5273@bill-the-cat>
On Mon, Sep 23, 2013 at 03:17:57PM -0400, Tom Rini wrote:
> On Mon, Sep 23, 2013 at 08:50:55PM +0200, Wolfgang Denk wrote:
>
> > Dear Fabio Estevam,
> >
> > In message <CAOMZO5Aj56KVTfRqBd3Wq7OiP8q3wA0Yv4evUzerkXFuFvxvHQ@mail.gmail.com> you wrote:
> > >
> > > > Then shouldn't the patch subject/summary be "print command name only
> > > > if cmdtp is not NULL" rather than the quite uninformative "prevent a
> > > > crash"?
> > >
> > > Yes, I agree that original subject is a bit misleading.
> > >
> > > When I read it I thought it was a Wandboard related problem.
> >
> > I don't know if it's only Wandboard, or if other boards are affected,
> > too (which are these? under which exact test cases?). In any case.
> > the problem is not here, but on the caller's side. It should not call
> > a function which expects a command name with a NULL pointer passed as
> > argument.
>
> I looked around at this a bit this morning. cmd_pxe.c would need a lot
> of mangling to pass around cmdtp, just for the sake of an error message
> that's then ignored as the caller logic is:
> 1) Try bootm on the image
> 2) If CONFIG_CMD_BOOTZ, if bootm returned, maybe we got a zImage?
> do_bootz instead (also NULL cmdtp).
>
> The error message wouldn't exactly make sense here either, being invoked
> via menu.
So, I went off an modified cmd_pxe.c to pass around cmdtp so that we get
an error message out, and it's not too bad looking, but it highlights
another problem, which is that we could really use a way to get at least
the "is this a ... ?" code, and just get the error code, rather than
printouts. The pxe (and really it's the syslinux.conf/extlinux.conf
parsing) code shouldn't be doing bootm();bootz() but checking the image
type and calling the right boot.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130923/3e0ca390/attachment.pgp>
next prev parent reply other threads:[~2013-09-23 19:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 1:21 [U-Boot] [PATCH] Prevent a U-Boot crash on Wandboard Steven Falco
2013-09-23 11:40 ` Otavio Salvador
2013-09-23 18:47 ` Wolfgang Denk
2013-09-23 16:11 ` Albert ARIBAUD
2013-09-23 16:21 ` Fabio Estevam
2013-09-23 18:18 ` Tom Rini
2013-09-23 18:50 ` Wolfgang Denk
2013-09-23 19:17 ` Tom Rini
2013-09-23 19:45 ` Tom Rini [this message]
2013-09-23 20:44 ` Wolfgang Denk
2013-09-23 23:23 ` Steven Falco
2013-09-23 20:43 ` Wolfgang Denk
2013-09-23 18:45 ` Wolfgang Denk
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=20130923194554.GA5273@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.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