diff options
author | Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> | 2018-12-17 22:14:42 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-01-15 01:42:32 +0300 |
commit | 596be5f3274ff674f526b77f75064f0495aff693 (patch) | |
tree | ccb045332d3cee18537bbdd15726b51ede516e6e /common/bootm.c | |
parent | eddb7278d790ceaa4a0e8c578240f999f11737b7 (diff) | |
download | u-boot-596be5f3274ff674f526b77f75064f0495aff693.tar.xz |
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/bootm.c')
-rw-r--r-- | common/bootm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/bootm.c b/common/bootm.c index 8bf84ebcb7..80f304ce9f 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -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 |