Skip to content
Snippets Groups Projects
Commit 14d4c5f3 authored by Gerhard Sittig's avatar Gerhard Sittig Committed by Wolfgang Denk
Browse files

ac14xx: re-order the recovery condition checks


re-order the conditions which make the recovery system startup: combine
those conditions which were explicitly initiated (key press, software
request) and those which post-process error conditions (installer issues)

Signed-off-by: default avatarGerhard Sittig <gsi@denx.de>
parent 527a1c71
No related branches found
No related tags found
No related merge requests found
...@@ -336,8 +336,8 @@ int misc_init_r(void) ...@@ -336,8 +336,8 @@ int misc_init_r(void)
/* /*
* enforce the start of the recovery system when * enforce the start of the recovery system when
* - the appropriate keys were pressed * - the appropriate keys were pressed
* - a previous installation was aborted or has failed
* - "some" external software told us to * - "some" external software told us to
* - a previous installation was aborted or has failed
*/ */
want_recovery = 0; want_recovery = 0;
keys = gpio_querykbd(); keys = gpio_querykbd();
...@@ -347,6 +347,11 @@ int misc_init_r(void) ...@@ -347,6 +347,11 @@ int misc_init_r(void)
printf("detected recovery request (keyboard)\n"); printf("detected recovery request (keyboard)\n");
want_recovery = 1; want_recovery = 1;
} }
s = getenv("want_recovery");
if ((s != NULL) && (*s != '\0')) {
printf("detected recovery request (environment)\n");
want_recovery = 1;
}
s = getenv("install_in_progress"); s = getenv("install_in_progress");
if ((s != NULL) && (*s != '\0')) { if ((s != NULL) && (*s != '\0')) {
printf("previous installation has not completed\n"); printf("previous installation has not completed\n");
...@@ -357,11 +362,6 @@ int misc_init_r(void) ...@@ -357,11 +362,6 @@ int misc_init_r(void)
printf("previous installation has failed\n"); printf("previous installation has failed\n");
want_recovery = 1; want_recovery = 1;
} }
s = getenv("want_recovery");
if ((s != NULL) && (*s != '\0')) {
printf("detected recovery request (environment)\n");
want_recovery = 1;
}
if (want_recovery) { if (want_recovery) {
printf("enforced start of the recovery system\n"); printf("enforced start of the recovery system\n");
setenv("bootcmd", "run recovery"); setenv("bootcmd", "run recovery");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment