Merge "Add boot command."
diff --git a/board/ruby/ruby.c b/board/ruby/ruby.c
index 3d6947b..ee014c2 100644
--- a/board/ruby/ruby.c
+++ b/board/ruby/ruby.c
@@ -201,6 +201,39 @@
 #ifdef CONFIG_CMD_HNVRAM
         RUN("hnvram load");
 #endif
+
+#ifdef GFRG240
+	char cmd[320];
+	sprintf(cmd, "if test xx$HNV_ACTIVATED_KERNEL_NAME = xxkernel1; "
+	  "then gfkernel=0x%08x otherkernel=0x%08x; "
+	  "else gfkernel=0x%08x otherkernel=0x%08x; fi; "
+	  "loadaddr=0x%08x; kernelsize=0x%08x; ",
+	  UBOOT_PARTITION_OFFSET_KERNEL1, UBOOT_PARTITION_OFFSET_KERNEL0,
+	  UBOOT_PARTITION_OFFSET_KERNEL0, UBOOT_PARTITION_OFFSET_KERNEL1,
+	  RUBY_KERNEL_LOAD_DRAM_BEGIN,
+	  UBOOT_KERNEL_PARTITION_SIZE);
+	setenv("gfparams", cmd);
+
+	const char *gfboot = "run gfparams; "
+	  "spi_flash read $gfkernel $loadaddr $kernelsize; "
+	  "bootm $loadaddr; ";
+
+	char *env = getenv("gfboot");
+	if (env && strcmp(env, gfboot)) {
+		printf("WARNING: Overriding previously defined 'gfboot'\n");
+	}
+	setenv("gfboot", gfboot);
+
+	env = getenv("bootcmd");
+	if (!env) {
+		setenv("bootcmd", "run gfboot");
+	}
+
+	setenv("otherboot",
+	  "run gfparams; "
+	  "spi_flash read $otherkernel $loadaddr $kernelsize; "
+	  "bootm $loadaddr; ");
+#endif
 	return 0;
 }
 
diff --git a/include/configs/ruby.h b/include/configs/ruby.h
index ffda11b..1f049c4 100644
--- a/include/configs/ruby.h
+++ b/include/configs/ruby.h
@@ -59,6 +59,8 @@
 #define __HAVE_ARCH_MEMCPY
 #define __HAVE_ARCH_MEMCMP
 
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
 /* No flash support */
 #define CONFIG_SYS_NO_FLASH