summaryrefslogtreecommitdiffstats
path: root/commands/bootm.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-04-13 15:08:04 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-04-18 20:14:58 +0800
commit7ae2c6261b7d095b852cc10ee5aac052c8bd38fd (patch)
treea96b7783591709738dd96e49dfe1fc7039d1f869 /commands/bootm.c
parent071ceba1e38f93ba2d937ae7fad037c5a9493655 (diff)
downloadbarebox-7ae2c6261b7d095b852cc10ee5aac052c8bd38fd.tar.gz
barebox-7ae2c6261b7d095b852cc10ee5aac052c8bd38fd.tar.xz
bootm: add uimage binfmt support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'commands/bootm.c')
-rw-r--r--commands/bootm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index 1e1dc52ebf..9e9abe4c8f 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -46,6 +46,7 @@
#include <uncompress.h>
#include <memory.h>
#include <filetype.h>
+#include <binfmt.h>
#include <asm-generic/memory_layout.h>
static LIST_HEAD(handler_list);
@@ -454,6 +455,17 @@ BAREBOX_CMD_END
BAREBOX_MAGICVAR(bootargs, "Linux Kernel parameters");
+static struct binfmt_hook binfmt_uimage_hook = {
+ .type = filetype_uimage,
+ .exec = "bootm",
+};
+
+static int binfmt_uimage_init(void)
+{
+ return binfmt_register(&binfmt_uimage_hook);
+}
+fs_initcall(binfmt_uimage_init);
+
/**
* @file
* @brief Boot support for Linux