diff mbox series

[U-Boot,v2] lib: Makefile: build fdtdec_common.c when OF_LIBFDT selected

Message ID 20190606081320.6104-1-peng.fan@nxp.com
State Accepted
Commit d3329f09c7ab6f38a5b481d244f7e96af4a429e8
Delegated to: Tom Rini
Headers show
Series [U-Boot,v2] lib: Makefile: build fdtdec_common.c when OF_LIBFDT selected | expand

Commit Message

Peng Fan June 6, 2019, 7:59 a.m. UTC
When build SPL_OF_PLATDATA on i.MX6, meet issue the fdtdec_get_int
not defined, however fdtdec.c will use fdtdec_get_int, so let's
compile fdtdec_common.c when OF_LIBFDT selected.

Since there is also SPL_OF_LIBFDT, so need to use
CONFIG_$(SPL_TPL_)OF_LIBFDT.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini June 22, 2019, 4:08 p.m. UTC | #1
On Thu, Jun 06, 2019 at 07:59:16AM +0000, Peng Fan wrote:

> When build SPL_OF_PLATDATA on i.MX6, meet issue the fdtdec_get_int
> not defined, however fdtdec.c will use fdtdec_get_int, so let's
> compile fdtdec_common.c when OF_LIBFDT selected.
> 
> Since there is also SPL_OF_LIBFDT, so need to use
> CONFIG_$(SPL_TPL_)OF_LIBFDT.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/lib/Makefile b/lib/Makefile
index 09c45b8122..2fffd68f94 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -88,7 +88,7 @@  obj-y += crc32.o
 obj-$(CONFIG_CRC32C) += crc32c.o
 obj-y += ctype.o
 obj-y += div64.o
-obj-$(CONFIG_OF_LIBFDT) += fdtdec.o
+obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdtdec.o fdtdec_common.o
 obj-y += hang.o
 obj-y += linux_compat.o
 obj-y += linux_string.o