summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-04-18 20:42:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-18 20:42:17 +0200
commita7ddbc40865a8ffe716aca686763780febad575c (patch)
tree66084fa9f4ac31bff8a3326198d47930f1ccf7b5 /arch
parent030b5a1ba5bfb5cbbf8ff88f8880184b5fc76354 (diff)
parent2b26b148f4c8633a19bca0cbb96d4393ece8f54e (diff)
downloadbarebox-a7ddbc40865a8ffe716aca686763780febad575c.tar.gz
barebox-a7ddbc40865a8ffe716aca686763780febad575c.tar.xz
Merge branch 'binfmt' of git://git.jcrosoft.org/barebox into next
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/bootm.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 36f4342102..c4a50c301c 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -15,6 +15,7 @@
#include <libbb.h>
#include <magicvar.h>
#include <libfdt.h>
+#include <binfmt.h>
#include <asm/byteorder.h>
#include <asm/setup.h>
@@ -447,14 +448,33 @@ BAREBOX_MAGICVAR(aimage_noverwrite_bootargs, "Disable overwrite of the bootargs
BAREBOX_MAGICVAR(aimage_noverwrite_tags, "Disable overwrite of the tags addr with the one present in aimage");
#endif
+static struct binfmt_hook binfmt_aimage_hook = {
+ .type = filetype_aimage,
+ .exec = "bootm",
+};
+
+static struct binfmt_hook binfmt_arm_zimage_hook = {
+ .type = filetype_arm_zimage,
+ .exec = "bootm",
+};
+
+static struct binfmt_hook binfmt_barebox_hook = {
+ .type = filetype_arm_barebox,
+ .exec = "bootm",
+};
+
static int armlinux_register_image_handler(void)
{
register_image_handler(&barebox_handler);
register_image_handler(&uimage_handler);
register_image_handler(&rawimage_handler);
register_image_handler(&zimage_handler);
- if (IS_BUILTIN(CONFIG_CMD_BOOTM_AIMAGE))
+ if (IS_BUILTIN(CONFIG_CMD_BOOTM_AIMAGE)) {
register_image_handler(&aimage_handler);
+ binfmt_register(&binfmt_aimage_hook);
+ }
+ binfmt_register(&binfmt_arm_zimage_hook);
+ binfmt_register(&binfmt_barebox_hook);
return 0;
}