[PATCH] U-boot: provide environment option to always stop in the boot menu
Simon Kagstrom
simon.kagstrom at gmail.com
Sun Aug 3 12:42:39 CEST 2008
environment-option-to-stop-in-menu.patch
From: Simon Kagstrom <simon.kagstrom at gmail.com>
Add a U-boot environment option ("stop_in_menu") which, if set to 'yes', will
always stop the board in the U-boot menu. Reduces the wear on the AUX
button for me at least :-)
Signed-off-by: Simon Kagstrom <simon.kagstrom at gmail.com>
---
board/neo1973/gta02/gta02.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/board/neo1973/gta02/gta02.c b/board/neo1973/gta02/gta02.c
index 3d8f14e..35edbc9 100644
--- a/board/neo1973/gta02/gta02.c
+++ b/board/neo1973/gta02/gta02.c
@@ -535,7 +535,12 @@ woken_by_reset:
while (neo1973_wakeup_cause == NEO1973_WAKEUP_RESET ||
neo1973_on_key_pressed()) {
- if (neo1973_aux_key_pressed())
+ char *s = getenv("stop_in_menu");
+
+ /* If the AUX key is pressed or the stop_in_menu environment
+ * variable is set, enter the boot menu */
+ if (neo1973_aux_key_pressed() ||
+ (s && strcmp(s, "yes") == 0) )
menu_vote++;
else
menu_vote--;
More information about the openmoko-kernel
mailing list