[v2,03/63] spl: Makefile: Define SPL_ earlier

Message ID CAK7LNASq5bMQ3PT=5wW1h4+PJaEkW=guKG_3NbBRtZxzi64o3A@mail.gmail.com
State New
Headers show

Commit Message

Masahiro Yamada Dec. 19, 2016, 7:43 a.m.
Hi Simon,


2016-11-20 5:24 GMT+09:00 Simon Glass <sjg@chromium.org>:
> This Makefile variable can be used in the architecture's main Makefile but

> at present it is not set up until later. Set it just before this Makefile is

> included.

>

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

> ---

>

> Changes in v2: None

>

>  scripts/Makefile.spl | 6 ++++++

>  1 file changed, 6 insertions(+)

>

> diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl

> index 03a2f06..f490e29 100644

> --- a/scripts/Makefile.spl

> +++ b/scripts/Makefile.spl

> @@ -35,6 +35,12 @@ else

>  SPL_BIN := u-boot-spl

>  endif

>

> +ifdef CONFIG_SPL_BUILD

> +SPL_ := SPL_

> +else

> +SPL_ :=

> +endif

> +

>  include $(srctree)/config.mk

>  include $(srctree)/arch/$(ARCH)/Makefile

>



In scripts/Makefile.spl, CONFIG_SPL_BUILD is always defined.

So, I think your patch is equivalent to:

>  SPL_BIN := u-boot-spl

>  endif

>

> +SPL_ := SPL_

> +

>  include $(srctree)/config.mk

>  include $(srctree)/arch/$(ARCH)/Makefile






But, more simply, does the following patch work for you?

(just move Kbuild.include below autoconf.mk)







-- 
Best Regards
Masahiro Yamada
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Comments

Simon Glass April 2, 2017, 11:24 p.m. | #1
Hi Masahiro,

On 19 December 2016 at 00:43, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Hi Simon,
>
>
> 2016-11-20 5:24 GMT+09:00 Simon Glass <sjg@chromium.org>:
>> This Makefile variable can be used in the architecture's main Makefile but
>> at present it is not set up until later. Set it just before this Makefile is
>> included.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2: None
>>
>>  scripts/Makefile.spl | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
>> index 03a2f06..f490e29 100644
>> --- a/scripts/Makefile.spl
>> +++ b/scripts/Makefile.spl
>> @@ -35,6 +35,12 @@ else
>>  SPL_BIN := u-boot-spl
>>  endif
>>
>> +ifdef CONFIG_SPL_BUILD
>> +SPL_ := SPL_
>> +else
>> +SPL_ :=
>> +endif
>> +
>>  include $(srctree)/config.mk
>>  include $(srctree)/arch/$(ARCH)/Makefile
>>
>
>
> In scripts/Makefile.spl, CONFIG_SPL_BUILD is always defined.
>
> So, I think your patch is equivalent to:
>
>>  SPL_BIN := u-boot-spl
>>  endif
>>
>> +SPL_ := SPL_
>> +
>>  include $(srctree)/config.mk
>>  include $(srctree)/arch/$(ARCH)/Makefile
>
>
>
>
>
> But, more simply, does the following patch work for you?
>
> (just move Kbuild.include below autoconf.mk)
>
>
>
> diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
> index f379713..90fea0a 100644
> --- a/scripts/Makefile.spl
> +++ b/scripts/Makefile.spl
> @@ -19,11 +19,11 @@ src := $(obj)
>  # Create output directory if not already present
>  _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
>
> -include $(srctree)/scripts/Kbuild.include
> -
>  -include include/config/auto.conf
>  -include $(obj)/include/autoconf.mk
>
> +include $(srctree)/scripts/Kbuild.include
> +
>  KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD
>  ifeq ($(CONFIG_TPL_BUILD),y)
>  KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD

Just to close this thread, I think this was due to a misunderstand and
in fact you are right - I think this change was not needed

Regards,
Simon

Patch hide | download patch | download mbox

diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index f379713..90fea0a 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -19,11 +19,11 @@  src := $(obj)
 # Create output directory if not already present
 _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))

-include $(srctree)/scripts/Kbuild.include
-
 -include include/config/auto.conf
 -include $(obj)/include/autoconf.mk

+include $(srctree)/scripts/Kbuild.include
+
 KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD
 ifeq ($(CONFIG_TPL_BUILD),y)
 KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD