From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 1/1] mpc512x: adjust and improve AC14xx board support
Date: Mon, 03 Jun 2013 15:31:57 +0200 [thread overview]
Message-ID: <51AC9ACD.1030903@denx.de> (raw)
In-Reply-To: <1370257851-27583-1-git-send-email-gsi@denx.de>
Hi Gerhard,
On 03/06/2013 13:10, Gerhard Sittig wrote:
> - s = getenv("install_in_progress");
> + s = getenv("want_recovery");
> if ((s != NULL) && (*s != '\0')) {
> - printf("previous installation aborted, running RECOVERY\n");
> + printf("detected recovery request (environment)\n");
> want_recovery = 1;
> }
> - s = getenv("install_failed");
> + s = getenv("install_in_progress");
> if ((s != NULL) && (*s != '\0')) {
> - printf("previous installation FAILED, running RECOVERY\n");
> + printf("previous installation has not completed\n");
> want_recovery = 1;
> }
> - s = getenv("want_recovery");
> + s = getenv("install_failed");
I am asking myself if it is strictly required to have multiple variables
to identify if the "recovery" script must be run or not. If a previous
install was interrupted ("install_in_progress"
), or a request was initiated ("want recovery") or the last installation
failed, is not so important. In all cases you set the want_recovery flag
and starts the script. But using multiple variables it is not atomic,
and could be, due for example to a system reset, that a variable is set
without clearing the other one.
Why is not better to set a single variable, maybe with multiple values ?
Value could be a simple integer (0=no recovery,
1=install_in_progress,,..) or still a string, if you prefer this solution.
> - "rootpath=/opt/eldk/ppc_6xx\n" \
> + "rootpath=/opt/eldk/ppc_6xx\0" \
We do not set IP addresses or fix rootpath. Someone could have installed
the rootfs on NFS on a different path. Also, IMHO rootpath should be
simply removed.
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2013-06-03 13:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 11:10 [U-Boot] [PATCH v1 1/1] mpc512x: adjust and improve AC14xx board support Gerhard Sittig
2013-06-03 13:07 ` Wolfgang Denk
2013-06-03 13:50 ` Gerhard Sittig
2013-06-03 18:16 ` Wolfgang Denk
2013-06-03 13:31 ` Stefano Babic [this message]
2013-06-03 14:49 ` Gerhard Sittig
2013-06-05 12:51 ` [U-Boot] [PATCH v2 0/7] cleanup in the 'ifm AC14xx' " Gerhard Sittig
2013-06-05 12:51 ` [U-Boot] [PATCH v2 1/7] ac14xx: fix a potential NULL deref in diagnostics Gerhard Sittig
2013-06-24 20:25 ` Wolfgang Denk
2013-06-05 12:51 ` [U-Boot] [PATCH v2 2/7] ac14xx: cleanup comments in the board support Gerhard Sittig
2013-06-24 20:26 ` Wolfgang Denk
2013-06-05 12:51 ` [U-Boot] [PATCH v2 3/7] ac14xx: minor improvement in diagnostics Gerhard Sittig
2013-06-24 20:26 ` Wolfgang Denk
2013-06-05 12:51 ` [U-Boot] [PATCH v2 4/7] ac14xx: re-order the recovery condition checks Gerhard Sittig
2013-06-24 20:27 ` Wolfgang Denk
2013-06-05 12:51 ` [U-Boot] [PATCH v2 5/7] ac14xx: remove obsolete board config items Gerhard Sittig
2013-06-24 20:27 ` Wolfgang Denk
2013-06-05 12:51 ` [U-Boot] [PATCH v2 6/7] ac14xx: use the official product name everywhere Gerhard Sittig
2013-06-24 20:28 ` Wolfgang Denk
2013-06-05 12:51 ` [U-Boot] [PATCH v2 7/7] ac14xx: rephrase network boot config for development Gerhard Sittig
2013-06-24 20:28 ` Wolfgang Denk
2013-06-21 18:14 ` [U-Boot] [PATCH v2 0/7] cleanup in the 'ifm AC14xx' board support Gerhard Sittig
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=51AC9ACD.1030903@denx.de \
--to=sbabic@denx.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.