aboutsummaryrefslogtreecommitdiff
path: root/board/inversepath
diff options
context:
space:
mode:
authorAndrej Rosano <andrej@inversepath.com>2016-06-20 17:21:49 +0200
committerStefano Babic <sbabic@denx.de>2016-07-12 17:58:50 +0200
commita02ab5eaff966ecf746bc4e90696c84efb4b113b (patch)
tree54d9d8ccc8c12632d27bc6221f5c7b3675761d18 /board/inversepath
parent9a45ec3ea0858026d5715f16e3bdb596057f727e (diff)
downloadu-boot-a02ab5eaff966ecf746bc4e90696c84efb4b113b.zip
u-boot-a02ab5eaff966ecf746bc4e90696c84efb4b113b.tar.gz
u-boot-a02ab5eaff966ecf746bc4e90696c84efb4b113b.tar.bz2
usbarmory: Add board_run_command() function
Define a default board_run_command() function. This function contains the commands needed to boot the board when CLI is disabled (CONFIG_CMDLINE=n). Signed-off-by: Andrej Rosano <andrej@inversepath.com>
Diffstat (limited to 'board/inversepath')
-rw-r--r--board/inversepath/usbarmory/usbarmory.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c
index a809039..c875e78 100644
--- a/board/inversepath/usbarmory/usbarmory.c
+++ b/board/inversepath/usbarmory/usbarmory.c
@@ -415,3 +415,34 @@ int checkboard(void)
puts("Board: Inverse Path USB armory MkI\n");
return 0;
}
+
+#ifndef CONFIG_CMDLINE
+static char *ext2_argv[] = {
+ "ext2load",
+ "mmc",
+ "0:1",
+ USBARMORY_FIT_ADDR,
+ USBARMORY_FIT_PATH
+};
+
+static char *bootm_argv[] = {
+ "bootm",
+ USBARMORY_FIT_ADDR
+};
+
+int board_run_command(const char *cmdline)
+{
+ printf("%s %s %s %s %s\n", ext2_argv[0], ext2_argv[1], ext2_argv[2],
+ ext2_argv[3], ext2_argv[4]);
+
+ if (do_ext2load(NULL, 0, 5, ext2_argv) != 0) {
+ udelay(5*1000*1000);
+ return 1;
+ }
+
+ printf("%s %s\n", bootm_argv[0], bootm_argv[1]);
+ do_bootm(NULL, 0, 2, bootm_argv);
+
+ return 1;
+}
+#endif