summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-02-27 13:26:16 -0700
committerSimon Glass <sjg@chromium.org>2014-03-17 20:05:48 -0600
commitbda7773f044a13cf69cbbcb016285dd217b981c3 (patch)
tree72fcc9a8ce7f2651656c761096764b1452327349 /arch/sandbox/cpu
parent47f5fcfb4169a8ff6e8c81738b77f8572f972e75 (diff)
downloadtalos-obmc-uboot-bda7773f044a13cf69cbbcb016285dd217b981c3.tar.gz
talos-obmc-uboot-bda7773f044a13cf69cbbcb016285dd217b981c3.zip
sandbox: Add -j option to indicate a jump from a previous U-Boot
In order to support the 'go' command we allow the jumping U-Boot to pass its filename to the new U-Boot image. This can then be used to delete that image if required. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Che-Liang Chiou <clchiou@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r--arch/sandbox/cpu/start.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 1df21d49fa..2d19fe795e 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -107,6 +107,22 @@ static int sandbox_cmdline_cb_interactive(struct sandbox_state *state,
SANDBOX_CMDLINE_OPT_SHORT(interactive, 'i', 0, "Enter interactive mode");
+static int sandbox_cmdline_cb_jump(struct sandbox_state *state,
+ const char *arg)
+{
+ state->jumped = 1;
+
+ /*
+ * TODO(sjg@chromium.org): Note this causes problems for gdb which
+ * wants to read debug data from the image.
+ *
+ * os_unlink(arg);
+ */
+
+ return 0;
+}
+SANDBOX_CMDLINE_OPT_SHORT(jump, 'j', 1, "Jumped from previous U-Boot");
+
static int sandbox_cmdline_cb_memory(struct sandbox_state *state,
const char *arg)
{
OpenPOWER on IntegriCloud