summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-02-20 19:05:52 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2008-02-20 19:05:52 +0100
commit0dd247729a7b59e9b064600ae11981fd31cd3752 (patch)
tree7d4e6531f05112fbbf825d3067a33389a929629a /common
parente94d8d3a89b61db36c95f1c1c14092db03712bd7 (diff)
parent9beb36884bc089b905aba8c1706fa3d8b2c2031e (diff)
downloadbarebox-0dd247729a7b59e9b064600ae11981fd31cd3752.tar.gz
barebox-0dd247729a7b59e9b064600ae11981fd31cd3752.tar.xz
Merge branch 'master' of ssh://sha@octopus/home/git/projects/u-boot-v2
Diffstat (limited to 'common')
-rw-r--r--common/ft_build.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/common/ft_build.c b/common/ft_build.c
index c85082fa14..578a4b8ed3 100644
--- a/common/ft_build.c
+++ b/common/ft_build.c
@@ -20,6 +20,8 @@
*/
#include <common.h>
+#include <boot.h>
+#include <init.h>
#include <malloc.h>
#include <environment.h>
#include <asm/byteorder.h>
@@ -589,3 +591,29 @@ void ft_setup(void *blob, bd_t * bd, ulong initrd_start, ulong initrd_end)
#endif
}
+static int oftree_handler_cmdline_parse(struct image_data *data, int opt,
+ char *optarg)
+{
+ switch(opt) {
+ case 'o':
+ printf("using oftree %s\n", optarg);
+ data->oftree = optarg;
+ return 0;
+ default:
+ return 1;
+ }
+}
+
+static struct image_handler of_handler = {
+ .cmdline_options = "o:",
+ .cmdline_parse = oftree_handler_cmdline_parse,
+ .help_string = " -o <oftree> use oftree",
+};
+
+static int oftree_register_image_handler(void)
+{
+ return register_image_handler(&of_handler);
+}
+
+late_initcall(oftree_register_image_handler);
+