[U-Boot] [PATCH v2 03/63] spl: Makefile: Define SPL_ earlier

Simon Glass sjg at chromium.org
Sun Apr 2 23:24:22 UTC 2017


Hi Masahiro,

On 19 December 2016 at 00:43, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> Hi Simon,
>
>
> 2016-11-20 5:24 GMT+09:00 Simon Glass <sjg at 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 at 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


More information about the U-Boot mailing list