[new uImage] Add new uImage format support to arch specific do_bootm_linux() routines

This patch updates architecture specific implementations of
do_bootm_linux() adding new uImage format handling for
operations like get kernel entry point address, get kernel
image data start address.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
diff --git a/lib_i386/bootm.c b/lib_i386/bootm.c
index b4a52fa..107ebaa 100644
--- a/lib_i386/bootm.c
+++ b/lib_i386/bootm.c
@@ -40,11 +40,15 @@
 	ulong		ep;
 	image_header_t	*hdr;
 	int		ret;
+#if defined(CONFIG_FIT)
+	const void	*data;
+	size_t		len;
+#endif
 
 	ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_I386,
 			&initrd_start, &initrd_end);
 	if (ret)
-		do_reset (cmdtp, flag, argc, argv);
+		goto error;
 
 	if (images->legacy_hdr_valid) {
 		hdr = images->legacy_hdr_os;
@@ -58,12 +62,18 @@
 		}
 #if defined(CONFIG_FIT)
 	} else if (images->fit_uname_os) {
-		fit_unsupported_reset ("I386 linux bootm");
-		do_reset (cmdtp, flag, argc, argv);
+		ret = fit_image_get_data (images->fit_hdr_os,
+					images->fit_noffset_os, &data, &len);
+		if (ret) {
+			puts ("Can't get image data/size!\n");
+			goto error;
+		}
+		os_data = (ulong)data;
+		os_len = (ulong)len;
 #endif
 	} else {
 		puts ("Could not find kernel image!\n");
-		do_reset (cmdtp, flag, argc, argv);
+		goto error;
 	}
 
 	base_ptr = load_zimage ((void*)os_data, os_len,
@@ -71,7 +81,7 @@
 
 	if (NULL == base_ptr) {
 		printf ("## Kernel loading failed ...\n");
-		do_reset(cmdtp, flag, argc, argv);
+		goto error;
 
 	}
 
@@ -87,5 +97,11 @@
 	printf("\nStarting kernel ...\n\n");
 
 	boot_zimage(base_ptr);
+	/* does not return */
+	return;
 
+error:
+	if (images->autostart)
+		do_reset (cmdtp, flag, argc, argv);
+	return;
 }