From 7ae2c6261b7d095b852cc10ee5aac052c8bd38fd Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 13 Apr 2012 15:08:04 +0800 Subject: bootm: add uimage binfmt support Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- commands/bootm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'commands') 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 #include #include +#include #include 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 -- cgit v1.2.3