[new uImage] Add proper ramdisk/FDT handling when FIT configuration is used

Save FIT configuration provied in the first bootm argument and use it
when to get ramdisk/FDT subimages when second and third (ramdisk/FDT)
arguments are not specified.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index e95c5dd..2f232e7 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -469,7 +469,7 @@
 	const char	*fit_uname_kernel = NULL;
 	const void	*data;
 	size_t		len;
-	int		conf_noffset;
+	int		cfg_noffset;
 	int		os_noffset;
 #endif
 
@@ -548,13 +548,19 @@
 			 * fit_conf_get_node() will try to find default config node
 			 */
 			show_boot_progress (101);
-			conf_noffset = fit_conf_get_node (fit_hdr, fit_uname_config);
-			if (conf_noffset < 0) {
+			cfg_noffset = fit_conf_get_node (fit_hdr, fit_uname_config);
+			if (cfg_noffset < 0) {
 				show_boot_progress (-101);
 				return NULL;
 			}
+			/* save configuration uname provided in the first
+			 * bootm argument
+			 */
+			images->fit_uname_cfg = fdt_get_name (fit_hdr, cfg_noffset, NULL);
+			printf ("   Using '%s' configuration\n", images->fit_uname_cfg);
+			show_boot_progress (103);
 
-			os_noffset = fit_conf_get_kernel_node (fit_hdr, conf_noffset);
+			os_noffset = fit_conf_get_kernel_node (fit_hdr, cfg_noffset);
 			fit_uname_kernel = fit_get_name (fit_hdr, os_noffset, NULL);
 		} else {
 			/* get kernel component image node offset */