From d4e5c6b8a03d31c00084d38e40d9811267f00289 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 6 Dec 2011 08:53:26 +0100 Subject: 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 --- arch/blackfin/lib/blackfin_linux.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'arch/blackfin/lib') 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 #include #include +#include #include #include @@ -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) -- cgit v1.2.3