diff options
| author | Kumar Gala <galak@kernel.crashing.org> | 2008-08-15 08:24:38 -0500 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2008-08-26 23:37:12 +0200 | 
| commit | 06a09918f3903450313e2047a9cc258bf5872f46 (patch) | |
| tree | f50aae73f141736628c05ea4e3f42e33292572a4 /common/cmd_bootm.c | |
| parent | c4f9419c6b54958e0eddbcbc9e5a4a7b7ec99865 (diff) | |
| download | olio-uboot-2014.01-06a09918f3903450313e2047a9cc258bf5872f46.tar.xz olio-uboot-2014.01-06a09918f3903450313e2047a9cc258bf5872f46.zip | |
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.c | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 56236b913..9a745f1e2 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; |