From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] kbuild: Do not append dtb for OF_EMBED case
Date: Thu, 28 Apr 2016 08:24:13 +0200 [thread overview]
Message-ID: <5721AC8D.2050602@monstr.eu> (raw)
In-Reply-To: <CAK7LNASNOiDLMfUWZaRn7JKz7KcDqPiz-ADr6TU2kiRmE-sD-A@mail.gmail.com>
Hi Masahiro,
On 28.4.2016 07:54, Masahiro Yamada wrote:
> Hi Michal,
> (+cc Simon)
>
> 2016-04-27 21:28 GMT+09:00 Michal Simek <michal.simek@xilinx.com>:
>> dtb is already included in binary that's why there is no need to replace
>> u-boot-spl.bin with u-boot-spl-dtb.bin. This is only needed for
>> OF_SEPARATE is enabled. Only copy -nodtb.bin version which is straight
>> output from objcopy -O binary.
>
> Correct.
>
> (But, as you know, fdtgrep does not work for OF_EMBED,
> so this is only useful when SPL has enough memory footprint.)
That's fine and it is reasonable limitation.
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>> scripts/Makefile.spl | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
>> index 44242842db31..79c680c1d62f 100644
>> --- a/scripts/Makefile.spl
>> +++ b/scripts/Makefile.spl
>> @@ -170,12 +170,17 @@ $(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN)-nodtb.bin $(obj)/$(SPL_BIN)-pad.bin
>> $(obj)/$(SPL_BIN).dtb FORCE
>> $(call if_changed,cat)
>>
>> +ifeq ($(CONFIG_OF_SEPARATE),y)
>> $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-dtb.bin FORCE
>> $(call if_changed,copy)
>> else
>> $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-nodtb.bin FORCE
>> $(call if_changed,copy)
>> endif
>> +else
>> +$(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-nodtb.bin FORCE
>> + $(call if_changed,copy)
>> +endif
>>
>> # Create a file that pads from the end of u-boot-spl-nodtb.bin to bss_end
>> $(obj)/$(SPL_BIN)-pad.bin: $(obj)/$(SPL_BIN)
>
>
>
> The code is duplicated for
> - CONFIG_SPL_OF_CONTROL=y && CONFIG_OF_SEPARATE=n
> - CONFIG_SPL_OF_CONTROL=n
>
> Could you refactor a bit like follows?
TBH: I was expecting that there will be better solution for it.
>
>
> ifeq ($(CONFIG_SPL_OF_CONTROL)$(CONFIG_OF_SEPARATE),yy)
> $(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN)-nodtb.bin
> $(obj)/$(SPL_BIN)-pad.bin \
> $(obj)/$(SPL_BIN).dtb FORCE
> $(call if_changed,cat)
>
> $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-dtb.bin FORCE
> $(call if_changed,copy)
> else
> $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-nodtb.bin FORCE
> $(call if_changed,copy)
> endif
>
Let me retest and send v2.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160428/d0066baf/attachment.sig>
prev parent reply other threads:[~2016-04-28 6:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 12:28 [U-Boot] [PATCH] kbuild: Do not append dtb for OF_EMBED case Michal Simek
2016-04-28 5:54 ` Masahiro Yamada
2016-04-28 6:24 ` Michal Simek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5721AC8D.2050602@monstr.eu \
--to=monstr@monstr.eu \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox