mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
image: fix compiling without CMD_FDT
Booting an image currently sets the environment variable "fdtaddr" by calling into 'cmd/fdt.c'. As a result, linking U-Boot fails if CMD_FDT is not enabled. Fix this by adding 'if (CONFIG_IS_ENABLED(CMD_FDT))' to the two places where 'set_working_fdt_addr()' is called. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
This commit is contained in:
parent
eddb7278d7
commit
596be5f327
2 changed files with 4 additions and 2 deletions
|
@ -262,7 +262,8 @@ int bootm_find_images(int flag, int argc, char * const argv[])
|
|||
puts("Could not find a valid device tree\n");
|
||||
return 1;
|
||||
}
|
||||
set_working_fdt_addr(map_to_sysmem(images.ft_addr));
|
||||
if (CONFIG_IS_ENABLED(CMD_FDT))
|
||||
set_working_fdt_addr(map_to_sysmem(images.ft_addr));
|
||||
#endif
|
||||
|
||||
#if IMAGE_ENABLE_FIT
|
||||
|
|
|
@ -193,7 +193,8 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
|
|||
*of_flat_tree = of_start;
|
||||
*of_size = of_len;
|
||||
|
||||
set_working_fdt_addr(map_to_sysmem(*of_flat_tree));
|
||||
if (CONFIG_IS_ENABLED(CMD_FDT))
|
||||
set_working_fdt_addr(map_to_sysmem(*of_flat_tree));
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
|
Loading…
Reference in a new issue