summaryrefslogtreecommitdiffstats
path: root/arch/ppc/lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-12-06 08:53:26 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-12-15 11:07:11 +0100
commitd4e5c6b8a03d31c00084d38e40d9811267f00289 (patch)
tree501db64efe6c21d7e8a254eb4e478838ff8c9446 /arch/ppc/lib
parent390249968c4eeaceddd26a1cdeca5728f5b87b18 (diff)
downloadbarebox-d4e5c6b8a03d31c00084d38e40d9811267f00289.tar.gz
barebox-d4e5c6b8a03d31c00084d38e40d9811267f00289.tar.xz
bootm: use new uimage code
This switches the bootm code to the new uimage code. Also bootm can now handle other types of images than uImages. Currently the only architecture making use of this is arm which allows to boot zImages, raw images and barebox images. I intended to make a more bisectable series from this but I failed becuase there are many dependencies and no matter how I tried the patches grew bigger and and bigger. So I decided to put this all in a single patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc/lib')
-rw-r--r--arch/ppc/lib/ppclinux.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/ppc/lib/ppclinux.c b/arch/ppc/lib/ppclinux.c
index f7d3950603..3c1b3fa006 100644
--- a/arch/ppc/lib/ppclinux.c
+++ b/arch/ppc/lib/ppclinux.c
@@ -11,18 +11,15 @@
#include <errno.h>
#include <fs.h>
-#ifdef CONFIG_OF_FLAT_TREE
-#include <ft_build.h>
-#endif
-extern bd_t *bd;
-
static int do_bootm_linux(struct image_data *data)
{
void (*kernel)(void *, void *, unsigned long,
unsigned long, unsigned long);
- struct image_header *os_header = &data->os->header;
- kernel = (void *)image_get_ep(os_header);
+ if (!data->os_res)
+ return -EINVAL;
+
+ kernel = (void *)(data->os_address + data->os_entry);
/*
* Linux Kernel Parameters (passing device tree):
@@ -41,8 +38,10 @@ static int do_bootm_linux(struct image_data *data)
}
static struct image_handler handler = {
+ .name = "PowerPC Linux",
.bootm = do_bootm_linux,
- .image_type = IH_OS_LINUX,
+ .filetype = filetype_uimage,
+ .ih_os = IH_OS_LINUX,
};
static int ppclinux_register_image_handler(void)
@@ -51,4 +50,3 @@ static int ppclinux_register_image_handler(void)
}
late_initcall(ppclinux_register_image_handler);
-