diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-06 08:53:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-15 11:07:11 +0100 |
commit | d4e5c6b8a03d31c00084d38e40d9811267f00289 (patch) | |
tree | 501db64efe6c21d7e8a254eb4e478838ff8c9446 /arch/blackfin/lib | |
parent | 390249968c4eeaceddd26a1cdeca5728f5b87b18 (diff) | |
download | barebox-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/blackfin/lib')
-rw-r--r-- | arch/blackfin/lib/blackfin_linux.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/blackfin/lib/blackfin_linux.c b/arch/blackfin/lib/blackfin_linux.c index 9da9ec4e58..458d1b180b 100644 --- a/arch/blackfin/lib/blackfin_linux.c +++ b/arch/blackfin/lib/blackfin_linux.c @@ -34,6 +34,7 @@ #include <asm/byteorder.h> #include <asm/cpu.h> #include <asm/blackfin.h> +#include <errno.h> #include <init.h> #include <boot.h> @@ -44,10 +45,11 @@ static int do_bootm_linux(struct image_data *idata) int (*appl)(char *cmdline); const char *cmdline = getenv("bootargs"); char *cmdlinedest = (char *) CMD_LINE_ADDR; - struct image_handle *os_handle = idata->os; - image_header_t *os_header = &os_handle->header; - appl = (int (*)(char *))image_get_ep(os_header); + if (!idata->os_res) + return -EINVAL; + + appl = (void *)(idata->os_address + idata->os_entry); printf("Starting Kernel at 0x%p\n", appl); icache_disable(); @@ -63,8 +65,10 @@ static int do_bootm_linux(struct image_data *idata) } static struct image_handler handler = { + .name = "Blackfin Linux", .bootm = do_bootm_linux, - .image_type = IH_OS_LINUX, + .filetype = filetype_uimage, + .ih_os = IH_OS_LINUX, }; static int bfinlinux_register_image_handler(void) |