diff mbox series

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

Message ID 20190531032536.20897-1-peng.fan@nxp.com
State Superseded
Delegated to: Simon Glass
Headers show
Series [U-Boot] lib: Makefile: build fdtdec_common.c when OF_LIBFDT selected | expand

Commit Message

Peng Fan May 31, 2019, 3:11 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.

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

Comments

Heinrich Schuchardt May 31, 2019, 5:28 p.m. UTC | #1
On 5/31/19 5:11 AM, 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.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>   lib/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 09c45b8122..66ab6295a5 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_OF_LIBFDT) += fdtdec.o fdtdec_common.o

Shouldn't this be CONFIG_$(SPL_TPL_)OF_LIBFDT?

Regards

Heinrich

>   obj-y += hang.o
>   obj-y += linux_compat.o
>   obj-y += linux_string.o
>
Peng Fan June 6, 2019, 2:48 a.m. UTC | #2
> Subject: Re: [PATCH] lib: Makefile: build fdtdec_common.c when OF_LIBFDT
> selected
> 
> On 5/31/19 5:11 AM, 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.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >   lib/Makefile | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/Makefile b/lib/Makefile index 09c45b8122..66ab6295a5
> > 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_OF_LIBFDT) += fdtdec.o fdtdec_common.o
> 
> Shouldn't this be CONFIG_$(SPL_TPL_)OF_LIBFDT?

You are right. I'll use this and do a CI build. If no issue,
I'll post out v2.

Thanks,
Peng

> 
> Regards
> 
> Heinrich
> 
> >   obj-y += hang.o
> >   obj-y += linux_compat.o
> >   obj-y += linux_string.o
> >
diff mbox series

Patch

diff --git a/lib/Makefile b/lib/Makefile
index 09c45b8122..66ab6295a5 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_OF_LIBFDT) += fdtdec.o fdtdec_common.o
 obj-y += hang.o
 obj-y += linux_compat.o
 obj-y += linux_string.o