summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-08-15 08:24:38 -0500
committerWolfgang Denk <wd@denx.de>2008-08-26 23:37:12 +0200
commit06a09918f3903450313e2047a9cc258bf5872f46 (patch)
treef50aae73f141736628c05ea4e3f42e33292572a4 /common/cmd_bootm.c
parentc4f9419c6b54958e0eddbcbc9e5a4a7b7ec99865 (diff)
downloadu-boot-imx-06a09918f3903450313e2047a9cc258bf5872f46.zip
u-boot-imx-06a09918f3903450313e2047a9cc258bf5872f46.tar.gz
u-boot-imx-06a09918f3903450313e2047a9cc258bf5872f46.tar.bz2
bootm: refactor fdt locating and relocation code
Move the code that handles finding a device tree blob and relocating it (if needed) into common code so all arch's have access to it. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 56236b9..9a745f1 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -258,6 +258,16 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
puts ("Ramdisk image is corrupt\n");
return 1;
}
+
+#if defined(CONFIG_OF_LIBFDT)
+ /* find flattened device tree */
+ ret = boot_get_fdt (flag, argc, argv, &images,
+ &images.ft_addr, &images.ft_len);
+ if (ret) {
+ puts ("Could not find a valid device tree\n");
+ return 1;
+ }
+#endif
}
image_start = (ulong)os_hdr;