[U-Boot] [PATCH 12/15] kbuild: use shorten logs for IMX images
Simon Glass
sjg at chromium.org
Wed Feb 26 00:48:44 CET 2014
Hi Masahiro,
On 23 February 2014 18:58, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
> Hello Simon,
>
> Thanks for your close review.
> This is always appreciated.
>
>
>> > diff --git a/spl/Makefile b/spl/Makefile
>> > index 22d6323..e8c5938 100644
>> > --- a/spl/Makefile
>> > +++ b/spl/Makefile
>> > @@ -178,8 +178,8 @@ MKIMAGEFLAGS_MLO.byteswap = -T omapimage -n byteswap -a $(CONFIG_SPL_TEXT_BASE)
>> > MLO MLO.byteswap: $(obj)/u-boot-spl.bin
>> > $(call if_changed,mkimage)
>> >
>> > -$(objtree)/SPL: $(obj)/u-boot-spl.bin
>> > - $(Q)$(MAKE) $(build)=spl/arch/arm/imx-common $@
>> > +SPL: $(obj)/u-boot-spl.bin
>> > + $(Q)$(MAKE) $(build)=arch/arm/imx-common $@
>>
>> This series looks good to me, but I would like to understand what is
>> happening here. Are you changing it to pick up the source from the
>> real arch/ directory instead of the spl copy?
>
> Two things are happening here:
> [1] drop $(objtree)/
> [2] modify $(build)=spl/arch/arm/imx-commot to
> $(build)=arch/arm/imx-common
>
> Let me explain the reason of each one by one.
>
> [1]
> $(objtree) ( and $(OBJTREE)) points to the absolute path of the
> working directory.
>
> I want short log should be like:
> UIMAGE SPL
> rather than
> UIMAGE /home/yamada/workspace/SPL
>
> That's why I dropped $(objtree)/ and $(OBJTREE)/ prefixes
> from all IMX related images.
>
> [2]
> I guess it's difficult to understand what's happening here.
> I hope the following explanation will be clear for you..
>
> At this commit,
> Both ./Makefile and spl/Makefile descend into arch/arm/imx-common.
>
>
> From the ./Makefile, here
>
> u-boot.imx: u-boot.bin
> $(Q)$(MAKE) $(build)=arch/arm/imx-common $@
>
> u-boot-with-spl.imx u-boot-with-nand-spl.imx: spl/u-boot-spl.bin u-boot.bin
> $(Q)$(MAKE) $(build)=arch/arm/imx-common $@
>
>
> And from spl/Makefile, here
>
> SPL: $(obj)/u-boot-spl.bin
> $(Q)$(MAKE) $(build)=arch/arm/imx-common $@
>
>
> I needed to specify "$(build)=arch/arm/imx-common" consistenty
> to include ".*.cmd" files correctly.
>
> I added
> targets += $(addprefix ../../../,$(IMX_CONFIG) SPL u-boot.uim spl/u-boot-nand-spl.imx)
> at the end of arch/arm/imx-common/Makefile.
> (It may look weird. )
>
> And it is prefixed (obj)/ at scripts/Makefile.lib line 76
> targets := $(addprefix $(obj)/,$(targets))
>
> If I had not changed "$(build)=spl/arm/arm/imx-common",
> $(targets) would have pointed to "spl/arch/arm/imx-common/../../../SPL),
> that is, "spl/SPL".
> But .SPL.cmd is not in spl/ directory.
>
>
>
> Anyway, it is really complicated to descend into arch/arm/imx-common
> from two Makefiles, ./Makefile and spl/Makefile.
>
> So I moved the SPL rule from spl/Makefile to ./Makefile.
Sorry I didn't reply earlier when I first read this, it looks good.
Thanks for the detailed explanation.
Regards,
Simon
More information about the U-Boot
mailing list