All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew F. Davis <afd@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH 4/4] kbuild: arm: Fix duplicate builds of dtbs
Date: Mon, 18 May 2020 12:26:02 -0400	[thread overview]
Message-ID: <5ac946f9-fb27-a28a-e70f-27f77e14d69e@ti.com> (raw)
In-Reply-To: <ef7a659d-042f-928b-5fad-0dfdd0056e7e@web.de>

On 5/8/20 11:54 AM, Jan Kiszka wrote:
> On 08.05.20 17:40, Andrew F. Davis wrote:
>> On 5/4/20 8:38 AM, Jan Kiszka wrote:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> Build the secured board dtbs (.dtb_HS) as part of the regular dtb build
>>> on CONFIG_TI_SECURE_DEVICE targets. This avoids rebuilding them,
>>> possibly overwriting artifacts that are in use, as it is done so far.
>>>
>>> In the same run, fix needless rebuilding of the secured spl dtb.
>>>
>>> Fixes: 508369672ca3 ("arm: mach-k3: Add secure device build support")
>>> CC: Andrew F. Davis <afd@ti.com>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> ---
>>> ? arch/arm/dts/Makefile???????????? |? 6 ++++--
>>> ? arch/arm/mach-k3/config_secure.mk | 19 ++++++++++++++-----
>>> ? 2 files changed, 18 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
>>> index 2c123bd6da..b68e9c0726 100644
>>> --- a/arch/arm/dts/Makefile
>>> +++ b/arch/arm/dts/Makefile
>>> @@ -1,5 +1,7 @@
>>> ? # SPDX-License-Identifier: GPL-2.0+
>>>
>>> +include $(srctree)/arch/arm/mach-k3/config_secure.mk
>>> +
>>
>>
>> This is hacky, we should not in the top level dts makefile have a
>> dependency on a specific platform configuration file.
>>
>> What about mach-omap/config_secure.mk, etc..
> 
> They don't need those special signing the k3 need. If they did, they
> could be included here as well.
> 


I did everything the same in that file, so I don't see why it wouldn't
need the same treatment. But my point is that this will keep growing,
the fixes should be local to the mk files or everyone who does something
similar will need to add here.


>>
>> The negative of building dtbs twice for HS is very minor compared to the
>> extra complexity this patch adds. It will be much more difficult to
>> clean this up later.
> 
> Overwriting a build artifacts that were already completed and may just
> be in use while doing so is broken. This must be fixed.
> 


Absolutely agree it needs fixed, just not sure this just doesn't add to
the makefile complexity in the wrong way.


> As I wrote, I will add support for injecting public keys into the dtbs,
> and that also revealed this issue.
> 


If I understand right, you are adding the keys into the dtb then signing
them? Why not add them to the dts first, then nothing would need to
change with multiple builds of the dtbs.

Andrew


> Better suggestions welcome.
> 
> Jan

  reply	other threads:[~2020-05-18 16:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 12:38 [PATCH 0/4] Various build dependency fixes Jan Kiszka
2020-05-04 12:38 ` [PATCH 1/4] kbuild: efi: Avoid rebuilding efi targets Jan Kiszka
2020-05-04 18:35   ` Heinrich Schuchardt
2020-05-04 12:38 ` [PATCH 2/4] kbuild: spl: Fix parallel build Jan Kiszka
2020-05-14 17:15   ` Tom Rini
2020-05-04 12:38 ` [PATCH 3/4] kbuild: spl: Add shrunk arch-dtbs to targets list Jan Kiszka
2020-05-14 17:15   ` Tom Rini
2020-05-04 12:38 ` [PATCH 4/4] kbuild: arm: Fix duplicate builds of dtbs Jan Kiszka
2020-05-08 15:40   ` Andrew F. Davis
2020-05-08 15:54     ` Jan Kiszka
2020-05-18 16:26       ` Andrew F. Davis [this message]
2020-05-18 17:34         ` Jan Kiszka

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=5ac946f9-fb27-a28a-e70f-27f77e14d69e@ti.com \
    --to=afd@ti.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.