diff options
author | Bartlomiej Sieka <tur@semihalf.com> | 2008-03-26 09:38:06 +0100 |
---|---|---|
committer | Bartlomiej Sieka <tur@semihalf.com> | 2008-03-26 09:38:06 +0100 |
commit | 27f33e9f45ef7f9685cbdc65066a1828e85dde4f (patch) | |
tree | 5828044d71e5caa3bec4d05c6c48793df0cd17a3 /lib_blackfin | |
parent | 18e69a35efbb078403db0c0063986470dad7d082 (diff) | |
parent | 388b82fddc7c05596f3f615f190da0448227dc82 (diff) | |
download | u-boot-imx-27f33e9f45ef7f9685cbdc65066a1828e85dde4f.zip u-boot-imx-27f33e9f45ef7f9685cbdc65066a1828e85dde4f.tar.gz u-boot-imx-27f33e9f45ef7f9685cbdc65066a1828e85dde4f.tar.bz2 |
Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing
Conflicts:
common/cmd_bootm.c
cpu/mpc8xx/cpu.c
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Diffstat (limited to 'lib_blackfin')
-rw-r--r-- | lib_blackfin/Makefile | 21 | ||||
-rw-r--r-- | lib_blackfin/bootm.c (renamed from lib_blackfin/bf533_linux.c) | 37 |
2 files changed, 47 insertions, 11 deletions
diff --git a/lib_blackfin/Makefile b/lib_blackfin/Makefile index a7aaef7..dfaed6d 100644 --- a/lib_blackfin/Makefile +++ b/lib_blackfin/Makefile @@ -29,12 +29,21 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(ARCH).a -SOBJS = memcpy.o memcmp.o memset.o memmove.o - -COBJS = post.o tests.o board.o bf533_linux.o bf533_string.o cache.o muldi3.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SOBJS-y += memcmp.o +SOBJS-y += memcpy.o +SOBJS-y += memmove.o +SOBJS-y += memset.o + +COBJS-y += bf533_string.o +COBJS-y += board.o +COBJS-y += bootm.o +COBJS-y += cache.o +COBJS-y += muldi3.o +COBJS-y += post.o +COBJS-y += tests.o + +SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) $(LIB): $(obj).depend $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) diff --git a/lib_blackfin/bf533_linux.c b/lib_blackfin/bootm.c index 80a3dc7..1ea80f4 100644 --- a/lib_blackfin/bf533_linux.c +++ b/lib_blackfin/bootm.c @@ -42,22 +42,42 @@ extern void swap_to(int device_id); #endif -extern image_header_t header; extern void flush_instruction_cache(void); extern void flush_data_cache(void); static char *make_command_line(void); void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], - ulong addr, ulong * len_ptr, int verify) + bootm_headers_t *images) { - int (*appl) (char *cmdline); - char *cmdline; + int (*appl) (char *cmdline); + char *cmdline; + ulong ep = 0; + + if (!images->autostart) + return ; #ifdef SHARED_RESOURCES swap_to(FLASH); #endif - appl = (int (*)(char *))ntohl(header.ih_ep); + /* find kernel entry point */ + if (images->legacy_hdr_valid) { + ep = image_get_ep (images->legacy_hdr_os); +#if defined(CONFIG_FIT) + } else if (images->fit_uname_os) { + int ret = fit_image_get_entry (images->fit_hdr_os, + images->fit_noffset_os, &ep); + if (ret) { + puts ("Can't get entry point property!\n"); + goto error; + } +#endif + } else { + puts ("Could not find kernel entry point!\n"); + goto error; + } + appl = (int (*)(char *))ep; + printf("Starting Kernel at = %x\n", appl); cmdline = make_command_line(); if (icache_status()) { @@ -69,6 +89,13 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], dcache_disable(); } (*appl) (cmdline); + /* does not return */ + return; + +error: + if (images->autostart) + do_reset (cmdtp, flag, argc, argv); + return; } char *make_command_line(void) |