From: Jon Humphreys <j-humphreys@ti.com>
To: Sughosh Ganu <sughosh.ganu@linaro.org>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>,
Sumit Garg <sumit.garg@linaro.org>,
Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
<u-boot@lists.denx.de>
Subject: Re: [RFC] Makefile.lib: find capsule ESL dtsi file when CONFIG_OF_UPSTREAM=y
Date: Wed, 27 Mar 2024 23:04:14 -0500 [thread overview]
Message-ID: <86jzlnvw75.fsf@udb0321960.dhcp.ti.com> (raw)
In-Reply-To: <CADg8p94FjRoYkvdSHJ=2MycXceXDOQeES1S6VCNAuJ5ZBZqDow@mail.gmail.com>
Sughosh Ganu <sughosh.ganu@linaro.org> writes:
> hi Jonathan,
>
> On Wed, 27 Mar 2024 at 08:05, Jonathan Humphreys <j-humphreys@ti.com> wrote:
>>
>> When CONFIG_OF_UPSTREAM is enabled, DTS files are in SOC subdirectories (vs the
>> top level dts directory), but when CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled,
>> the dynamically created dtsi file containing the capsule ESL DT node is in the
>> parent directory. This results in a build failure because the #include inserted
>> in the DTS file is local to the current directory. Update Makefile to have the
>> DT preprocessing of #includes search in the parent (dts top level) directory
>> too.
>>
>> I'm not sure if this is the best solution.
>>
>> I was also tempted to just manually include the capsule-key property in the
>> board dts, and avoid the Makefile implicit inclusion trickery. I would actually
>> prefer this approach as everything is more explicit. But this isn't an option
>> because if CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, the implicit inclusion of
>> the dtsi file happens. It would be better, IMO, if we only included the
>> generated dtsi file if CONFIG_EFI_CAPSULE_ESL_FILE is defined. Was only
>> supporting the implicit inclusiong approach an intentional design choice?
>
> I was not sure if users would want to manually insert the contents of
> the ESL file, which is a binary file(a few hundred bytes at least)
> into the DTS. If you prefer having such an option, we can change the
> logic to what you propose. Thanks.
What I was thinking is that one would explictly add the capsule-key
property to the board dts but do it just as the generated dtsi does
where it references the .esl file.
Jon
>
> -sughosh
>
>>
>> Thanks
>> Jon
>>
>> Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
>> ---
>> scripts/Makefile.lib | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
>> index 12857316c58..62f87517c09 100644
>> --- a/scripts/Makefile.lib
>> +++ b/scripts/Makefile.lib
>> @@ -334,7 +334,7 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
>> (cat $< > $(pre-tmp)); \
>> $(foreach f,$(subst $(quote),,$(dtsi_include_list)), \
>> echo '$(pound)include "$(f)"' >> $(pre-tmp);) \
>> - $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \
>> + $(HOSTCC) -E $(dtc_cpp_flags) -I$(obj) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \
>> $(DTC) -O dtb -o $@ -b 0 \
>> -i $(dir $<) -i $(u_boot_dtsi_loc) $(DTC_FLAGS) \
>> -d $(depfile).dtc.tmp $(dtc-tmp) || \
>> --
>> 2.34.1
>>
next prev parent reply other threads:[~2024-03-28 11:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 2:34 [RFC] Makefile.lib: find capsule ESL dtsi file when CONFIG_OF_UPSTREAM=y Jonathan Humphreys
2024-03-27 8:50 ` Sughosh Ganu
2024-03-28 4:04 ` Jon Humphreys [this message]
2024-03-28 14:53 ` Sughosh Ganu
2024-03-29 8:34 ` Jon Humphreys
2024-03-30 10:48 ` Sughosh Ganu
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=86jzlnvw75.fsf@udb0321960.dhcp.ti.com \
--to=j-humphreys@ti.com \
--cc=ilias.apalodimas@linaro.org \
--cc=masahisa.kojima@linaro.org \
--cc=rasmus.villemoes@prevas.dk \
--cc=sjg@chromium.org \
--cc=sughosh.ganu@linaro.org \
--cc=sumit.garg@linaro.org \
--cc=trini@konsulko.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox