[PATCH 1/5] bootm: ensure the uImage is mapped first to allow option to used it
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Sat Oct 8 10:29:49 EDT 2011
needed for multi image support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
commands/bootm.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/commands/bootm.c b/commands/bootm.c
index 755932b..f0f64cf 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -274,10 +274,7 @@ static int do_bootm(struct command *cmdtp, int argc, char *argv[])
return 0;
default:
- if (!handler_parse_options(&data, opt, optarg))
- continue;
-
- return 1;
+ break;
}
}
@@ -297,6 +294,21 @@ static int do_bootm(struct command *cmdtp, int argc, char *argv[])
goto err_out;
}
+ optind = 0;
+
+ while((opt = getopt(argc, argv, options)) > 0) {
+ switch(opt) {
+ case 'h':
+ case 'n':
+ break;
+ default:
+ if (!handler_parse_options(&data, opt, optarg))
+ continue;
+
+ return 1;
+ }
+ }
+
/*
* We have reached the point of no return: we are going to
* overwrite all exception vector code, so we cannot easily
--
1.7.6.3
More information about the barebox
mailing list