From 06a09918f3903450313e2047a9cc258bf5872f46 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 15 Aug 2008 08:24:38 -0500 Subject: 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 --- common/cmd_bootm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'common/cmd_bootm.c') 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; -- cgit v1.1