bootm: Set working fdt address as part of the bootm flow

Set the fdt working address so "fdt FOO" commands can be used as part
of the bootm flow.  Also set an the environment variable "fdtaddr"
with the value.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 9a745f1..022cef8 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -44,6 +44,12 @@
 #include <hush.h>
 #endif
 
+#if defined(CONFIG_OF_LIBFDT)
+#include <fdt.h>
+#include <libfdt.h>
+#include <fdt_support.h>
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp);
@@ -267,6 +273,8 @@
 			puts ("Could not find a valid device tree\n");
 			return 1;
 		}
+
+		set_working_fdt_addr(images.ft_addr);
 #endif
 	}