From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/7] tegra: Drop generation of -nodtb file with OF_CONTROL
Date: Mon, 25 Jan 2016 14:26:31 -0700 [thread overview]
Message-ID: <56A69307.8070206@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ1D2kcMoXT3tWeN6Tavs+vbV785bgLF80Rt_BL7U3Phvw@mail.gmail.com>
On 01/25/2016 02:18 PM, Simon Glass wrote:
> Hi Stephen,
>
> On 25 January 2016 at 14:08, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>
>> On 01/25/2016 01:30 PM, Simon Glass wrote:
>>>
>>> It seems clear that the intent is to generate u-boot-nodtb-tegra.bin only
>>> when OF_CONTROL is not set. But due to the way the rules are set up, this
>>> file is always generated. Fix this.
>>
>>
>> Nak, this file is used by our flashing tools, so needs to be kept around.
>>
>> (As background, we take the separate u-boot-nodtb-tegra.bin and u-boot.dtb, modify u-boot.dtb to inject some changes to the environment such as over-writing bootcmd with flashing instructions etc., and then blend the two back together for download into RAM and subsequent execution).
>
> OK. well in that case It think the code at the top is wrong:
>
> # enable combined SPL/u-boot/dtb rules for tegra
> ifneq ($(CONFIG_TEGRA),)
> ifeq ($(CONFIG_SPL),y)
> ifeq ($(CONFIG_OF_SEPARATE),y)
> ALL-y += u-boot-dtb-tegra.bin
> else
> ALL-y += u-boot-nodtb-tegra.bin
> endif
> endif
> endif
>
> It should be this, right?
>
> # enable combined SPL/u-boot/dtb rules for tegra
> ifneq ($(CONFIG_TEGRA),)
> ifeq ($(CONFIG_SPL),y)
> ALL-y += u-boot-dtb-tegra.bin u-boot-nodtb-tegra.bin
> endif
> endif
That change looks almost fine, yes. I'd phrase it as follows:
ifneq ($(CONFIG_TEGRA),)
ifeq ($(CONFIG_SPL),y)
ALL-y += u-boot-nodtb-tegra.bin
ifeq ($(CONFIG_OF_SEPARATE),y)
ALL-y += u-boot-dtb-tegra.bin
endif
endif
endif
... so that u-boot-dtb-tegra.bin is only built when there's a DTB in use.
(or we could drop the most nested ifdef as you wrote, if we assume the
value of CONFIG_OF_SEPARATE on Tegra)
Everything works and is safe right now since later Makefile says:
ifeq ($(CONFIG_OF_SEPARATE),y)
u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin dts/dt.dtb FORCE
$(call if_changed,cat)
endif
So the if statement you're quoting is ensuring that the "final" or "most
complete" file is built, and then the dependency chain ends up ensuring
that all the others are built. As you say though, it would be good if
ALL-y listed everything that users expect to use.
next prev parent reply other threads:[~2016-01-25 21:26 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 20:30 [U-Boot] [PATCH 0/7] fdt: Replace u-boot-dtb.bin with u-boot.bin Simon Glass
2016-01-25 20:30 ` [U-Boot] [PATCH 1/7] tegra: Drop generation of -nodtb file with OF_CONTROL Simon Glass
2016-01-25 21:08 ` Stephen Warren
2016-01-25 21:18 ` Simon Glass
2016-01-25 21:26 ` Stephen Warren [this message]
2016-01-25 22:01 ` Simon Glass
2016-01-25 20:30 ` [U-Boot] [PATCH 2/7] fdt: Build a U-Boot binary without device tree Simon Glass
2016-01-25 21:14 ` Stephen Warren
2016-01-25 21:18 ` Simon Glass
2016-01-26 0:42 ` Stephen Warren
2016-01-29 3:06 ` Simon Glass
2016-01-25 20:30 ` [U-Boot] [PATCH 3/7] fdt: Build an SPL " Simon Glass
2016-01-25 20:30 ` [U-Boot] [PATCH 4/7] tegra: Always build a boot image with the same filename Simon Glass
2016-01-25 21:20 ` Stephen Warren
2016-01-25 21:24 ` Simon Glass
2016-01-25 20:30 ` [U-Boot] [PATCH 5/7] socfpga: Simplify Makefile filenames Simon Glass
2016-01-25 20:43 ` Marek Vasut
2016-01-25 21:18 ` Simon Glass
2016-01-25 20:30 ` [U-Boot] [PATCH 6/7] Makefile: Make u-boot.img the same as u-boot-dtb.img Simon Glass
2016-01-25 20:30 ` [U-Boot] [PATCH 7/7] Makefile: Drop unnecessary -dtb suffixes Simon Glass
2016-01-25 21:57 ` [U-Boot] [PATCH 0/7] fdt: Replace u-boot-dtb.bin with u-boot.bin Otavio Salvador
2016-01-25 22:01 ` Simon Glass
2016-01-28 3:58 ` Simon Glass
2016-01-28 8:25 ` Hans de Goede
2016-01-29 0:18 ` Simon Glass
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=56A69307.8070206@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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