diff mbox

[U-Boot,v4,08/11] binman: Allow configuration options to be used in .dts files

Message ID 1475787582-32106-9-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Oct. 6, 2016, 8:59 p.m. UTC
It is sometimes useful to be able to reference configuration options in a
device tree source file. Add the necessary includes so that this works.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 scripts/Makefile.lib | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Bin Meng Nov. 3, 2016, 4:11 a.m. UTC | #1
Hi Simon,

On Fri, Oct 7, 2016 at 4:59 AM, Simon Glass <sjg@chromium.org> wrote:
> It is sometimes useful to be able to reference configuration options in a
> device tree source file. Add the necessary includes so that this works.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  scripts/Makefile.lib | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 2b31b1a..2539ba5 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -168,6 +168,11 @@ ld_flags       = $(LDFLAGS) $(ldflags-y)
>  dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
>                  -I$(srctree)/arch/$(ARCH)/dts                           \
>                  -I$(srctree)/arch/$(ARCH)/dts/include                   \
> +                -Iinclude                                               \

Is this needed? Should it be the same as -I$(srctree)/include?

> +                -I$(srctree)/include                                    \
> +                -I$(srctree)/arch/$(ARCH)/include                       \
> +                -include $(srctree)/include/linux/kconfig.h             \
> +                -D__ASSEMBLY__                                          \
>                  -undef -D__DTS__
>
>  # Finds the multi-part object the current object will be linked into
> --

Regards,
Bin
Simon Glass Nov. 16, 2016, 12:19 a.m. UTC | #2
Hi Bin,

On 2 November 2016 at 22:11, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Simon,
>
> On Fri, Oct 7, 2016 at 4:59 AM, Simon Glass <sjg@chromium.org> wrote:
>> It is sometimes useful to be able to reference configuration options in a
>> device tree source file. Add the necessary includes so that this works.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v4: None
>> Changes in v3: None
>> Changes in v2: None
>>
>>  scripts/Makefile.lib | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
>> index 2b31b1a..2539ba5 100644
>> --- a/scripts/Makefile.lib
>> +++ b/scripts/Makefile.lib
>> @@ -168,6 +168,11 @@ ld_flags       = $(LDFLAGS) $(ldflags-y)
>>  dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
>>                  -I$(srctree)/arch/$(ARCH)/dts                           \
>>                  -I$(srctree)/arch/$(ARCH)/dts/include                   \
>> +                -Iinclude                                               \
>
> Is this needed? Should it be the same as -I$(srctree)/include?

When build the current directory is the build directory, so 'include'
refers to the include directory there.

>
>> +                -I$(srctree)/include                                    \
>> +                -I$(srctree)/arch/$(ARCH)/include                       \
>> +                -include $(srctree)/include/linux/kconfig.h             \
>> +                -D__ASSEMBLY__                                          \
>>                  -undef -D__DTS__
>>
>>  # Finds the multi-part object the current object will be linked into
>> --

Regards,
Simon
diff mbox

Patch

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 2b31b1a..2539ba5 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -168,6 +168,11 @@  ld_flags       = $(LDFLAGS) $(ldflags-y)
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
 		 -I$(srctree)/arch/$(ARCH)/dts                           \
 		 -I$(srctree)/arch/$(ARCH)/dts/include                   \
+		 -Iinclude                                               \
+		 -I$(srctree)/include                                    \
+		 -I$(srctree)/arch/$(ARCH)/include                       \
+		 -include $(srctree)/include/linux/kconfig.h             \
+		 -D__ASSEMBLY__                                          \
 		 -undef -D__DTS__
 
 # Finds the multi-part object the current object will be linked into