summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2010-01-18 16:37:44 +0800
committerTerry Lv <r65388@freescale.com>2010-01-18 16:42:39 +0800
commitef152c3b768e8e579b5ce7646ffd39d8434f4812 (patch)
treea9ed12aac5cdbec0ffc5c067177799dfff77c3af
parent500602a8e6915780ffe3ecb71807b19c9148806b (diff)
downloadu-boot-imx-ef152c3b768e8e579b5ce7646ffd39d8434f4812.zip
u-boot-imx-ef152c3b768e8e579b5ce7646ffd39d8434f4812.tar.gz
u-boot-imx-ef152c3b768e8e579b5ce7646ffd39d8434f4812.tar.bz2
ENGR00120208: Change recovery mode boot_cmd strategy
The new strategy will be: bootargs_android_recovery and bootcmd_android_recovery will be checked. If they exists, their values will be used by bootargs_android and bootcmd_android, or the default vaules will be used. Signed-off-by: Terry Lv <r65388@freescale.com>
-rw-r--r--board/freescale/mx51_3stack/mx51_3stack.c12
-rw-r--r--board/freescale/mx51_bbg/mx51_bbg.c14
2 files changed, 17 insertions, 9 deletions
diff --git a/board/freescale/mx51_3stack/mx51_3stack.c b/board/freescale/mx51_3stack/mx51_3stack.c
index e70234a..af5d3df 100644
--- a/board/freescale/mx51_3stack/mx51_3stack.c
+++ b/board/freescale/mx51_3stack/mx51_3stack.c
@@ -703,12 +703,16 @@ static int switch_to_recovery_mode(void)
env = getenv("bootargs_android_recovery");
/* Set env to recovery mode */
if (!env)
- setenv("bootargs_android_recovery", boot_args);
+ setenv("bootargs_android", boot_args);
+ else
+ setenv("bootargs_android", env);
+
env = getenv("bootcmd_android_recovery");
if (!env)
- setenv("bootcmd_android_recovery", boot_cmd);
- setenv("bootcmd", "run bootcmd_android_recovery");
-
+ setenv("bootcmd_android", boot_cmd);
+ else
+ setenv("bootcmd_android", env);
+ setenv("bootcmd", "run bootcmd_android");
return 0;
}
diff --git a/board/freescale/mx51_bbg/mx51_bbg.c b/board/freescale/mx51_bbg/mx51_bbg.c
index e5ac369..b9a4292 100644
--- a/board/freescale/mx51_bbg/mx51_bbg.c
+++ b/board/freescale/mx51_bbg/mx51_bbg.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
*
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
*
* See file CREDITS for list of people who contributed to this
* project.
@@ -806,12 +806,16 @@ inline int switch_to_recovery_mode(void)
env = getenv("bootargs_android_recovery");
/* Set env to recovery mode */
if (!env)
- setenv("bootargs_android_recovery", boot_args);
+ setenv("bootargs_android", boot_args);
+ else
+ setenv("bootargs_android", env);
+
env = getenv("bootcmd_android_recovery");
if (!env)
- setenv("bootcmd_android_recovery", boot_cmd);
- setenv("bootcmd", "run bootcmd_android_recovery");
-
+ setenv("bootcmd_android", boot_cmd);
+ else
+ setenv("bootcmd_android", env);
+ setenv("bootcmd", "run bootcmd_android");
return 0;
}