summaryrefslogtreecommitdiff
path: root/common/image-fdt.c
diff options
context:
space:
mode:
authorSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>2018-12-17 20:14:42 +0100
committerTom Rini <trini@konsulko.com>2019-01-14 17:42:32 -0500
commit596be5f3274ff674f526b77f75064f0495aff693 (patch)
treeccb045332d3cee18537bbdd15726b51ede516e6e /common/image-fdt.c
parenteddb7278d790ceaa4a0e8c578240f999f11737b7 (diff)
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>
Diffstat (limited to 'common/image-fdt.c')
-rw-r--r--common/image-fdt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 95748f0ae1..8ee5a13352 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -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: